geolocationgeocodinggeospatialgeo

Given the lat/long coordinates, how can we find out the city/country?


For example if we have these set of coordinates

"latitude": 48.858844300000001,
"longitude": 2.2943506,

How can we find out the city/country?


Solution

  • The free Google Geocoding API provides this service via a HTTP REST API. Note, the API is usage and rate limited, but you can pay for unlimited access.

    Try this link to see an example of the output (this is in json, output is also available in XML)

    https://maps.googleapis.com/maps/api/geocode/json?latlng=40.714224,-73.961452&sensor=true