Handle empty source tiles and queue them properly

This commit is contained in:
Andreas Hocevar
2019-09-24 15:18:59 +02:00
parent 3992aede9d
commit 818bdc411c
2 changed files with 9 additions and 5 deletions

View File

@@ -112,10 +112,12 @@ class TileQueue extends PriorityQueue {
if (state === TileState.ABORT) {
abortedTiles = true;
} else if (state === TileState.IDLE && !(tileKey in this.tilesLoadingKeys_)) {
this.tilesLoadingKeys_[tileKey] = true;
++this.tilesLoading_;
++newLoads;
tile.load();
if (tile.getState() === TileState.LOADING) {
this.tilesLoadingKeys_[tileKey] = true;
++this.tilesLoading_;
++newLoads;
}
}
}
if (newLoads === 0 && abortedTiles) {