Include context options in reprojection cache key
use reprojection tileCoordKey instead of source key
This commit is contained in:
@@ -328,15 +328,15 @@ class TileImage extends UrlTile {
|
|||||||
const cache = this.getTileCacheForProjection(projection);
|
const cache = this.getTileCacheForProjection(projection);
|
||||||
const tileCoord = [z, x, y];
|
const tileCoord = [z, x, y];
|
||||||
let tile;
|
let tile;
|
||||||
const tileCoordKey = getKey(tileCoord);
|
const tileCoordKey =
|
||||||
if (cache.containsKey(tileCoordKey)) {
|
getKey(tileCoord) +
|
||||||
tile = cache.get(tileCoordKey);
|
|
||||||
}
|
|
||||||
const key =
|
|
||||||
this.getKey() +
|
|
||||||
(this.contextOptions_
|
(this.contextOptions_
|
||||||
? '\n' + JSON.stringify(this.contextOptions_)
|
? '\n' + JSON.stringify(this.contextOptions_)
|
||||||
: '');
|
: '');
|
||||||
|
if (cache.containsKey(tileCoordKey)) {
|
||||||
|
tile = cache.get(tileCoordKey);
|
||||||
|
}
|
||||||
|
const key = this.getKey();
|
||||||
if (tile && tile.key == key) {
|
if (tile && tile.key == key) {
|
||||||
return tile;
|
return tile;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user