From 6e28a7cafd12e75c1afecaee01645b177f17f075 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Mon, 23 Aug 2010 12:37:39 +0000 Subject: [PATCH] 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 --- lib/OpenLayers/Layer/Grid.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/lib/OpenLayers/Layer/Grid.js b/lib/OpenLayers/Layer/Grid.js index 2799bcea9f..e8718ba2bc 100644 --- a/lib/OpenLayers/Layer/Grid.js +++ b/lib/OpenLayers/Layer/Grid.js @@ -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