diff options
author | Christian Pointner <equinox@ffgraz.net> | 2008-12-05 15:11:33 +0000 |
---|---|---|
committer | Christian Pointner <equinox@ffgraz.net> | 2008-12-05 15:11:33 +0000 |
commit | b8426972bbda6aca2a4f29d6f5ab55429430f923 (patch) | |
tree | baca1238f0fc6ff7849c97bc2cb4c6f94a90627c /map.js | |
parent | 7eee8168e478919606eba5821c661fa32a43c147 (diff) |
moved button style to map.css
Diffstat (limited to 'map.js')
-rw-r--r-- | map.js | 28 |
1 files changed, 8 insertions, 20 deletions
@@ -98,6 +98,8 @@ function onData(data, responseCode) { return alert("Fehler: Konnte die Daten nicht laden!\n(Server Antwort-Code: " + responseCode + ")"); } xmlData = GXml.parse(fetchData); + + // TODO: add data import } function addNewNodeText(point) { @@ -183,7 +185,7 @@ RulerControl.prototype.initialize = function(map) { dist= (parseInt(dist)/1000).toFixed(1) + " km"; } distText.data = dist; - poly = new GPolyline(line,'#FFFF00', 8, 1) + var poly = new GPolyline(line,'#FFFF00', 8, 1) poly.overlaytype = "ruler"; poly.overlaysubtype = "line"; map.addOverlay(poly); @@ -199,12 +201,12 @@ RulerControl.prototype.initialize = function(map) { } var container = document.createElement("div"); - var zoomInDiv = document.createElement("div"); - this.setButtonStyle_(zoomInDiv); - container.appendChild(zoomInDiv); + var btnDiv = document.createElement("div"); + btnDiv.className = "btn"; + container.appendChild(btnDiv); distText = document.createTextNode("Entfernung messen"); - zoomInDiv.appendChild(distText); - GEvent.addDomListener(zoomInDiv, "click", function() { + btnDiv.appendChild(distText); + GEvent.addDomListener(btnDiv, "click", function() { for(var o in overlays["ruler"]) { if(overlays["ruler"][o]) { clr(); @@ -234,17 +236,3 @@ RulerControl.prototype.initialize = function(map) { RulerControl.prototype.getDefaultPosition = function() { return new GControlPosition(G_ANCHOR_BOTTOM_LEFT, new GSize(7, 7)); } - -RulerControl.prototype.setButtonStyle_ = function(button) { - button.style.textDecoration = "underline"; - button.style.color = "#0000cc"; - button.style.backgroundColor = "white"; - button.style.font = "small Arial"; - button.style.border = "1px solid black"; - button.style.padding = "2px"; - button.style.marginBottom = "3px"; - button.style.textAlign = "center"; - button.style.width = "10em"; - button.style.cursor = "pointer"; -} - |