diff --git a/src/ol/tilerange.js b/src/ol/tilerange.js index ad788a7736..76d3d7437c 100644 --- a/src/ol/tilerange.js +++ b/src/ol/tilerange.js @@ -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. diff --git a/test/spec/ol/source/xyz.test.js b/test/spec/ol/source/xyz.test.js index 5b143beb0d..f58b399c36 100644 --- a/test/spec/ol/source/xyz.test.js +++ b/test/spec/ol/source/xyz.test.js @@ -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');