// Initialisation function
function load() {
if ( !GBrowserIsCompatible() )
return;
// Create the map
var map = new GMap2(document.getElementById("map"));
map.addControl(new GSmallMapControl());
map.addControl(new GMapTypeControl());
map.setCenter( new GLatLng( 53.989974, -1.100169 ), 15 );
// Set up our GMarkerOptions object
var point = new GLatLng( 53.989974, -1.100169 );
var markerInfo = 'York Eco Business Centre
Amy Johnson Way
Clifton Moor
York, YO30 4AG';
var marker = createMarker( point, markerInfo );
map.addOverlay( marker );
}
// Creates a marker at the given point with the given info label
function createMarker( point, info, options, id ) {
var marker = new GMarker( point, options );
GEvent.addListener( marker, "click", function() {
marker.openInfoWindowHtml( info );
} );
return marker;
}