diff --git a/lib/OpenLayers/Layer/Grid.js b/lib/OpenLayers/Layer/Grid.js index cdb6c42835..87b79d87cf 100644 --- a/lib/OpenLayers/Layer/Grid.js +++ b/lib/OpenLayers/Layer/Grid.js @@ -65,7 +65,13 @@ OpenLayers.Layer.Grid.prototype = Object.extend( new OpenLayers.Layer(), { } if (!this.grid || zoomChanged) { this._initTiles(); - } else { + } else if ( bounds.top > this.getGridBounds().bottom || + bounds.left > this.getGridBounds().right || + bounds.right < this.getGridBounds().left || + bounds.bottom < this.getGridBounds().top ) { + this._initTiles(); + + } else { var i = 0; while (this.getGridBounds().bottom > bounds.bottom) { this.insertRow(false);