move Layer.Grid.getGridBounds function into deprecated.js
This commit is contained in:
@@ -559,23 +559,6 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, {
|
|||||||
}
|
}
|
||||||
OpenLayers.Layer.HTTPRequest.prototype.setTileSize.apply(this, [size]);
|
OpenLayers.Layer.HTTPRequest.prototype.setTileSize.apply(this, [size]);
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
|
||||||
* Method: getGridBounds
|
|
||||||
* Deprecated. This function will be removed in 3.0. Please use
|
|
||||||
* getTilesBounds() instead.
|
|
||||||
*
|
|
||||||
* Returns:
|
|
||||||
* {<OpenLayers.Bounds>} A Bounds object representing the bounds of all the
|
|
||||||
* currently loaded tiles (including those partially or not at all seen
|
|
||||||
* onscreen)
|
|
||||||
*/
|
|
||||||
getGridBounds: function() {
|
|
||||||
var msg = "The getGridBounds() function is deprecated. It will be " +
|
|
||||||
"removed in 3.0. Please use getTilesBounds() instead.";
|
|
||||||
OpenLayers.Console.warn(msg);
|
|
||||||
return this.getTilesBounds();
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* APIMethod: getTilesBounds
|
* APIMethod: getTilesBounds
|
||||||
|
|||||||
@@ -1805,6 +1805,30 @@ OpenLayers.Control.MouseToolbar = OpenLayers.Class(
|
|||||||
OpenLayers.Control.MouseToolbar.X = 6;
|
OpenLayers.Control.MouseToolbar.X = 6;
|
||||||
OpenLayers.Control.MouseToolbar.Y = 300;
|
OpenLayers.Control.MouseToolbar.Y = 300;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class: OpenLayers.Layer.Grid
|
||||||
|
*/
|
||||||
|
|
||||||
|
OpenLayers.Util.extend(OpenLayers.Layer.Grid.prototype, {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method: getGridBounds
|
||||||
|
* Deprecated. This function will be removed in 3.0. Please use
|
||||||
|
* getTilesBounds() instead.
|
||||||
|
*
|
||||||
|
* Returns:
|
||||||
|
* {<OpenLayers.Bounds>} A Bounds object representing the bounds of all the
|
||||||
|
* currently loaded tiles (including those partially or not at all seen
|
||||||
|
* onscreen)
|
||||||
|
*/
|
||||||
|
getGridBounds: function() {
|
||||||
|
var msg = "The getGridBounds() function is deprecated. It will be " +
|
||||||
|
"removed in 3.0. Please use getTilesBounds() instead.";
|
||||||
|
OpenLayers.Console.warn(msg);
|
||||||
|
return this.getTilesBounds();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class: OpenLayers.Format.XML
|
* Class: OpenLayers.Format.XML
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -94,7 +94,7 @@
|
|||||||
|
|
||||||
|
|
||||||
function test_Layer_Grid_getTilesBounds(t) {
|
function test_Layer_Grid_getTilesBounds(t) {
|
||||||
t.plan( 4 );
|
t.plan(3);
|
||||||
|
|
||||||
layer = new OpenLayers.Layer.WMS(name, url, params);
|
layer = new OpenLayers.Layer.WMS(name, url, params);
|
||||||
|
|
||||||
@@ -110,10 +110,6 @@
|
|||||||
|
|
||||||
t.ok( bounds.equals(testBounds), "getTilesBounds() returns correct bounds");
|
t.ok( bounds.equals(testBounds), "getTilesBounds() returns correct bounds");
|
||||||
|
|
||||||
var bounds = layer.getGridBounds();
|
|
||||||
|
|
||||||
t.ok( bounds.equals(testBounds), "getGridBounds() wrapper works the same as getTilesBounds.");
|
|
||||||
|
|
||||||
//no tiles
|
//no tiles
|
||||||
layer.grid = [];
|
layer.grid = [];
|
||||||
bounds = layer.getTilesBounds();
|
bounds = layer.getTilesBounds();
|
||||||
|
|||||||
Reference in New Issue
Block a user