Simplify vector tile code

This commit is contained in:
ahocevar
2018-12-31 00:34:56 +01:00
parent ab797b7160
commit 32696638d2
10 changed files with 396 additions and 462 deletions

View File

@@ -82,7 +82,7 @@ class TileQueue extends PriorityQueue {
handleTileChange(event) {
const tile = /** @type {import("./Tile.js").default} */ (event.target);
const state = tile.getState();
if (state === TileState.LOADED || state === TileState.ERROR ||
if (tile.hifi && state === TileState.LOADED || state === TileState.ERROR ||
state === TileState.EMPTY || state === TileState.ABORT) {
unlisten(tile, EventType.CHANGE, this.handleTileChange, this);
const tileKey = tile.getKey();