diff options
Diffstat (limited to 'static/edit_map.js')
| -rw-r--r-- | static/edit_map.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/static/edit_map.js b/static/edit_map.js index fa13dbb..4799341 100644 --- a/static/edit_map.js +++ b/static/edit_map.js @@ -50,6 +50,10 @@ var putMarker = function (lonlat){ ' ' + lonlat.lat + ')'; document.getElementById('live_latitude').value = lonlat.lon; document.getElementById('live_longitude').value = lonlat.lat; + /*zoom to the point*/ + var bounds = layerMarkers.getDataExtent(); + if (bounds) map.zoomToExtent(bounds); + return; } /* main initialisation function */ |
