diff options
Diffstat (limited to 'static/main_map.js')
-rw-r--r-- | static/main_map.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/static/main_map.js b/static/main_map.js index 7cc80a6..1849713 100644 --- a/static/main_map.js +++ b/static/main_map.js @@ -357,7 +357,7 @@ function createParams(center, zoom, layers) { /* main initialisation function */ function init(){ /* set the main map */ - map = new OpenLayers.Map('map', { + var options = { controls:[new OpenLayers.Control.Navigation(), new OpenLayers.Control.PanPanel(), new OpenLayers.Control.ZoomPanel(), @@ -365,8 +365,10 @@ function init(){ maxResolution: 156543.0399, units: 'm', projection: new OpenLayers.Projection('EPSG:4326'), - theme:null - }); + theme:null, + }; + if (restricted_extent){options['restrictedExtent'] = restricted_extent;} + map = new OpenLayers.Map('map', options); permalink = new OpenLayers.Control.Permalink("permalink"); permalink.createParams = createParams; map.addControl(permalink); |