Thread: google maps
View Single Post
  #3 (permalink)  
Old Oct 14th, 2007, 13:44
Graeme36 Graeme36 is offline
Junior Member
Join Date: Sep 2007
Location: UK
Age: 37
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Re: google maps

Hi I managed to implement a google map onto my site:
www.flexicon-ind-supplies.co.uk/HowToFindUs.aspx

If this is what you mean here is the javascript:

<scriptsrc="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAApI7YGn0MV7bA ZkIUezyLkxRD6soBqGhfdhCGOR_J2wdcSrJPpRSKkQqrdS0CsP U10hIaPhvFnCvdDA"
type="text/javascript"></script>
<scripttype="text/javascript">
//<![CDATA[
function load()
{
var point = new GLatLng(53.4227, -2.9509)

if (GBrowserIsCompatible())
{
var map = new GMap2(document.getElementById("map"));
map.setCenter(point, 12);
var marker = createMarker(point,'Flexicon Industrial Supplies');
map.addOverlay(marker);
}

function createMarker(point, html)
{
var marker = new GMarker(point);
GEvent.addListener(marker, "click", function()
{
marker.openInfoWindowHtml(html);
});
return marker;
}
}
//]]>
</script>

You will need to sign up to googlemaps and get an API key for your site and find out your latitude and longitude coordinate for centering your map and the coordinates for the pointers.

Last edited by Graeme36; Oct 14th, 2007 at 13:45. Reason: edited link
Reply With Quote