diff --git a/lib/OpenLayers/Layer.js b/lib/OpenLayers/Layer.js index 0dec1ad3b9..2fb891336d 100644 --- a/lib/OpenLayers/Layer.js +++ b/lib/OpenLayers/Layer.js @@ -297,10 +297,7 @@ OpenLayers.Layer = OpenLayers.Class({ /** * APIProperty: wrapDateLine - * {Boolean} Wraps the world at the international dateline, so the map can - * be panned infinitely in longitudinal direction. Only use this on the - * base layer, and only if the layer's maxExtent equals the world bounds. - * #487 for more info. + * {Boolean} #487 for more info. */ wrapDateLine: false, diff --git a/lib/OpenLayers/Layer/Grid.js b/lib/OpenLayers/Layer/Grid.js index 090168ebcb..243de05a14 100644 --- a/lib/OpenLayers/Layer/Grid.js +++ b/lib/OpenLayers/Layer/Grid.js @@ -247,11 +247,7 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { // *partially* contained by our tiles (IE user has // programmatically panned to the other side of the earth) // then we want to reTile (thus, partial true). - // - var maxExtent = this.map.getMaxExtent(), - bl = new OpenLayers.LonLat(bounds.left, bounds.bottom).wrapDateLine(maxExtent), - tr = new OpenLayers.LonLat(bounds.right, bounds.top).wrapDateLine(maxExtent); - bounds = new OpenLayers.Bounds(bl.lon, bl.lat, tr.lon, tr.lat); + // if (forceReTile || !tilesBounds.containsBounds(bounds, true)) { this.initGriddedTiles(bounds); } else { diff --git a/lib/OpenLayers/Renderer/SVG.js b/lib/OpenLayers/Renderer/SVG.js index aea3bf2be8..f7f53bf08e 100644 --- a/lib/OpenLayers/Renderer/SVG.js +++ b/lib/OpenLayers/Renderer/SVG.js @@ -133,14 +133,6 @@ OpenLayers.Renderer.SVG = OpenLayers.Class(OpenLayers.Renderer.Elements, { this.translate(0, 0); return true; } else { - var maxExtent = this.map.getMaxExtent(), - width = maxExtent.getWidth() / resolution; - if (extent.left < maxExtent.left) { - extent.left += width; - } - if (extent.right > maxExtent.right) { - extent.left -= width; - } var inRange = this.translate(left - this.left, top - this.top); if (!inRange) { // recenter the coordinate system diff --git a/tests/manual/dateline-sketch.html b/tests/manual/dateline-sketch.html index b97e45202f..62d4391324 100644 --- a/tests/manual/dateline-sketch.html +++ b/tests/manual/dateline-sketch.html @@ -22,29 +22,18 @@ var map; function init(){ - var maxExtent = new OpenLayers.Bounds(-20037508, -20037508, 20037508, 20037508), - maxResolution = 156543.0339; - - var options = { - projection: new OpenLayers.Projection("EPSG:900913"), - displayProjection: new OpenLayers.Projection("EPSG:4326"), - units: "m", - numZoomLevels: 18, - maxResolution: maxResolution, - maxExtent: maxExtent - }; - map = new OpenLayers.Map('map', options); + map = new OpenLayers.Map('map'); - var dummy = new OpenLayers.Layer( - "dummy", - {isBaseLayer: true, wrapDateLine: true} + var gmap = new OpenLayers.Layer.Google( + "Google Streets", + {sphericalMercator: true} ); var vector = new OpenLayers.Layer.Vector("Editable Vectors"); - map.addLayers([dummy, vector]); + map.addLayers([gmap, vector]); map.addControl(new OpenLayers.Control.EditingToolbar(vector)); - var extent = new OpenLayers.Bounds(15849982.183008, -11368938.517442, -14206280.326992, -1350184.3474418); + var extent = new OpenLayers.Bounds(-24225034.496992, -11368938.517442, -14206280.326992, -1350184.3474418); map.zoomToExtent(extent); }