diff --git a/src/ol/tilerange.js b/src/ol/tilerange.js index db4d13f051..9b478a8df7 100644 --- a/src/ol/tilerange.js +++ b/src/ol/tilerange.js @@ -71,22 +71,6 @@ ol.TileRange.prototype.equals = function(tileRange) { }; -/** - * @param {number} z Z. - * @param {function(this: T, ol.TileCoord)} f Callback. - * @param {T=} opt_obj The object to be used for the value of 'this' within f. - * @template T - */ -ol.TileRange.prototype.forEachTileCoord = function(z, f, opt_obj) { - var x, y; - for (x = this.minX; x <= this.maxX; ++x) { - for (y = this.minY; y <= this.maxY; ++y) { - f.call(opt_obj, new ol.TileCoord(z, x, y)); - } - } -}; - - /** * @inheritDoc * @return {number} Height. diff --git a/test/spec/ol/tilerange.test.js b/test/spec/ol/tilerange.test.js index b9eb37f465..a772a59f16 100644 --- a/test/spec/ol/tilerange.test.js +++ b/test/spec/ol/tilerange.test.js @@ -51,36 +51,6 @@ describe('ol.TileRange', function() { }); }); - describe('forEachTileCoord', function() { - it('iterates as expected', function() { - var tileRange = new ol.TileRange(0, 2, 1, 3); - - var tileCoords = []; - tileRange.forEachTileCoord(5, function(tileCoord) { - tileCoords.push( - new ol.TileCoord(tileCoord.z, tileCoord.x, tileCoord.y)); - }); - - expect(tileCoords.length).toEqual(4); - - expect(tileCoords[0].z).toEqual(5); - expect(tileCoords[0].x).toEqual(0); - expect(tileCoords[0].y).toEqual(2); - - expect(tileCoords[1].z).toEqual(5); - expect(tileCoords[1].x).toEqual(0); - expect(tileCoords[1].y).toEqual(3); - - expect(tileCoords[2].z).toEqual(5); - expect(tileCoords[2].x).toEqual(1); - expect(tileCoords[2].y).toEqual(2); - - expect(tileCoords[3].z).toEqual(5); - expect(tileCoords[3].x).toEqual(1); - expect(tileCoords[3].y).toEqual(3); - }); - }); - describe('getSize', function() { it('returns the expected size', function() { var tileRange = new ol.TileRange(0, 1, 2, 4);