diff options
author | Christian Pointner <equinox@ffgraz.net> | 2013-12-30 12:02:16 +0000 |
---|---|---|
committer | Christian Pointner <equinox@ffgraz.net> | 2013-12-30 12:02:16 +0000 |
commit | 7122687b9849911429072de1bf31071b830780c5 (patch) | |
tree | 86a0ea41d914ddbb9a41b9b1c2cdcea857ac3b66 /map.js | |
parent | 70b378464945443b234380c5098ec7066bb0b15f (diff) |
cleanup
Diffstat (limited to 'map.js')
-rw-r--r-- | map.js | 21 |
1 files changed, 7 insertions, 14 deletions
@@ -5,7 +5,7 @@ var reloadcon = null; var countboxText = null; var overlays = new Array(); overlays["newmarker"] = null; -overlays["ruler"] = new Array(); +//overlays["ruler"] = new Array(); overlays["locations"] = new Array(); overlays["links"] = new Array(); var locations = new Array(); @@ -106,7 +106,6 @@ function drawLocations(xmlData) { locations[id] = new Location(element[i]); var marker = new google.maps.Marker({position: locations[id].point, icon: makeIcon(locations[id].state)}); - marker.overlaytype = "location"; marker.locid = id; google.maps.event.addListener(marker, "click", onLocationClick); marker.setMap(map); @@ -183,7 +182,6 @@ function drawLinks(xmlData) { var line = new google.maps.Polyline({path: [links[id].frompoint, links[id].topoint], strokeColor: makeColor(Math.floor(links[id].value)), strokeWeight: makeWeight(Math.floor(links[id].value))}); line.name = id; line.state = "Unbekannt"; - line.overlaytype = "link"; line.linkid = id; line.dnsfrom = element[i].getAttribute("dnsfrom"); line.dnsto = element[i].getAttribute("dnsto"); @@ -263,8 +261,8 @@ function drawLinks(xmlData) { function showLinkInfo(link, point) { var html = '<div id="linkbox" class="box" style="border-color: ' + link.color + '">'; - if((links[link.name].frequence !== "undef") && (links[link.name].frequence !== "")){ - html += '<strong>Frequenz:</strong> ' + links[link.name].frequence + '<br />'; + if((links[link.name].frequency !== "undef") && (links[link.name].frequency !== "")){ + html += '<strong>Frequenz:</strong> ' + links[link.name].frequency + '<br />'; } else { html += '<strong>Frequenz:</strong> undef <br />'; } @@ -305,7 +303,7 @@ function Link(element) { link.value = parseFloat(element.getAttribute("value")); link.channel = element.getAttribute("channel"); link.defaultroute = element.getAttribute("defaultroute"); - link.frequence = element.getAttribute("frequence"); + link.frequency = element.getAttribute("frequency"); return link; } @@ -442,9 +440,9 @@ function toggleVisible(element) { case 'channel11': document.visibleform.elements["2.4channel"].checked=false; elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].channel == '11');"); break; case 'channel12': document.visibleform.elements["2.4channel"].checked=false; elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].channel == '12');"); break; case 'channel13': document.visibleform.elements["2.4channel"].checked=false; elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].channel == '13');"); break; - case 'undef': elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].frequence == 'undef');"); break; - case '2.4channel': elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].frequence == '2.4');"); break; - case '5channel': elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].frequence !=='2.4' && links[overlays['links'][id].linkid].frequence !=='undef');"); break; + case 'undef': elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].frequency == 'undef');"); break; + case '2.4channel': elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].frequency == '2.4');"); break; + case '5channel': elements.overlays = overlays["links"]; elements.select = new Function("id", "return (links[overlays['links'][id].linkid].frequency !=='2.4' && links[overlays['links'][id].linkid].frequency !=='undef');"); break; } if(document.visibleform.elements[element].checked) { @@ -629,7 +627,6 @@ function ReloadControl(controlDiv, map) { //##// } //##// distText.data = "Entfernung: " + dist; //##// var poly = new GPolyline(line,'#FFFF00', 3, 1) -//##// poly.overlaytype = "ruler"; //##// poly.overlaysubtype = "line"; //##// map.addOverlay(poly); //##// } @@ -665,13 +662,9 @@ function ReloadControl(controlDiv, map) { //##// //##// var pnt = map.getCenter(); //##// marker1 = new GMarker(pnt, {icon: makeIcon('ruler'), draggable: true}); -//##// marker1.overlaytype = "ruler"; -//##// marker1.overlaysubtype = "marker1"; //##// map.addOverlay(marker1); //##// //##// marker2 = new GMarker(pnt, {icon: makeIcon('ruler'), draggable: true}); -//##// marker2.overlaytype = "ruler"; -//##// marker2.overlaysubtype = "marker2"; //##// map.addOverlay(marker2); //##// //##// google.maps.event.addListener(marker1, "drag", function() { measure(); }); |