function loadMap(){ if (GBrowserIsCompatible()) { var map = new GMap(parent.window.document.getElementById("map")); // Center the map on Sac map.addControl(new GLargeMapControl()); map.addControl(new GMapTypeControl()); map.addControl(new GScaleControl()); // Set cursor to move (to show users they can drag) document.getElementById("map").style.cursor = 'move'; // Create 3 icons var iconAm = new GIcon(); iconAm.image = "markerAm.png"; iconAm.shadow = "shadow50.png"; iconAm.iconSize = new GSize(20, 34); iconAm.shadowSize = new GSize(37, 34); iconAm.iconAnchor = new GPoint(9, 34); iconAm.infoWindowAnchor = new GPoint(9, 2); iconAm.infoShadowAnchor = new GPoint(18, 25); var iconMm = new GIcon(); iconMm.image = "markerMm.png"; iconMm.shadow = "shadow50.png"; iconMm.iconSize = new GSize(20, 34); iconMm.shadowSize = new GSize(37, 34); iconMm.iconAnchor = new GPoint(9, 34); iconMm.infoWindowAnchor = new GPoint(9, 2); iconMm.infoShadowAnchor = new GPoint(18, 25); var iconGv = new GIcon(); iconGv.image = "markerGv.png"; iconGv.shadow = "shadow50.png"; iconGv.iconSize = new GSize(20, 34); iconGv.shadowSize = new GSize(37, 34); iconGv.iconAnchor = new GPoint(9, 34); iconGv.infoWindowAnchor = new GPoint(9, 2); iconGv.infoShadowAnchor = new GPoint(18, 25); // Creates a marker whose info window displays the given number function createMarker(point, label, icon) { var marker = new GMarker(point, icon); // Show this marker's index in the info window when it is clicked var html = label; GEvent.addListener(marker, "click", function() { marker.openInfoWindowHtml(html); }); return marker; } // SCROLL WHEEL FUNCTIONALITY ////////////////////////////////////////// function zoom() { var new_zoom = map.getZoom(); if (event.wheelDelta >= 120) new_zoom++; else new_zoom--; map.setZoom(new_zoom); } document.getElementById("map").onmousewheel = function(){zoom(); return false;}; // END WHEEL FUNCTIONALITY ////////////////////////////////////////// map.setCenter(new GLatLng(37.974244, -122.562447), 11); var maxLng = -122.613; var maxLat = 38.79625; var minLng = -123.00525; var minLat = 38.1169; var center = new GLatLng( (maxLat+minLat)/2, (maxLng + minLng)/2 ); var delta = new GLatLngBounds(new GLatLng(maxLat, minLng), new GLatLng(minLat, maxLng)); var minZoom = map.getBoundsZoomLevel(delta); map.setCenter(center, minZoom-1); var point = new GLatLng(38.79625,-123.00525); var marker = createMarker(point, '