function load() { if (GBrowserIsCompatible()) { var map = new GMap2(document.getElementById("map_canvas")); map.setCenter(new GLatLng(41.55038538809851, -72.8009033203125), 9); map.addControl(new GSmallMapControl()); map.addControl(new GMapTypeControl()); // Create a base icon for all of our markers that specifies the // shadow, icon dimensions, etc. var baseIcon = new GIcon(G_DEFAULT_ICON); baseIcon.shadow = "http://www.google.com/mapfiles/shadow50.png"; baseIcon.iconSize = new GSize(20, 34); baseIcon.shadowSize = new GSize(37, 34); baseIcon.iconAnchor = new GPoint(9, 34); baseIcon.infoWindowAnchor = new GPoint(9, 2); function createMarker(point, markerImage, markerText, markerLink, zIndex) { var clubIcon = new GIcon(baseIcon); clubIcon.image = markerImage; function orderOfCreation(marker,b) { return zIndex; } markerOptions = { icon:clubIcon,zIndexProcess:orderOfCreation }; var marker = new GMarker(point, markerOptions); if (markerText != "") { GEvent.addListener(marker, "mouseover", function() { marker.openInfoWindowHtml(markerText); }); }; if (markerLink != "") { GEvent.addListener(marker, "click", function() { location.href = markerLink; }); }; return marker; } var pointQ1 = new GLatLng(41.268679, -72.776206); map.addOverlay(createMarker(pointQ1,'http://www.asnh.org/gifs/markerY.png','Click Marker for Directions to Youngs Pond Park' ,'http://www.asnh.org/Calendar/directionsYoungs.php',1)); var pointQ2 = new GLatLng(41.199711, -73.071527); map.addOverlay(createMarker(pointQ2, 'http://www.asnh.org/gifs/markerSS.png','Click Marker for Directions to Silver Sands State Park','http://www.asnh.org/Calendar/directionsSilver.php', 2)); var pointQ3 = new GLatLng(41.321090, -72.921946); map.addOverlay(createMarker(pointQ3, 'http://www.asnh.org/gifs/markerL.png','Click Marker for Directions to the General Meetings','http://www.asnh.org/Calendar/directionsLeitner.php', 3)); var pointQ4 = new GLatLng(41.421696, -72.997033); map.addOverlay(createMarker(pointQ4, 'http://www.asnh.org/gifs/markerBethany.png','Click Marker for Directions to the Bethany Observing Station','http://www.asnh.org/Calendar/directionsBethany.php', 4)); var pointQ5 = new GLatLng(41.557039804321064, -73.2614278793335); map.addOverlay(createMarker(pointQ5, 'http://www.asnh.org/gifs/markerRA.png','Click Marker for Directions to the Roxbury Airport','http://www.asnh.org/Calendar/directionsRoxbury.php', 5)); var pointQ6 = new GLatLng(41.2725152225215, -72.613685131073); map.addOverlay(createMarker(pointQ6, 'http://www.asnh.org/gifs/markerMMW.png','Click Marker for Directions to the Madison Moon Lit Walk ','http://www.asnh.org/Calendar/directionsMadison.php', 6)); var pointQ7 = new GLatLng( 41.33004772014786, -72.7723753452301); map.addOverlay(createMarker(pointQ7, 'http://www.asnh.org/gifs/markerWA.png','Click Marker for Directions to the Regional Water Authority Event','http://www.asnh.org/Calendar/directionsWater.php', 7)); var pointQ8 = new GLatLng(41.868384642982626, -72.15068221092224); map.addOverlay(createMarker(pointQ8, 'http://www.asnh.org/gifs/markerA.png','Click Marker for Directions to CSP','http://www.asnh.org/Calendar/directionsAshford.php', 8)); var pointQ9 = new GLatLng(41.34027367290508, -72.5914978981018); map.addOverlay(createMarker(pointQ9, 'http://www.asnh.org/gifs/markerDL.png','Click Marker for Directions to Deer Lake Park','http://www.asnh.org/Calendar/directionsDeer.php', 9)); } }