From: Tom Hughes Date: Fri, 7 Dec 2007 00:15:21 +0000 (+0000) Subject: Set extent information for the marker layer. X-Git-Tag: live~8006 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/1e9483fe727e365496912fbd83a6b3c2e062bcad Set extent information for the marker layer. --- diff --git a/public/javascripts/map.js b/public/javascripts/map.js index 32745c7fe..729cd78ff 100644 --- a/public/javascripts/map.js +++ b/public/javascripts/map.js @@ -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());