Add attributionsCollapsible option to source/TileWMS and source/WMTS

This commit is contained in:
sbx320
2021-04-12 07:11:14 +02:00
parent 71c18d4444
commit 6f433d8c46
2 changed files with 4 additions and 0 deletions

View File

@@ -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,

View File

@@ -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,