fixup: only show datalayers with inCaption=true in switcher

This commit is contained in:
Yohan Boniface 2025-03-17 21:52:18 +01:00
parent 254a2018f5
commit a4abecbd2c

View file

@ -211,6 +211,7 @@ export class BottomBar extends WithTemplate {
this.elements.filter.hidden = !showMenus || !this._umap.properties.facetKey
this.elements.layers.innerHTML = ''
this._umap.eachDataLayer((datalayer) => {
if (!datalayer.options.inCaption) return
this.elements.layers.appendChild(
Utils.loadTemplate(
`<option value="${datalayer.id}">${datalayer.getName()}</option>`