diff options
Diffstat (limited to 'static/edit_route_map.js')
-rw-r--r-- | static/edit_route_map.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/static/edit_route_map.js b/static/edit_route_map.js index 491f811..dcf7c84 100644 --- a/static/edit_route_map.js +++ b/static/edit_route_map.js @@ -82,7 +82,7 @@ var pathModify = new OpenLayers.Control.ModifyFeature(vectors, /* 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(), @@ -93,7 +93,10 @@ 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); + vectors.setOpacity(0.5); map.addLayers([map_layer, vectors]); /* zoom to the appropriate extent */ |