Update OpenLayers.Layer.Grid.calculateGridLayout inputs type.

No need to clone the passed bounds (read only access).
'bounds' can be either a Bounds instance or a simple javascript
object. Same for 'origin': LonLat instance or a simple javascript
object.
This commit is contained in:
fredj
2012-01-18 10:04:45 +01:00
parent 2d0714990d
commit 8558b6ee5c

View File

@@ -677,8 +677,10 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, {
* Generate parameters for the grid layout.
*
* Parameters:
* bounds - {<OpenLayers.Bound>}
* origin - {<OpenLayers.LonLat>}
* bounds - {<OpenLayers.Bound>|Object} OpenLayers.Bounds or an
* object with a 'left' and 'top' properties.
* origin - {<OpenLayers.LonLat>|Object} OpenLayers.LonLat or an
* object with a 'lon' and 'lat' properties.
* resolution - {Number}
*
* Returns:
@@ -686,8 +688,6 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, {
* tileoffsetlat, tileoffsetx, tileoffsety
*/
calculateGridLayout: function(bounds, origin, resolution) {
bounds = bounds.clone();
var tilelon = resolution * this.tileSize.w;
var tilelat = resolution * this.tileSize.h;