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:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user