views:

91

answers:

1

Hi, I've got a latitude/longitude value.... How can I search and get the city?

+1  A: 

Using the google maps api, here is an example to get the address in XML format.

http://maps.google.com/maps/api/geocode/xml?latlng={latlng}&sensor={sensor}&region={region}

Where latlng = 0,0 sensor = false, and region = country code, so for my old address it would be

http://maps.google.com/maps/api/geocode/xml?latlng=-43.893792,171.7592620&sensor=false&region=nz

Then you can use that XML to get whatever details you need, including the City

PostMan