Search code examples
geocodingreverse-geocoding

Geocode Area Names of a City to get Lat and Long


I have a list of areas names in my City and i need the Lat and Long of the same.

Is there any service which i can use the get the Data ?

I dont wanna use any map. I would like to make simple api calls and get the lat long via json or xml.


Solution

  • You can use the Google Geocoding service:

    REST format: http://code.google.com/apis/maps/documentation/geocoding/index.html

    JavaScript: http://code.google.com/apis/maps/documentation/javascript/services.html#Geocoding

    EDIT: For those too lazy to read, here's the REST format example..

    xml response: http://maps.googleapis.com/maps/api/geocode/xml?address=Bangalore&sensor=false

    json response: http://maps.googleapis.com/maps/api/geocode/json?address=Bangalore&sensor=false