Make tile keys stable to avoid TileQueue confusion
This commit is contained in:
@@ -93,11 +93,6 @@ class VectorImageTile extends Tile {
|
||||
*/
|
||||
this.extent = null;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
this.sourceRevision_ = sourceRevision;
|
||||
|
||||
/**
|
||||
* @type {import("./tilecoord.js").TileCoord}
|
||||
*/
|
||||
@@ -118,6 +113,8 @@ class VectorImageTile extends Tile {
|
||||
*/
|
||||
this.sourceTileListenerKeys_ = [];
|
||||
|
||||
this.key = sourceRevision.toString();
|
||||
|
||||
if (urlTileCoord && sourceTileGrid) {
|
||||
const extent = this.extent = tileGrid.getTileCoordExtent(urlTileCoord);
|
||||
const resolution = this.resolution_ = tileGrid.getResolution(urlTileCoord[0]);
|
||||
@@ -233,7 +230,7 @@ class VectorImageTile extends Tile {
|
||||
for (let i = 0, ii = tileKeys.length; i < ii; ++i) {
|
||||
this.sourceTiles_[tileKeys[i]].consumers++;
|
||||
}
|
||||
const tile = new VectorImageTile(this.tileCoord, TileState.IDLE, undefined, null, null,
|
||||
const tile = new VectorImageTile(this.tileCoord, TileState.IDLE, Number(this.key), null, null,
|
||||
this.wrappedTileCoord, null, null, null, this.sourceTiles_,
|
||||
undefined, null, null, null);
|
||||
tile.extent = this.extent;
|
||||
@@ -269,13 +266,6 @@ class VectorImageTile extends Tile {
|
||||
return this.replayState_[key];
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
getKey() {
|
||||
return this.tileKeys.join('/') + '-' + this.sourceRevision_;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} tileKey Key (tileCoord) of the source tile.
|
||||
* @return {import("./VectorTile.js").default} Source tile.
|
||||
|
||||
Reference in New Issue
Block a user