From 8558b6ee5cfdcba2bc40fe83c507835251d81361 Mon Sep 17 00:00:00 2001 From: fredj Date: Wed, 18 Jan 2012 10:04:45 +0100 Subject: [PATCH] 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. --- lib/OpenLayers/Layer/Grid.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/OpenLayers/Layer/Grid.js b/lib/OpenLayers/Layer/Grid.js index 0a1c2d8220..4722d64322 100644 --- a/lib/OpenLayers/Layer/Grid.js +++ b/lib/OpenLayers/Layer/Grid.js @@ -677,8 +677,10 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { * Generate parameters for the grid layout. * * Parameters: - * bounds - {} - * origin - {} + * bounds - {|Object} OpenLayers.Bounds or an + * object with a 'left' and 'top' properties. + * origin - {|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;