diff options
| author | etienne <etienne@9215b0d5-fb2c-4bbd-8d3e-bd2e9090e864> | 2010-01-20 00:20:58 +0000 |
|---|---|---|
| committer | etienne <etienne@9215b0d5-fb2c-4bbd-8d3e-bd2e9090e864> | 2010-01-20 00:20:58 +0000 |
| commit | 3a8e39a3968703d9c6aa73a26e4f41ff9bbd1e7f (patch) | |
| tree | f0fe33326adeb1cf217bf514dc37286910e5fd16 /static/edit_map.js | |
| parent | 37540d7359a3baff84de23a9ead2b72244accbde (diff) | |
| download | Chimère-3a8e39a3968703d9c6aa73a26e4f41ff9bbd1e7f.tar.bz2 Chimère-3a8e39a3968703d9c6aa73a26e4f41ff9bbd1e7f.zip | |
Add a configuration option to restric the map to a revelant box - #71
git-svn-id: http://www.peacefrogs.net/svn/chimere/trunk@52 9215b0d5-fb2c-4bbd-8d3e-bd2e9090e864
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); |
