summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@ffgraz.net>2013-12-29 17:28:09 +0000
committerChristian Pointner <equinox@ffgraz.net>2013-12-29 17:28:09 +0000
commit8f4c420a1bbfadf0625555362b984f466071639c (patch)
treedb847701a8ffa720bd1b7a7181d82972e568b536
parent48920f78029b3900508a281e2be304a1ae283c2f (diff)
whitespace cleanups
fixed lines[]
-rw-r--r--map3.js92
1 files changed, 46 insertions, 46 deletions
diff --git a/map3.js b/map3.js
index fe1ccdd..e76cfb7 100644
--- a/map3.js
+++ b/map3.js
@@ -21,12 +21,12 @@ function initialize(lat, lng, res) {
var mapOptions = {
center: new google.maps.LatLng(lat, lng),
zoom: res,
- streetViewControl: false,
+ streetViewControl: false,
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,
- }
+ style: google.maps.MapTypeControlStyle.HORIZONTAL_BAR,
+ }
};
map = new google.maps.Map(document.getElementById("map"),
mapOptions);
@@ -59,18 +59,18 @@ function initialize(lat, lng, res) {
//##// 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, "addoverlay", onAddOverlay);
- google.maps.event.addListener(map, "zoomend", onZoom);
- google.maps.event.addListener(map, "click", onMapClick);
-
+ google.maps.event.addListener(map, "addoverlay", onAddOverlay);
+ google.maps.event.addListener(map, "zoomend", onZoom);
+ google.maps.event.addListener(map, "click", onMapClick);
+
lineinfo = document.createElement("div");
document.getElementById("map").appendChild(lineinfo);
lineinfo.style.visibility = "hidden"
-
+
dnsinfo = document.createElement("div");
document.getElementById("map").appendChild(dnsinfo);
dnsinfo.style.visibility = "hidden"
-
+
//##// var mt = map.getMapTypes();
//##// for (var i=0; i<mt.length; i++) {
//##// mt[i].getMinimumResolution = function() {return 0;}
@@ -95,7 +95,7 @@ function onAddOverlay(overlay) {
if(overlays["newmarker"]) {
map.removeOverlay(overlays["newmarker"]);
}
- overlays["newmarker"] = overlay;
+ overlays["newmarker"] = overlay;
break;
}
case "ruler": {
@@ -154,11 +154,11 @@ function onData(data) {
}
if (xmlData) {
- var element = xmlData.getElementsByTagName("count");
- var count = element[0].getAttribute("number");
- countboxText.data = "Aktiv: " + count;
+ var element = xmlData.getElementsByTagName("count");
+ var count = element[0].getAttribute("number");
+ countboxText.data = "Aktiv: " + count;
}
-
+
//##// reloadcon.finished();
}
@@ -223,8 +223,8 @@ function onLocationClick(latlng) {
}
html += '<tr><td> Router:</td><td>&nbsp;</td><td><a href="http://' + link+ '.ext.graz.funkfeuer.at/" target="_blank">'+dnsname[i]+'</td></tr>';
}
- }
- }
+ }
+ }
html += '</table>';
html += '</div>';
var infowindow = new google.maps.InfoWindow({content: html});
@@ -246,8 +246,8 @@ function onLineClick(line,latlng) {
}
html += '<tr><td> Router:</td><td>&nbsp;</td><td><a href="http://' + link+ '.ext.graz.funkfeuer.at/" target="_blank">'+dnsfrom[i]+'</td></tr>';
}
- }
-
+ }
+
if(line.dnsto){
var dnsto = line.dnsto.split(";");
for (var i = 0;i < dnsto.length; ++i){
@@ -281,7 +281,7 @@ function drawLinks(xmlData) {
state="Unbekannt"
var id = element[i].getAttribute("from") + "-" + element[i].getAttribute("to");
links[id] = new Link(element[i]);
-
+
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.textcolor = textcolor;
@@ -292,14 +292,14 @@ 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() { lineinfo.style.visibility = "hidden"; });
google.maps.event.addListener(line, "mouseover", function(point) { showLinkInfo(this, point)});
google.maps.event.addListener(line, "click", function(point){onLineClick(this,point)});
-// google.maps.event.addListener(line, "click", function(latlng){map.openInfoWindowHtml(latlng, message)});
-
+// google.maps.event.addListener(line, "click", function(latlng){map.openInfoWindowHtml(latlng, message)});
+
line.setMap(map);
- lines.push(marker);
- }
+ lines.push(line);
+ }
if(document.visibleform.elements["defaultroute"].checked) {
toggleVisible("defaultroute");
}
@@ -361,7 +361,7 @@ function drawLinks(xmlData) {
toggleVisible("5channel");
}
if(document.visibleform.elements["undef"].checked) {
- toggleVisible("undef");
+ toggleVisible("undef");
}
}
function showLinkInfo(link, point) {
@@ -370,7 +370,7 @@ function showLinkInfo(link, point) {
html += '<strong>Frequenz:</strong> ' + links[link.name].frequence + '<br />';
} else {
html += '<strong>Frequenz:</strong> undef <br />';
- }
+ }
if(links[link.name].channel !== "undef") {
html += '<strong>Kanal:</strong> ' + links[link.name].channel + '<br />';
} else {
@@ -448,13 +448,13 @@ function makeIcon(type) {
case 'offline': url = "./img/marker_offline.png"; break;
}
return {
- 'url': url,
- // This marker is 20 pixels wide by 32 pixels tall.
- size: new google.maps.Size(12, 20),
- // The origin for this image is 0,0.
- origin: new google.maps.Point(0,0),
- // The anchor for this image is the base of the flagpole at 0,32.
- anchor: new google.maps.Point(6, 20)
+ 'url': url,
+ // This marker is 20 pixels wide by 32 pixels tall.
+ size: new google.maps.Size(12, 20),
+ // The origin for this image is 0,0.
+ origin: new google.maps.Point(0,0),
+ // The anchor for this image is the base of the flagpole at 0,32.
+ anchor: new google.maps.Point(6, 20)
};
}
@@ -476,7 +476,7 @@ function toggleVisible(element) {
document.visibleform.elements["channel12"].checked=false;
document.visibleform.elements["channel13"].checked=false;
document.visibleform.elements["5channel"].checked=false;
- document.visibleform.elements["undef"].checked=false;
+ document.visibleform.elements["undef"].checked=false;
}
if (element=='2.4channel'){
document.visibleform.elements["channel1"].checked=document.visibleform.elements["2.4channel"].checked;
@@ -568,16 +568,16 @@ function addNewNodeText(point) {
return html;
}
-function setNewMarker(point) {
+function setNewMarker(point) {
/*
var marker = new GMarker(point,{icon: makeIcon('newnode'), draggable: true});
- google.maps.event.addListener(marker, "dragstart",
+ google.maps.event.addListener(marker, "dragstart",
function() {
this.autoclosed = true;
this.closeInfoWindow();
});
- google.maps.event.addListener(marker, "dragend",
+ google.maps.event.addListener(marker, "dragend",
function(point) {
this.openInfoWindowHtml(addNewNodeText(point));
});
@@ -596,13 +596,13 @@ function setNewMarker(point) {
map.addOverlay(marker);
marker.openInfoWindowHtml(addNewNodeText(point));
*/
- var marker = new GMarker(point,makeIcon('newnode'));
- google.maps.event.addListener(marker,"infowindowclose",function () {
+ var marker = new GMarker(point,makeIcon('newnode'));
+ google.maps.event.addListener(marker,"infowindowclose",function () {
map.removeOverlay(marker);
- });
-
- map.addOverlay(marker);
- marker.openInfoWindowHtml(addNewNodeText(point));
+ });
+
+ map.addOverlay(marker);
+ marker.openInfoWindowHtml(addNewNodeText(point));
}
function fflogin(username, password) {
@@ -681,7 +681,7 @@ function showFFLogout(username) {
function showAddress(address) {
if (geocoder) {
// address += ", Graz, Austria";
- geocoder.getLatLng(address,
+ geocoder.getLatLng(address,
function(point) {
if (!point) {
alert(address + " nicht gefunden");
@@ -707,7 +707,7 @@ function showAddress(address) {
//##// btnText = document.createTextNode("Daten neu laden");
//##// btnDiv.appendChild(btnText);
//##// google.maps.event.addDomListener(btnDiv, "click", function() {
-//##// reloadcon.started();
+//##// reloadcon.started();
//##// GDownloadUrl("data.php", onData);
//##// });
//##//
@@ -782,7 +782,7 @@ function showAddress(address) {
//##// return;
//##// }
//##// }
-//##//
+//##//
//##// btnText.data = "Messung beenden";
//##// distText.data = "Entfernung: 0 m";
//##// distBox.style.visibility = "visible";