diff --git a/lib/OpenLayers/Layer/Grid.js b/lib/OpenLayers/Layer/Grid.js index 7d9ffd0d39..fda975b16e 100644 --- a/lib/OpenLayers/Layer/Grid.js +++ b/lib/OpenLayers/Layer/Grid.js @@ -184,9 +184,10 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { * APIProperty: removeBackBufferDelay * {Number} Delay for removing the backbuffer when all tiles have finished * loading. Can be set to 0 when no css opacity transitions for the - * olTileImage class are used. Default is 2500. + * olTileImage class are used. Default is 0 for layers, + * 2500 for tiled layers. */ - removeBackBufferDelay: 2500, + removeBackBufferDelay: null, /** * Property: className @@ -240,6 +241,10 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { arguments); this.grid = []; this.tileQueue = []; + + if (this.removeBackBufferDelay === null) { + this.removeBackBufferDelay = this.singleTile ? 0 : 2500; + } if (this.className === null) { this.className = this.singleTile ? 'olLayerGridSingleTile' :