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) +
Math.max(1, 2 * this.buffer);
var extent = this.maxExtent;
var extent = this.getMaxExtent();
var resolution = this.map.getResolution();
var tileLayout = this.calculateGridLayout(bounds, extent, resolution);
@@ -429,6 +429,18 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, {
//now actually draw the tiles
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