summaryrefslogtreecommitdiff
path: root/map.js
diff options
context:
space:
mode:
authorChristian Pointner <equinox@ffgraz.net>2008-12-07 22:29:59 +0000
committerChristian Pointner <equinox@ffgraz.net>2008-12-07 22:29:59 +0000
commit743233e0d4dc261e4a4ab78220b7ddc4593b273e (patch)
tree9c64aef03d28830418b75d3d7f6f37e2813ff170 /map.js
parent955a17ebe8b6527ad5531afafeba07fd3e160140 (diff)
added zoomin button to new location text
Diffstat (limited to 'map.js')
-rw-r--r--map.js16
1 files changed, 11 insertions, 5 deletions
diff --git a/map.js b/map.js
index 0c7c6f5..6edc21c 100644
--- a/map.js
+++ b/map.js
@@ -305,6 +305,9 @@ function showElements(elements) {
if(elements.select(o)) elements.overlays[o].show();
}
+function centerAndZoom(lat, lng) {
+ map.setCenter(new GLatLng(lat, lng), 17);
+}
function addNewNodeText(point) {
var x_startpoint = 4080;
@@ -321,11 +324,14 @@ function addNewNodeText(point) {
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 = '<b>Neuen Knoten eintragen<br />Nutzen sie den Zoombereich aus!<br /></b>';
- html += '<table>';
- html += '<tr><td>Location pinnen:</td><td>&nbsp;</td><td><a href="'+link +'">Link</a></td></tr>';
- html += '<tr><td>Breitengrad:</td><td>&nbsp;</td><td>' + convertCoords(point.y) + '</td></tr>';
- html += '<tr><td>Längengrad:</b></td><td>&nbsp;</td><td>' + convertCoords(point.x)+ '</td></tr>'
+ var html = '<b>Neuen Knoten eintragen<br />Nutzen sie den Zoombereich aus!</b><br /><br />';
+ html += '<table width="100%">';
+ html += '<tr><td>Breitengrad:</td><td>&nbsp;</td><td>' + convertCoords(point.y) + '</td><td>&nbsp;</td>';
+ html += '<td><form action="#" onsubmit="return false"><input type="button" value="hineinzoomen" ';
+ html += 'onclick="javascript:centerAndZoom(' + point.y + ',' + point.x + ')" /></form></td></tr>';
+ html += '<tr><td>Längengrad:</b></td><td>&nbsp;</td><td>' + convertCoords(point.x)+ '</td><td>&nbsp;</td>';
+ html += '<td><form action="#" onsubmit="return false"><input type="button" value="Standort eintragen" ';
+ html += 'onclick="window.open(\'' + link + '\')" /></form></td></tr>';
html += '</table>';
return html;
}