From 8b744670bfb9f72c2d52d5373c43dcd5ce5e959a Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sun, 7 Dec 2008 01:02:36 +0000 Subject: added add location info text --- map.js | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/map.js b/map.js index 6a4d1ab..499456a 100644 --- a/map.js +++ b/map.js @@ -259,11 +259,6 @@ function makeWeight(value) { } } -function addNewNodeText(point) { - var html = "adding location at:
\n" + point; - return html; -} - function makeIcon(type) { var icon = new GIcon(); @@ -308,6 +303,31 @@ function showElements(elements) { if(elements.select(o)) elements.overlays[o].show(); } + +function addNewNodeText(point) { + var x_startpoint = 4080; + var lng_startpoint = 15.43844103813; + var dx_dlng = 50675.5176; + var y_startpoint = 4806; + var lat_startpoint = 47.07177327969; + var dy_dlat = 75505.521; + + var pixel_x = parseInt(Math.floor(x_startpoint + (point.x - lng_startpoint) * dx_dlng)); + var pixel_y = parseInt(Math.floor(y_startpoint - (point.y - lat_startpoint) * dy_dlat)); + + var link = 'https://manman.graz.funkfeuer.at/location/new?'; + link += 'z_x=' + Math.floor(pixel_x % 100) + '&z_y=' + Math.floor(pixel_y % 100); + link += '&c=' + Math.floor(pixel_x / 100) + '&r=' + Math.floor(pixel_y / 100); + + var html = 'Neuen Knoten eintragen
Nutzen sie den Zoombereich aus!
'; + html += ''; + html += ''; + html += ''; + html += '' + html += '
Location pinnen: Link
Breitengrad: ' + convertCoords(point.y) + '
Längengrad: ' + convertCoords(point.x)+ '
'; + return html; +} + function setNewMarker(point) { var marker = new GMarker(point,{icon: makeIcon('newnode'), draggable: true}); GEvent.addListener(marker, "dragstart", -- cgit v1.2.1