Layer: add getter method for maxExtent, p=regli_dominik, r=me

git-svn-id: http://svn.openlayers.org/trunk/openlayers@10681 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Éric Lemoine
2010-08-23 12:37:39 +00:00
parent 6f73f7059f
commit 6e28a7cafd

View File

@@ -354,7 +354,7 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, {
var minCols = Math.ceil(viewSize.w/this.tileSize.w) + var minCols = Math.ceil(viewSize.w/this.tileSize.w) +
Math.max(1, 2 * this.buffer); Math.max(1, 2 * this.buffer);
var extent = this.maxExtent; var extent = this.getMaxExtent();
var resolution = this.map.getResolution(); var resolution = this.map.getResolution();
var tileLayout = this.calculateGridLayout(bounds, extent, resolution); var tileLayout = this.calculateGridLayout(bounds, extent, resolution);
@@ -430,6 +430,18 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, {
this.spiralTileLoad(); this.spiralTileLoad();
}, },
/**
* Method: getMaxExtent
* Get this layer's maximum extent. (Implemented as a getter for
* potential specific implementations in sub-classes.)
*
* Returns:
* {OpenLayers.Bounds}
*/
getMaxExtent: function() {
return this.maxExtent;
},
/** /**
* Method: spiralTileLoad * Method: spiralTileLoad
* Starts at the top right corner of the grid and proceeds in a spiral * Starts at the top right corner of the grid and proceeds in a spiral