Merge pull request #5512 from ahocevar/foreachtilecoord
Use forEachTileCoord name instead of forEachTileCoordInExtentAndZ
This commit is contained in:
@@ -158,7 +158,7 @@ ol.tilegrid.TileGrid.tmpTileCoord_ = [0, 0, 0];
|
||||
* @param {function(ol.TileCoord)} callback Function called with each tile coordinate.
|
||||
* @api
|
||||
*/
|
||||
ol.tilegrid.TileGrid.prototype.forEachTileCoordInExtentAndZ = function(extent, zoom, callback) {
|
||||
ol.tilegrid.TileGrid.prototype.forEachTileCoord = function(extent, zoom, callback) {
|
||||
var tileRange = this.getTileRangeForExtentAndZ(extent, zoom);
|
||||
for (var i = tileRange.minX, ii = tileRange.maxX; i <= ii; ++i) {
|
||||
for (var j = tileRange.minY, jj = tileRange.maxY; j <= jj; ++j) {
|
||||
|
||||
@@ -949,11 +949,11 @@ describe('ol.tilegrid.TileGrid', function() {
|
||||
|
||||
});
|
||||
|
||||
describe('forEachTileCoordInExtentAndZ', function() {
|
||||
describe('forEachTileCoord', function() {
|
||||
it('calls the provided function with each tile coordinate', function() {
|
||||
var tileGrid = ol.tilegrid.createXYZ({extent: [-180, -90, 180, 90]});
|
||||
var tileCoords = [];
|
||||
tileGrid.forEachTileCoordInExtentAndZ([15, 47, 16, 48], 8, function(tileCoord) {
|
||||
tileGrid.forEachTileCoord([15, 47, 16, 48], 8, function(tileCoord) {
|
||||
tileCoords.push(tileCoord);
|
||||
});
|
||||
expect(tileCoords).to.eql([
|
||||
|
||||
Reference in New Issue
Block a user