From 93029ab7aae42c0cce38173cbdc3ecc1b3257e76 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Fri, 11 Apr 2008 17:54:51 +0000 Subject: [PATCH] Turn on wrapDateLine for all layers. Also correct the declared projection for the markers layer. --- public/javascripts/map.js | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/public/javascripts/map.js b/public/javascripts/map.js index 369df8987..fb952daf2 100644 --- a/public/javascripts/map.js +++ b/public/javascripts/map.js @@ -17,22 +17,32 @@ function createMap(divName) { ] }); - var mapnik = new OpenLayers.Layer.OSM.Mapnik("Mapnik", { displayOutsideMaxExtent: true }); + var mapnik = new OpenLayers.Layer.OSM.Mapnik("Mapnik", { + displayOutsideMaxExtent: true, + wrapDateLine: true + }); map.addLayer(mapnik); - var osmarender = new OpenLayers.Layer.OSM.Osmarender("Osmarender", { displayOutsideMaxExtent: true }); + var osmarender = new OpenLayers.Layer.OSM.Osmarender("Osmarender", { + displayOutsideMaxExtent: true, + wrapDateLine: true + }); map.addLayer(osmarender); - var maplint = new OpenLayers.Layer.OSM.Maplint("Maplint", { displayOutsideMaxExtent: true }); + var maplint = new OpenLayers.Layer.OSM.Maplint("Maplint", { + displayOutsideMaxExtent: true, + wrapDateLine: true + }); map.addLayer(maplint); var numZoomLevels = Math.max(mapnik.numZoomLevels, osmarender.numZoomLevels); markers = new OpenLayers.Layer.Markers("Markers", { - displayInLayerSwitcher: false, numZoomLevels: numZoomLevels, + displayInLayerSwitcher: false, + numZoomLevels: numZoomLevels, maxExtent: new OpenLayers.Bounds(-20037508,-20037508,20037508,20037508), maxResolution: 156543, units: "m", - projection: "EPSG:41001" + projection: "EPSG:900913", }); map.addLayer(markers); -- 2.39.5