diff options
author | Christian Pointner <equinox@ffgraz.net> | 2013-12-29 23:05:36 +0000 |
---|---|---|
committer | Christian Pointner <equinox@ffgraz.net> | 2013-12-29 23:05:36 +0000 |
commit | 747dce83bffd46a9164cd8f8537ede14bb70e1b1 (patch) | |
tree | b04a1c78c65f770e8096f758d6ac17dad231e235 /map.js | |
parent | 060170fdb2ec56dde0276c867c6398c745ef238f (diff) |
cleanup
Diffstat (limited to 'map.js')
-rw-r--r-- | map.js | 31 |
1 files changed, 14 insertions, 17 deletions
@@ -26,29 +26,26 @@ function initialize(lat, lng, res) { var mapOptions = { center: new google.maps.LatLng(lat, lng), zoom: res, - streetViewControl: false, + streetViewControl: false, + disableDoubleClickZoom: true, mapTypeId: google.maps.MapTypeId.ROADMAP, mapTypeControlOptions: { - mapTypeIds: [google.maps.MapTypeId.ROADMAP, google.maps.MapTypeId.HYBRID , google.maps.MapTypeId.SATELLITE , google.maps.MapTypeId.TERRAIN ], - style: google.maps.MapTypeControlStyle.HORIZONTAL_BAR, - } + mapTypeIds: [google.maps.MapTypeId.ROADMAP, google.maps.MapTypeId.HYBRID, + google.maps.MapTypeId.SATELLITE , google.maps.MapTypeId.TERRAIN ], + style: google.maps.MapTypeControlStyle.HORIZONTAL_BAR, + } }; - map = new google.maps.Map(document.getElementById("map"), - mapOptions); -//##// deaktiviert 2013112 goole maps api v3 incompatibel -//##// map.disableDoubleClickZoom(); + map = new google.maps.Map(document.getElementById("map"), mapOptions); //##// map.addControl(new RulerControl()); //##// reloadcon = new reloadcontrol(); //##// map.addcontrol(reloadcon); -//##// map.addControl(new GSmallMapControl(), new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(10,20))); -//##// map.addControl(new GMapTypeControl(), new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(50,10))); google.maps.event.addListener(map, "click", onMapClick); - lineinfo = document.createElement("div"); - document.getElementById("map").appendChild(lineinfo); - lineinfo.style.visibility = "hidden" + linkinfo = document.createElement("div"); + document.getElementById("map").appendChild(linkinfo); + linkinfo.style.visibility = "hidden" dnsinfo = document.createElement("div"); document.getElementById("map").appendChild(dnsinfo); @@ -194,7 +191,7 @@ function drawLinks(xmlData) { line.dnsto = element[i].getAttribute("dnsto"); line.Routerfrom = element[i].getAttribute("from"); line.Routerto = element[i].getAttribute("to"); -// google.maps.event.addListener(line, "mouseout", function() { lineinfo.style.visibility = "hidden"; }); +// google.maps.event.addListener(line, "mouseout", function() { linkinfo.style.visibility = "hidden"; }); // google.maps.event.addListener(line, "mouseover", function(point) { showLinkInfo(this, point)}); google.maps.event.addListener(line, "click", function(event) { onLinkClick(this, event.latLng) }); @@ -286,11 +283,11 @@ function showLinkInfo(link, point) { html += '<strong>Name:</strong> ' + link.name + '<br />'; //##// html += '<strong>Länge:</strong> ' + link.getLength().toFixed(0) + ' m<br />'; html += '</div>'; - lineinfo.innerHTML = html; + linkinfo.innerHTML = html; //##// var pos = new GControlPosition(G_ANCHOR_BOTTOM_RIGHT, new GSize(180, 0)); -//##// pos.apply(lineinfo); - lineinfo.style.visibility = "visible"; +//##// pos.apply(linkinfo); + linkinfo.style.visibility = "visible"; } function Link(element) { |