summaryrefslogtreecommitdiff
path: root/static/edit_map.js
diff options
context:
space:
mode:
authoretienne <etienne@9215b0d5-fb2c-4bbd-8d3e-bd2e9090e864>2009-01-14 00:05:56 +0000
committeretienne <etienne@9215b0d5-fb2c-4bbd-8d3e-bd2e9090e864>2009-01-14 00:05:56 +0000
commit0d1b6ecd08c24cca9aa283fcb4f30a456899a5f3 (patch)
tree765ee8b20f577a8e6756c3403bf471451c9aa296 /static/edit_map.js
parent5577411f505db728e778a9bda8cd8a958c805317 (diff)
downloadChimè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/edit_map.js')
-rw-r--r--static/edit_map.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/static/edit_map.js b/static/edit_map.js
index 6aedc73..fa13dbb 100644
--- a/static/edit_map.js
+++ b/static/edit_map.js
@@ -58,7 +58,6 @@ function init(){
controls:[new OpenLayers.Control.Navigation(),
new OpenLayers.Control.PanZoomBar(),
new OpenLayers.Control.Attribution()],
- maxExtent: maxExtent,
maxResolution: 156543.0399,
units: 'm',
projection: epsg_projection,
@@ -67,7 +66,10 @@ function init(){
layerMarkers.setOpacity(0.5);
map.addLayers([layerMapnik, layerMarkers]);
map.events.register('click', map, setMarker);
- map.setCenter(centerLonLat, 12);
+ /* zoom to the appropriate extent */
+ if (!zoomToCurrentExtent(map)){
+ map.setCenter(centerLonLat, 12);
+ }
}