diff options
author | Christian Pointner <equinox@ffgraz.net> | 2008-12-07 22:29:59 +0000 |
---|---|---|
committer | Christian Pointner <equinox@ffgraz.net> | 2008-12-07 22:29:59 +0000 |
commit | 743233e0d4dc261e4a4ab78220b7ddc4593b273e (patch) | |
tree | 9c64aef03d28830418b75d3d7f6f37e2813ff170 /map.js | |
parent | 955a17ebe8b6527ad5531afafeba07fd3e160140 (diff) |
added zoomin button to new location text
Diffstat (limited to 'map.js')
-rw-r--r-- | map.js | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -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> </td><td><a href="'+link +'">Link</a></td></tr>'; - html += '<tr><td>Breitengrad:</td><td> </td><td>' + convertCoords(point.y) + '</td></tr>'; - html += '<tr><td>Längengrad:</b></td><td> </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> </td><td>' + convertCoords(point.y) + '</td><td> </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> </td><td>' + convertCoords(point.x)+ '</td><td> </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; } |