Hi Sarah
This is what ive been using, im in the uk too, let me know how acurate it is as mine for some reason has become very in acurate, i think its a google uk thing
PHP Code:
<label>Google Map Directions</label>
<span class="text">
<div id="map" style="width: 370px; height: 270px">
<script src="http://maps.google.co.uk/maps?file=api&v=2&key=yourkeyhere"
type="text/javascript"></script>
<!-- fail nicely if the browser has no Javascript -->
<noscript><b>JavaScript must be enabled in order for you to use Google Maps.</b>
However, it seems JavaScript is either disabled or not supported by your browser.
To view Google Maps, enable JavaScript by changing your browser options, and then
try again.
</noscript>
<script type="text/javascript">
//<![CDATA[
var geocoder;
var map;
var address = "<%$postcode%>";
var html = "<%$postcode%>"
function load()
{
map = new GMap2(document.getElementById("map"));
map.addControl(new GSmallMapControl());
geocoder = new GClientGeocoder();
geocoder.getLocations(address, addToMap);
}
function addToMap(response)
{
place = response.Placemark[0];
point = new GLatLng(place.Point.coordinates[1],
place.Point.coordinates[0]);
map.setCenter(point, 15);
marker = new GMarker(point);
html = html + '<p>Get directions to here from:' +
'<form action="http://maps.google.com/maps" method="get" target="_blank">' +
'<input type="text" SIZE=30 MAXLENGTH=40 name="saddr" id="saddr" value="" />' +
'<INPUT value="Get Directions" TYPE="SUBMIT">' +
'<input type="hidden" name="daddr" value="' + address + '"/></p>' +
'<br/><br/>';
map.addOverlay(marker);
marker.openInfoWindowHtml(html);
GEvent.addListener(marker, "click", function() {
marker.openInfoWindowHtml(html);
});
}
//]]>
</script>
<body onload="load()" onunload="GUnload()">
</span>
</div>