Set extent information for the marker layer.
authorTom Hughes <tom@compton.nu>
Fri, 7 Dec 2007 00:15:21 +0000 (00:15 +0000)
committerTom Hughes <tom@compton.nu>
Fri, 7 Dec 2007 00:15:21 +0000 (00:15 +0000)
public/javascripts/map.js

index 32745c7feee0e21cce6eedf405f38c38499d8973..729cd78ff08486c912bf44d55895ebe38dd1fe2b 100644 (file)
@@ -16,7 +16,13 @@ function createMap(divName) {
    map.addLayer(osmarender);
 
    var numZoomLevels = Math.max(mapnik.numZoomLevels, osmarender.numZoomLevels);
-   markers = new OpenLayers.Layer.Markers("Markers", { visibility: false, numZoomLevels: numZoomLevels });
+   markers = new OpenLayers.Layer.Markers("Markers", { 
+      visibility: false, numZoomLevels: numZoomLevels,
+      maxExtent: new OpenLayers.Bounds(-20037508,-20037508,20037508,20037508),
+      maxResolution: 156543,
+      units: "m",
+      projection: "EPSG:41001"
+   });
    map.addLayer(markers);
 
    map.addControl(new OpenLayers.Control.LayerSwitcher());