Return address through geolocation

Asked

Viewed 1,460 times

1

In the application I am developing would like to put a button that when pressed returns the current address where it is.

I was able to do the geolocation part and I can get the current latitude and longitude of the device, and now what do I do? Is there any way you can return the address to me? Or I will have to open a maps there, search for the latitude and longitude, and then return the address?

2 answers

2


1

From what I understand you already own the lat and long, so what you will do now and the reverse geolocation, you find this in the google api documentation. Below is an example in the same Api.

Ex: Of the code. https://developers.google.com/maps/documentation/javascript/examples/geocoding-reverse

Documentation. https://developers.google.com/maps/documentation/javascript/geocoding

Note. This example is complete with the map, but in the api there are some ways for you to hide it and return only the address.

  • The Ex is empty

  • Sorry, the link broke, this is better.

  • I’ll leave the +1 because it helped me in the direction I have to seek, but what I seek is for React-Activate

  • Thanks @Mateus.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.