summaryrefslogtreecommitdiff
path: root/static/main_map.js
diff options
context:
space:
mode:
Diffstat (limited to 'static/main_map.js')
-rw-r--r--static/main_map.js6
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);
}