michalchudziak / react-native-geolocation

Geolocation APIs for React Native
MIT License
1.32k stars 234 forks source link

Get user current physcal address (Reverse Geocoding) #70

Open LuizFBrisighello opened 5 years ago

LuizFBrisighello commented 5 years ago

Ask your Question

Is there a way to get the user current physcal address (Reverse Geocoding) using this library? If so, can someone spare some code on how to do that?

hugoh59 commented 5 years ago

I would use Google Api like so:

fetch('https://maps.googleapis.com/maps/api/geocode/json?address=' + position.coords.latitude + ',' + position.coords.longitude + '&key=' + "_YOUR_API_KEY_")

LuizFBrisighello commented 5 years ago

I would use Google Api like so:

fetch('https://maps.googleapis.com/maps/api/geocode/json?address=' + position.coords.latitude + ',' + position.coords.longitude + '&key=' + "_YOUR_API_KEY_")

Sadly I don't have enought time to test this on my actual feature, when I do, I get back to you! Tanks a lot