diff options
author | etienne <etienne@9215b0d5-fb2c-4bbd-8d3e-bd2e9090e864> | 2009-01-14 00:05:56 +0000 |
---|---|---|
committer | etienne <etienne@9215b0d5-fb2c-4bbd-8d3e-bd2e9090e864> | 2009-01-14 00:05:56 +0000 |
commit | 0d1b6ecd08c24cca9aa283fcb4f30a456899a5f3 (patch) | |
tree | 765ee8b20f577a8e6756c3403bf471451c9aa296 /static/main_map.js | |
parent | 5577411f505db728e778a9bda8cd8a958c805317 (diff) | |
download | Chimère-0d1b6ecd08c24cca9aa283fcb4f30a456899a5f3.tar.bz2 Chimère-0d1b6ecd08c24cca9aa283fcb4f30a456899a5f3.zip |
Keep zoom level and bounds between pages
git-svn-id: http://www.peacefrogs.net/svn/chimere/trunk@13 9215b0d5-fb2c-4bbd-8d3e-bd2e9090e864
Diffstat (limited to 'static/main_map.js')
-rw-r--r-- | static/main_map.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/static/main_map.js b/static/main_map.js index adb97c1..6370117 100644 --- a/static/main_map.js +++ b/static/main_map.js @@ -239,7 +239,6 @@ function init(){ controls:[new OpenLayers.Control.Navigation(), new OpenLayers.Control.PanZoomBar(), new OpenLayers.Control.ScaleLine()], - maxExtent: maxExtent, maxResolution: 156543.0399, units: 'm', projection: new OpenLayers.Projection('EPSG:4326') @@ -247,6 +246,9 @@ function init(){ /*projection: new OpenLayers.Projection('EPSG:900913'), displayProjection: new OpenLayers.Projection('EPSG:4326')*/ map.addLayers([layerMapnik, cyclemap]); + /* zoom to the appropriate extent */ + if (!zoomToCurrentExtent(map)){ + map.setCenter(centerLonLat, 12); + } loadGeoObjects(); - map.setCenter(centerLonLat, 12); } |