summaryrefslogtreecommitdiff
path: root/static/edit_map.js
diff options
context:
space:
mode:
Diffstat (limited to 'static/edit_map.js')
-rw-r--r--static/edit_map.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/static/edit_map.js b/static/edit_map.js
index 6aedc73..fa13dbb 100644
--- a/static/edit_map.js
+++ b/static/edit_map.js
@@ -58,7 +58,6 @@ function init(){
controls:[new OpenLayers.Control.Navigation(),
new OpenLayers.Control.PanZoomBar(),
new OpenLayers.Control.Attribution()],
- maxExtent: maxExtent,
maxResolution: 156543.0399,
units: 'm',
projection: epsg_projection,
@@ -67,7 +66,10 @@ function init(){
layerMarkers.setOpacity(0.5);
map.addLayers([layerMapnik, layerMarkers]);
map.events.register('click', map, setMarker);
- map.setCenter(centerLonLat, 12);
+ /* zoom to the appropriate extent */
+ if (!zoomToCurrentExtent(map)){
+ map.setCenter(centerLonLat, 12);
+ }
}