use tolerance for correct tile bounds shifting

This commit is contained in:
ahocevar
2011-09-29 13:39:16 -06:00
parent 0277eb1ed3
commit 23a17fc355
+6 -2
View File
@@ -195,8 +195,12 @@ OpenLayers.Tile = OpenLayers.Class({
setBounds: function(bounds) { setBounds: function(bounds) {
bounds = bounds.clone(); bounds = bounds.clone();
if (this.layer.map.baseLayer.wrapDateLine) { if (this.layer.map.baseLayer.wrapDateLine) {
var worldExtent = this.layer.map.getMaxExtent(); var worldExtent = this.layer.map.getMaxExtent(),
bounds = bounds.wrapDateLine(worldExtent); tolerance = this.layer.map.getResolution();
bounds = bounds.wrapDateLine(worldExtent, {
leftTolerance: tolerance,
rightTolerance: tolerance
});
} }
this.bounds = bounds; this.bounds = bounds;
}, },