Merge pull request #10990 from mike-000/patch-9

Include context options in tile cache key
This commit is contained in:
Andreas Hocevar
2020-05-04 18:46:48 +02:00
committed by GitHub

View File

@@ -208,6 +208,18 @@ class TileImage extends UrlTile {
return 0;
}
/**
* Return the key to be used for all tiles in the source.
* @return {string} The key for all tiles.
* @protected
*/
getKey() {
return (
super.getKey() +
(this.contextOptions_ ? '\n' + JSON.stringify(this.contextOptions_) : '')
);
}
/**
* @param {import("../proj/Projection.js").default} projection Projection.
* @return {boolean} Opaque.