summaryrefslogtreecommitdiff
path: root/chimere/static/base.js
diff options
context:
space:
mode:
Diffstat (limited to 'chimere/static/base.js')
-rw-r--r--chimere/static/base.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/chimere/static/base.js b/chimere/static/base.js
index 91710af..91ec310 100644
--- a/chimere/static/base.js
+++ b/chimere/static/base.js
@@ -58,7 +58,9 @@ function saveExtent() {
if(!map) return;
var extent_key = 'MAP_EXTENT';
if (area_name){ extent_key = extent_key + '_' + area_name; }
- document.cookie = extent_key + "=" + map.getExtent().toArray().join('_')
+ var extent = map.getExtent().transform(map.getProjectionObject(),
+ epsg_display_projection);
+ document.cookie = extent_key + "=" + extent.toArray().join('_')
+ ';path="/"';
}
@@ -89,11 +91,11 @@ function zoomToCurrentExtent(map){
else if (OpenLayers && default_area && default_area.length == 4){
extent = new OpenLayers.Bounds(default_area[0], default_area[1],
default_area[2], default_area[3]);
- extent.transform(epsg_display_projection, epsg_projection);
}
else{
return;
}
+ extent.transform(epsg_display_projection, epsg_projection);
map.zoomToExtent(extent, true);
return true;
}