diff --git a/lib/OpenLayers/Layer/Grid.js b/lib/OpenLayers/Layer/Grid.js index 60e69de455..fecab71cda 100644 --- a/lib/OpenLayers/Layer/Grid.js +++ b/lib/OpenLayers/Layer/Grid.js @@ -55,20 +55,19 @@ OpenLayers.Layer.Grid.prototype = Object.extend( new OpenLayers.Layer(), { } if (!this.grid || zoomChanged) { this._initTiles(); - } else { - var i = 0; - while (this.getGridBounds().bottom > bounds.bottom) { - this.insertRow(false); - } - while (this.getGridBounds().left > bounds.left) { - this.insertColumn(true); - } - while (this.getGridBounds().top < bounds.top) { - this.insertRow(true); - } - while (this.getGridBounds().right < bounds.right) { - this.insertColumn(false); - } + } + var i = 0; + while (this.getGridBounds().bottom > bounds.bottom) { + this.insertRow(false); + } + while (this.getGridBounds().left > bounds.left) { + this.insertColumn(true); + } + while (this.getGridBounds().top < bounds.top) { + this.insertRow(true); + } + while (this.getGridBounds().right < bounds.right) { + this.insertColumn(false); } }, getGridBounds:function() {