diff options
Diffstat (limited to 'static/edit_map.js')
| -rw-r--r-- | static/edit_map.js | 6 | 
1 files changed, 4 insertions, 2 deletions
| diff --git a/static/edit_map.js b/static/edit_map.js index d9b9f12..8f37f6b 100644 --- a/static/edit_map.js +++ b/static/edit_map.js @@ -59,7 +59,7 @@ var putMarker = function (lonlat, zoom){  /* main initialisation function */  function init(){ -    map = new OpenLayers.Map ('map_edit', { +    var options = {          controls:[new OpenLayers.Control.Navigation(),                      new OpenLayers.Control.PanPanel(),                      new OpenLayers.Control.ZoomPanel(), @@ -68,7 +68,9 @@ function init(){          units: 'm',          projection: epsg_projection,          displayProjection: epsg_display_projection -    } ); +    }; +    if (restricted_extent){options['restrictedExtent'] = restricted_extent;} +    map = new OpenLayers.Map ('map_edit', options);      layerMarkers.setOpacity(0.5);      map.addLayers([map_layer, layerMarkers]);      map.events.register('click', map, setMarker); | 
