diff --git a/lib/OpenLayers/Layer/Grid.js b/lib/OpenLayers/Layer/Grid.js index b13cb79834..2a44145b3e 100644 --- a/lib/OpenLayers/Layer/Grid.js +++ b/lib/OpenLayers/Layer/Grid.js @@ -415,12 +415,12 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { tileoffsetlon += tilelon; tileoffsetx += this.tileSize.w; } while ((tileoffsetlon <= bounds.right + tilelon * this.buffer) - || colidx < minCols) + || colidx < minCols); tileoffsetlat -= tilelat; tileoffsety += this.tileSize.h; } while((tileoffsetlat >= bounds.bottom - tilelat * this.buffer) - || rowidx < minRows) + || rowidx < minRows); //shave off exceess rows and colums this.removeExcessTiles(rowidx, colidx);