Type a location in the text box below and click the button to geocode and display it on the map.
Geocoding data was loaded from the following URL. Note the use of the 'oe' parameter in the query string to select UTF-8 encoded responses.
http://maps.google.com/maps/geo?output=xml&key=API-KEY-HERE&oe=utf-8&q=10+Downing+Street%2C+London
which returned the following XML:
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.0"><Response>
<name>10 Downing Street, London</name>
<Status>
<code>200</code>
<request>geocode</request>
</Status>
<Placemark id="p1">
<address>10 Downing St, 10 Downing St, City of Westminster, SW1A 2AA, UK</address>
<AddressDetails xmlns="urn:oasis:names:tc:ciq:xsdschema:xAL:2.0" Accuracy="9"><Country><CountryNameCode>GB</CountryNameCode><CountryName>UK</CountryName><SubAdministrativeArea><SubAdministrativeAreaName>City of Westminster</SubAdministrativeAreaName><Locality><LocalityName>London</LocalityName><Thoroughfare><ThoroughfareName>10 Downing St, 10 Downing St</ThoroughfareName></Thoroughfare><PostalCode><PostalCodeNumber>SW1A 2AA</PostalCodeNumber></PostalCode><AddressLine>10 Downing St</AddressLine></Locality></SubAdministrativeArea></Country></AddressDetails>
<ExtendedData>
<LatLonBox north="51.5101714" south="51.4962804" east="-0.1110435" west="-0.1430583"/>
</ExtendedData>
<Point><coordinates>-0.1270509,51.5032264,0</coordinates></Point>
</Placemark>
<Placemark id="p2">
<address>10 Downing St, City of Westminster, SW1A 2, UK</address>
<AddressDetails xmlns="urn:oasis:names:tc:ciq:xsdschema:xAL:2.0" Accuracy="8"><Country><CountryNameCode>GB</CountryNameCode><CountryName>UK</CountryName><AdministrativeArea><AdministrativeAreaName>Greater London</AdministrativeAreaName><SubAdministrativeArea><SubAdministrativeAreaName>City of Westminster</SubAdministrativeAreaName><Locality><LocalityName>London</LocalityName><Thoroughfare><ThoroughfareName>10 Downing St</ThoroughfareName></Thoroughfare><PostalCode><PostalCodeNumber>SW1A 2</PostalCodeNumber></PostalCode></Locality></SubAdministrativeArea></AdministrativeArea></Country></AddressDetails>
<ExtendedData>
<LatLonBox north="51.5046556" south="51.5019576" east="-0.1263617" west="-0.1290597"/>
</ExtendedData>
<Point><coordinates>-0.1277107,51.5033066,0</coordinates></Point>
</Placemark>
<Placemark id="p3">
<address>10 Downing St, City of Westminster, London SW1A, UK</address>
<AddressDetails xmlns="urn:oasis:names:tc:ciq:xsdschema:xAL:2.0" Accuracy="8"><Country><CountryNameCode>GB</CountryNameCode><CountryName>UK</CountryName><AdministrativeArea><AdministrativeAreaName>Greater London</AdministrativeAreaName><Locality><LocalityName>London</LocalityName><Thoroughfare><ThoroughfareName>10 Downing St</ThoroughfareName></Thoroughfare></Locality></AdministrativeArea></Country></AddressDetails>
<ExtendedData>
<LatLonBox north="51.5047053" south="51.5020073" east="-0.1262695" west="-0.1289675"/>
</ExtendedData>
<Point><coordinates>-0.1276185,51.5033563,0</coordinates></Point>
</Placemark>
</Response></kml>
The above map is generated like this:
// Setup map
var map = new google.maps.Map2(document.getElementById('map'));
map.addControl(new GSmallMapControl());
map.addControl(new GMapTypeControl());
//map.setMapType(G_HYBRID_MAP);
var point = new google.maps.LatLng(51.5032264, -0.1270509)
map.setCenter(point, 14);
// Add marker
var marker = new GMarker(point);
var info = "<strong>10 Downing Street, London</strong><br />Latitude: 51.5032264<br />Longitude: -0.1270509<br />";
map.addOverlay(marker);
marker.openInfoWindowHtml(info);
GEvent.addListener(marker, 'click', function(){
marker.openInfoWindowHtml(info);
});