Cool - thanks.
Below is my working example.
(anyone copying this will need their own Google Maps Key)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<title>Google Maps</title>
<script src="http://maps.google.com/maps?file=api&v=2&sensor=false&key=ABQIAAAATtc3A8yRzrNyavPK5XQ60hRKIv728XCf_r3GoMGY2NTEAHjSqBRZ6eDStBzAhcWCYHuA2Nb9FyCN1A" type="text/javascript"></script>
</head>
<body>
<div id="message"></div>
<script type="text/javascript">
//<![CDATA[
if (GBrowserIsCompatible()) {
function showmap(lat, lng) {
var map = new GMap2(document.getElementById("map_canvas"));
map.setCenter(new GLatLng(lat, lng), 13);
var point = new GLatLng(lat, lng);
map.addOverlay(new GMarker(point));
}
// ====== Create a Client Geocoder ======
var geo = new GClientGeocoder();
// ====== Geocoding ======
function getAddress(search) {
geo.getLocations(search, function (result)
{
// If that was successful
if (result.Status.code == G_GEO_SUCCESS) {
// Lets assume that the first marker is the one we want
var p = result.Placemark[0].Point.coordinates;
var lat=p[1];
var lng=p[0];
showmap(lat, lng);
}
}
);
}
}
// display a warning if the browser was not compatible
else {
alert("Sorry, the Google Maps API is not compatible with this browser");
}
//]]>
</script>
<div id="map_canvas" style="width: 500px; height: 300px"></div>
<script type="text/javascript">
getAddress("1 Spring Street, Melbourne, VIC, Australia");
</script>
</body>
</html>
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79:





by: rweilPosted on 2009-09-05 at 10:21:07ID: 25266998
What you are looking for is called GeoCoding.
part 16,17 under the "more advanced stuff section"
See http://econym.org.uk/gmap/
Part 16 Geocoding with error handling
Part 17 Geocoding multiple addresses