Fix reloading tiles in case of an error with tile.load()

This commit is contained in:
Andreas Hocevar
2022-07-21 23:18:31 +02:00
parent 1c68d5093d
commit a1d68b4f66
7 changed files with 97 additions and 10 deletions
+3 -1
View File
@@ -86,7 +86,9 @@ class TileQueue extends PriorityQueue {
state === TileState.ERROR ||
state === TileState.EMPTY
) {
tile.removeEventListener(EventType.CHANGE, this.boundHandleTileChange_);
if (state !== TileState.ERROR) {
tile.removeEventListener(EventType.CHANGE, this.boundHandleTileChange_);
}
const tileKey = tile.getKey();
if (tileKey in this.tilesLoadingKeys_) {
delete this.tilesLoadingKeys_[tileKey];