Include context options in reprojection cache key

use reprojection tileCoordKey instead of source key
This commit is contained in:
mike-000
2020-05-04 14:31:46 +01:00
committed by GitHub
parent 9bf037947c
commit 9e160e75f9

View File

@@ -328,15 +328,15 @@ class TileImage extends UrlTile {
const cache = this.getTileCacheForProjection(projection);
const tileCoord = [z, x, y];
let tile;
const tileCoordKey = getKey(tileCoord);
if (cache.containsKey(tileCoordKey)) {
tile = cache.get(tileCoordKey);
}
const key =
this.getKey() +
const tileCoordKey =
getKey(tileCoord) +
(this.contextOptions_
? '\n' + JSON.stringify(this.contextOptions_)
: '');
if (cache.containsKey(tileCoordKey)) {
tile = cache.get(tileCoordKey);
}
const key = this.getKey();
if (tile && tile.key == key) {
return tile;
} else {