Remove ol.TileRange.clone

This commit is contained in:
Tom Payne
2013-03-25 11:29:01 +01:00
parent 65e6ed3485
commit f7cc8fa738
2 changed files with 4 additions and 9 deletions

View File

@@ -64,14 +64,6 @@ ol.TileRange.boundingTileRange = function(var_args) {
};
/**
* @return {ol.TileRange} Clone.
*/
ol.TileRange.prototype.clone = function() {
return new ol.TileRange(this.minX, this.minY, this.maxX, this.maxY);
};
/**
* @param {ol.TileCoord} tileCoord Tile coordinate.
* @return {boolean} Contains tile coordinate.

View File

@@ -86,7 +86,9 @@ describe('ol.source.XYZ', function() {
tileCoord,
function(z, tileRange) {
zs.push(z);
tileRanges.push(tileRange.clone());
tileRanges.push(new ol.TileRange(
tileRange.minX, tileRange.minY,
tileRange.maxX, tileRange.maxY));
return false;
});
@@ -129,5 +131,6 @@ describe('ol.source.XYZ', function() {
goog.require('ol.Coordinate');
goog.require('ol.TileCoord');
goog.require('ol.TileRange');
goog.require('ol.tilegrid.XYZ');
goog.require('ol.source.XYZ');