in single tile mode with no transition effect remove the back buffer when zooming

This commit is contained in:
Éric Lemoine
2011-10-28 22:57:10 +02:00
parent 46de595f55
commit 2f80d52bfd
2 changed files with 54 additions and 0 deletions

View File

@@ -274,13 +274,28 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, {
// We want to redraw whenever even the slightest part of the
// current bounds is not contained by our tile.
// (thus, we do not specify partial -- its default is false)
if ( forceReTile ||
(!dragging && !tilesBounds.containsBounds(bounds))) {
// In single tile mode with no transition effect, we insert
// a non-scaled backbuffer when the layer is moved. But if
// a zoom occurs right after a move, i.e. before the new
// image is received, we need to remove the backbuffer, or
// an ill-positioned image will be visible during the zoom
// transition.
if(lastResolution !== serverResolution &&
this.transitionEffect !== 'resize') {
this.removeBackBuffer();
}
if(lastResolution === serverResolution ||
(lastResolution &&
this.transitionEffect === 'resize')) {
this.applyBackBuffer(serverResolution);
}
this.initSingleTile(bounds);
}
} else {