diff --git a/lib/OpenLayers/Layer/Grid.js b/lib/OpenLayers/Layer/Grid.js index 724055e52e..a70e347733 100644 --- a/lib/OpenLayers/Layer/Grid.js +++ b/lib/OpenLayers/Layer/Grid.js @@ -353,7 +353,7 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { var minCols = Math.ceil(viewSize.w/this.tileSize.w) + Math.max(1, 2 * this.buffer); - var extent = this.map.getMaxExtent(); + var extent = this.maxExtent; var resolution = this.map.getResolution(); var tileLayout = this.calculateGridLayout(bounds, extent, resolution); @@ -719,7 +719,7 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { * {} Bounds of the tile at the given pixel location. */ getTileBounds: function(viewPortPx) { - var maxExtent = this.map.getMaxExtent(); + var maxExtent = this.maxExtent; var resolution = this.getResolution(); var tileMapWidth = resolution * this.tileSize.w; var tileMapHeight = resolution * this.tileSize.h;