Always go through source tile change logic
This commit is contained in:
@@ -200,13 +200,15 @@ class VectorTile extends UrlTile {
|
|||||||
const minZoom = sourceTileGrid.getMinZoom();
|
const minZoom = sourceTileGrid.getMinZoom();
|
||||||
|
|
||||||
const previousSourceTiles = this.sourceTilesByTileKey_[tile.getKey()];
|
const previousSourceTiles = this.sourceTilesByTileKey_[tile.getKey()];
|
||||||
|
let sourceTiles, covered, empty, loadedZ;
|
||||||
if (previousSourceTiles && previousSourceTiles.length > 0 && previousSourceTiles[0].tileCoord[0] === sourceZ) {
|
if (previousSourceTiles && previousSourceTiles.length > 0 && previousSourceTiles[0].tileCoord[0] === sourceZ) {
|
||||||
return previousSourceTiles;
|
sourceTiles = previousSourceTiles;
|
||||||
}
|
covered = true;
|
||||||
|
empty = false;
|
||||||
const sourceTiles = [];
|
loadedZ = sourceZ;
|
||||||
let loadedZ = sourceZ + 1;
|
} else {
|
||||||
let covered, empty;
|
sourceTiles = [];
|
||||||
|
loadedZ = sourceZ + 1;
|
||||||
do {
|
do {
|
||||||
--loadedZ;
|
--loadedZ;
|
||||||
covered = true;
|
covered = true;
|
||||||
@@ -268,6 +270,8 @@ class VectorTile extends UrlTile {
|
|||||||
sourceTiles.length = 0;
|
sourceTiles.length = 0;
|
||||||
}
|
}
|
||||||
} while (!covered && loadedZ > minZoom);
|
} while (!covered && loadedZ > minZoom);
|
||||||
|
}
|
||||||
|
|
||||||
if (!empty && tile.getState() === TileState.IDLE) {
|
if (!empty && tile.getState() === TileState.IDLE) {
|
||||||
tile.setState(TileState.LOADING);
|
tile.setState(TileState.LOADING);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user