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