270
Views
1
Comments
Solved
Google Maps coordinates to address only looking for the city
Question

Hi Guys, 

I just started working with reverse geocoding trying to get the city of the user by his coordinates. It turns out that google is very accurate with its coordinates and always answers with a whole address. 

Does anybody knows a way to only get the city or to cut the address to the city? 

cutting the lat / long is not working it just gives back a less acurate address. 

Thanks

Tobias 

2020-03-01 17-52-33
Nikhil Gaur
Solution

Hi,

I am not usre if some forge component provides this service implementation or not but you can consume this simple google reverse geocoding rest API to get the details you need 

https://developers.google.com/maps/documentation/geocoding/intro#reverse-example

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.