var xmlHttp; var latestsbd_timestamp; var trackingunit; var map; var toId; var overlays = []; // Create a base icon for all of our markers that specifies the // shadow, icon dimensions, etc. var baseIcon = new GIcon(); baseIcon.shadow = "http://www.google.com/mapfiles/shadow50.png"; baseIcon.iconSize = new GSize(12, 20); baseIcon.shadowSize = new GSize(12, 20); baseIcon.iconAnchor = new GPoint(6, 20); baseIcon.infoWindowAnchor = new GPoint(6, 2); baseIcon.infoShadowAnchor = new GPoint(18, 25); function findObj(n, d) { //v4.01 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i'+sInfo+''); var tab2 = new GInfoWindowTab("Closeup", '
'); var infoTabs = [tab1,tab2]; marker.openInfoWindowTabsHtml(infoTabs); var dMapDiv = document.getElementById("detailmap"); var detailmap = new GMap2(dMapDiv); detailmap.enableDoubleClickZoom(); detailmap.enableContinuousZoom(); detailmap.enableScrollWheelZoom(); detailmap.addControl(new GSmallZoomControl()); detailmap.setCenter(point , 13, map.getCurrentMapType()); var dmarker = new GMarker(point); detailmap.addOverlay(dmarker); var iZoomLevel = detailmap.getCurrentMapType().getMaximumResolution(point); if (iZoomLevel < 13) detailmap.setZoom(iZoomLevel-1); var CopyrightDiv = dMapDiv.firstChild.nextSibling; var CopyrightImg = dMapDiv.firstChild.nextSibling.nextSibling; CopyrightDiv.style.display = "none"; CopyrightImg.style.display = "none"; */ }); } function createGreenMarker(point, index, sInfo) { var icon = new GIcon(baseIcon); icon.image = "images/mm_20_green.png"; var marker = new GMarker(point, icon); AddTheInfoWindow(point, marker, sInfo); return marker; } function createRedMarker(point, index, sInfo) { var icon = new GIcon(baseIcon); icon.image = "images/mm_20_red.png"; var marker = new GMarker(point, icon); AddTheInfoWindow(point, marker, sInfo); return marker; } function createQuintileMarker(point, quintile, sInfo) { var icon = new GIcon(baseIcon); icon.image = "images/mm_20_"+quintile+".png"; var marker = new GMarker(point, icon); AddTheInfoWindow(point, marker, sInfo); return marker; } function HideOverlayControl() { } HideOverlayControl.prototype = new GControl(); // Creates a one DIV for each of the buttons and places them in a container // DIV which is returned as our control element. We add the control to // to the map container and return the element for the map class to // position properly. HideOverlayControl.prototype.initialize = function(map) { var container = document.createElement("div"); container.style.width='200px'; container.style.height='18px'; var hideDiv = document.createElement("div"); this.setButtonStyle_(hideDiv); container.appendChild(hideDiv); hideDiv.appendChild(document.createTextNode("Hide Overlay")); GEvent.addDomListener(hideDiv, "click", function() { if (this.innerHTML == 'Show Overlay') { this.innerHTML = 'Hide Overlay'; showoverlays(); } else { this.innerHTML = 'Show Overlay'; hideoverlays(); } }); map.getContainer().appendChild(container); return container; } HideOverlayControl.prototype.getDefaultPosition = function() { return new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(45, 7)); } HideOverlayControl.prototype.setButtonStyle_ = function(button) { button.style.backgroundColor = "white"; button.style.textDecoration = "none"; button.style.color = "#000000"; button.style.font = "small Arial"; button.style.fontSize = "12px"; button.style.border = "1px solid black"; button.style.padding = "1px"; button.style.textAlign = "center"; button.style.width = "80px"; button.style.cursor = "pointer"; button.style.position = "absolute"; } function loadmap() { // && document.getElementById("map") if (GBrowserIsCompatible()) { map = new GMap2(findObj("map")); map.setCenter(new GLatLng(-28.4796, 24.698435), 5, G_NORMAL_MAP); map.enableDoubleClickZoom(); map.enableContinuousZoom(); map.enableScrollWheelZoom(); map.addControl(new GSmallMapControl()); map.addControl(new GMapTypeControl()); //map.addControl(new DragZoomControl()); showpoints(); } } function hideoverlays() { map.clearOverlays(); } function showoverlays() { for (var i=0; i < overlays.length; i++) { map.addOverlay(overlays[i]); } } function showpoints() { var points = []; var markers = []; var gpoly; }