How to make reverse geocodigry?

I’m in need of converting an address into latitude and logitude is the same as reverse encoding.
I’m going to use the LocationIQ API.

The problem is that I do not know how to use api , can anyone help me ?

I think I can. Could you PM me a functional GET link? I don’t leak API keys, you can ask @David. :slight_smile:

P.S. It’s best if you message me on Telegram.

2 Likes

What’s your telegram?

Once you create an account in LocationIQ you get your API token . From the API documentation you see that for reverse geocoding requests can be sent to any of the following endpoints

GET https://us1.locationiq.com/v1/reverse.php?key=YOUR_PRIVATE_TOKEN&lat=LATITUDE&lon=LONGITUDE&format=json

GET https://eu1.locationiq.com/v1/reverse.php?key=YOUR_PRIVATE_TOKEN&lat=LATITUDE&lon=LONGITUDE&format=json

So all you have to do is replace YOUR_PRIVATE_TOKEN in the above address and use it in your project . The response that you will get will be in json format so you will have to get the values from json

See an example , I use JsonUtils extension from @Jerin_Jacob

3 Likes

what’s in the “web procedure 1”

This geocodes any given address:

4 Likes

In my example I use reverse geocoding and when I click on google map a marker is added and the address shows in a label.The response you receive from locationIQ is in json format

So you have from that json string to choose the information that you want to call to your label . So when web GET text to I choose from “address” to call specific values

3 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.