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

View File

@@ -195,8 +195,12 @@ OpenLayers.Tile = OpenLayers.Class({
setBounds: function(bounds) {
bounds = bounds.clone();
if (this.layer.map.baseLayer.wrapDateLine) {
var worldExtent = this.layer.map.getMaxExtent();
bounds = bounds.wrapDateLine(worldExtent);
var worldExtent = this.layer.map.getMaxExtent(),
tolerance = this.layer.map.getResolution();
bounds = bounds.wrapDateLine(worldExtent, {
leftTolerance: tolerance,
rightTolerance: tolerance
});
}
this.bounds = bounds;
},