Reference : http://code.google.com/apis/maps/documentation/geocoding/
Example request
———————————
http://maps.googleapis.com/maps/api/geocode/xml?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA& sensor=true_or_falseParameters
url = http://maps.googleapis.com/maps/api/geocode/xml?
address = streetaddress, county or state, state ( two letter format)
sensor= false (means ,if it is a device, from which this request is comming)NOTE: All space in between the address should replace with ‘+’
Example response <GeocodeResponse> <status>OK</status> <result> <type>street_address</type> <formatted_address>1600 Amphitheatre Pkwy, Mountain View, CA 94043, USA</formatted_address> <address_component> <long_name>1600</long_name> <short_name>1600</short_name> <type>street_number</type> </address_component> <address_component> <long_name>Amphitheatre Pkwy</long_name> <short_name>Amphitheatre Pkwy</short_name> <type>route</type> </address_component> <address_component> <long_name>Mountain View</long_name> <short_name>Mountain View</short_name> <type>locality</type> <type>political</type> </address_component> <address_component> <long_name>San Jose</long_name> <short_name>San Jose</short_name> <type>administrative_area_level_3</type> <type>political</type> </address_component> <address_component> <long_name>Santa Clara</long_name> <short_name>Santa Clara</short_name> <type>administrative_area_level_2</type> <type>political</type> </address_component> <address_component> <long_name>California</long_name> <short_name>CA</short_name> <type>administrative_area_level_1</type> <type>political</type> </address_component> <address_component> <long_name>United States</long_name> <short_name>US</short_name> <type>country</type> <type>political</type> </address_component> <address_component> <long_name>94043</long_name> <short_name>94043</short_name> <type>postal_code</type> </address_component> <geometry> <location> <lat>37.4217550</lat> <lng>-122.0846330</lng> </location> <location_type>ROOFTOP</location_type> <viewport> <southwest> <lat>37.4188514</lat> <lng>-122.0874526</lng> </southwest> <northeast> <lat>37.4251466</lat> <lng>-122.0811574</lng> </northeast> </viewport> </geometry> </result> </GeocodeResponse>
Advertisement
