diff --git a/src/ol/source/TileImage.js b/src/ol/source/TileImage.js index cf9623aaa3..ba100b94af 100644 --- a/src/ol/source/TileImage.js +++ b/src/ol/source/TileImage.js @@ -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.