Support multiple sources for layers

This commit is contained in:
Andreas Hocevar
2022-01-10 20:37:50 +01:00
parent 1a8df049e4
commit 0004b2594d
20 changed files with 348 additions and 67 deletions
+8 -1
View File
@@ -57,7 +57,7 @@ import {listen, unlistenByKey} from '../events.js';
* @typedef {Object} State
* @property {import("./Layer.js").default} layer Layer.
* @property {number} opacity Opacity, the value is rounded to two digits to appear after the decimal point.
* @property {import("../source/State.js").default} sourceState SourceState.
* @property {import("../source/Source.js").default|undefined} source Source being rendered (only for multi-source layers).
* @property {boolean} visible Visible.
* @property {boolean} managed Managed.
* @property {import("../extent.js").Extent} [extent] Extent.
@@ -196,6 +196,13 @@ class Layer extends BaseLayer {
return /** @type {SourceType} */ (this.get(LayerProperty.SOURCE)) || null;
}
/**
* @return {SourceType} The source being rendered.
*/
getRenderSource() {
return this.getSource();
}
/**
* @return {import("../source/State.js").default} Source state.
*/