change function to use bl / tr

git-svn-id: http://svn.openlayers.org/trunk/openlayers@897 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2006-07-06 11:59:39 +00:00
parent 7b80623c5c
commit 7f5ea40aca

View File

@@ -132,16 +132,16 @@ OpenLayers.Layer.Grid.prototype =
*/
getGridBounds:function() {
var topLeftTile = this.grid[0][0];
var bottom = this.grid.length - 1;
var right = this.grid[0].length - 1;
var bottomRightTile = this.grid[bottom][right];
var bottomLeftTile = this.grid[bottom][0];
return new OpenLayers.Bounds(topLeftTile.bounds.left,
bottomRightTile.bounds.bottom,
bottomRightTile.bounds.right,
topLeftTile.bounds.top);
var right = this.grid[0].length - 1;
var topRightTile = this.grid[0][right];
return new OpenLayers.Bounds(bottomLeftTile.bounds.left,
bottomLeftTile.bounds.bottom,
topRightTile.bounds.right,
topRightTile.bounds.top);
},
/**