From 48920f78029b3900508a281e2be304a1ae283c2f Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sun, 29 Dec 2013 17:17:19 +0000 Subject: cleanups --- map3.js | 44 ++++---------------------------------------- 1 file changed, 4 insertions(+), 40 deletions(-) (limited to 'map3.js') diff --git a/map3.js b/map3.js index f1060eb..fe1ccdd 100644 --- a/map3.js +++ b/map3.js @@ -15,9 +15,6 @@ var lines = new Array(); var markers = new Array(); function initialize(lat, lng, res) { - if (!checkBrowser()) { - return; - } $('#visibox').hide(); $('#southeastcontainer').hide(); google.maps.visualRefresh=true; @@ -37,11 +34,6 @@ function initialize(lat, lng, res) { //##// map.disableDoubleClickZoom(); //##// map.enableScrollWheelZoom(); -// map.removeMapType(G_HYBRID_MAP); -// map.removeMapType(G_SATELLITE_MAP); -//##// map.addMapType(G_PHYSICAL_MAP); -// map.setMapType(G_HYBRID_MAP); - //##// // openStreetMap //##// var copyOSM = new GCopyrightCollection("OpenStreetMap"); //##// var copyOGDGraz = new GCopyrightCollection("Open Government Data Graz"); @@ -92,22 +84,9 @@ function initialize(lat, lng, res) { countbox.appendChild(countboxText); //##// reloadcon.started(); -//##// GDownloadUrl("data.php", onData); $.get( "data.php",onData); } -function checkBrowser() { -//##// if (GBrowserIsCompatible()) { - return true; -//##// } else { -//##// var html = '

Dein Browser ist leider nicht kompatibel mit der Google Maps API!

'; -//##// html += 'Ich würde vorschlagen du surfst auf: ' -//##// html += 'http://www.mozilla.com/firefox/
'; -//##// document.getElementById("map").innerHTML = html; -//##// return false; -//##// } -} - function onAddOverlay(overlay) { switch(overlay.overlaytype) { case "location": overlays["locations"].push(overlay); break; @@ -248,11 +227,8 @@ function onLocationClick(latlng) { } html += ''; html += ''; - var infowindow = new google.maps.InfoWindow({ - content: html - }); + var infowindow = new google.maps.InfoWindow({content: html}); infowindow.open(map,this); -//##// this.openInfoWindowHtml(html); } function onLineClick(line,latlng) { @@ -321,8 +297,8 @@ function drawLinks(xmlData) { google.maps.event.addListener(line, "click", function(point){onLineClick(this,point)}); // google.maps.event.addListener(line, "click", function(latlng){map.openInfoWindowHtml(latlng, message)}); -//##// map.addOverlay(line); line.setMap(map); + lines.push(marker); } if(document.visibleform.elements["defaultroute"].checked) { toggleVisible("defaultroute"); @@ -463,7 +439,6 @@ function makeWeight(value) { } function makeIcon(type) { -//##// var icon = new GIcon(); var url; switch(type) { case 'ruler': url = "./img/marker_blue.png"; break; @@ -481,17 +456,6 @@ function makeIcon(type) { // The anchor for this image is the base of the flagpole at 0,32. anchor: new google.maps.Point(6, 20) }; -//##// switch(type) { -//##// case 'ruler': icon.image = "./img/marker_blue.png"; break; -//##// case 'newnode': icon.image = "./img/marker_darkred.png"; break; -//##// case 'online': icon.image = "./img/marker_online.png"; break; -//##// case 'tunnel': icon.image = "./img/marker_tunnel.png"; break; -//##// case 'offline': icon.image = "./img/marker_offline.png"; break; -//##// } -//##// icon.iconSize = new GSize(12,20); -//##// icon.iconAnchor = new GPoint(6,20); -//##// icon.infoWindowAnchor = new GPoint(5,1); -//##// return icon } function toggleVisible(element) { @@ -663,7 +627,7 @@ function onFFLogin(data, responseCode) { showFFLogout(username); //##// reloadcon.started(); -//##// GDownloadUrl("data.php", onData); + $.get( "data.php",onData); } } } @@ -701,7 +665,7 @@ function onFFLogout(data, responseCode) { showFFLogin(); //##// reloadcon.started(); -//##// GDownloadUrl("data.php", onData); + $.get( "data.php",onData); } } -- cgit v1.2.1