Make TileGrid behave as documented with extent and sizes options

This commit is contained in:
Andreas Hocevar
2020-09-07 11:07:12 +02:00
parent da5e4ffbb6
commit 0f8c8af833
4 changed files with 54 additions and 12 deletions
+1 -7
View File
@@ -76,13 +76,7 @@ export function withinExtentAndZ(tileCoord, tileGrid) {
if (tileGrid.getMinZoom() > z || z > tileGrid.getMaxZoom()) {
return false;
}
const extent = tileGrid.getExtent();
let tileRange;
if (!extent) {
tileRange = tileGrid.getFullTileRange(z);
} else {
tileRange = tileGrid.getTileRangeForExtentAndZ(extent, z);
}
const tileRange = tileGrid.getFullTileRange(z);
if (!tileRange) {
return true;
} else {