diff --git a/src/ol/source/TileWMS.js b/src/ol/source/TileWMS.js index 8734d61519..9df80f92e7 100644 --- a/src/ol/source/TileWMS.js +++ b/src/ol/source/TileWMS.js @@ -20,6 +20,7 @@ import {hash as tileCoordHash} from '../tilecoord.js'; /** * @typedef {Object} Options * @property {import("./Source.js").AttributionLike} [attributions] Attributions. + * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible. * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport. * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer. @@ -88,6 +89,7 @@ class TileWMS extends TileImage { super({ attributions: options.attributions, + attributionsCollapsible: options.attributionsCollapsible, cacheSize: options.cacheSize, crossOrigin: options.crossOrigin, imageSmoothing: options.imageSmoothing, diff --git a/src/ol/source/WMTS.js b/src/ol/source/WMTS.js index 68ece7ba05..6be8f651cc 100644 --- a/src/ol/source/WMTS.js +++ b/src/ol/source/WMTS.js @@ -15,6 +15,7 @@ import {find, findIndex, includes} from '../array.js'; /** * @typedef {Object} Options * @property {import("./Source.js").AttributionLike} [attributions] Attributions. + * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible. * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport. * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer. @@ -83,6 +84,7 @@ class WMTS extends TileImage { super({ attributions: options.attributions, + attributionsCollapsible: options.attributionsCollapsible, cacheSize: options.cacheSize, crossOrigin: options.crossOrigin, imageSmoothing: options.imageSmoothing,