OlLayerSwitcherComponent

Interactive overlay control allowing users to dynamically toggle the visibility and adjust the opacity of active layers.

TypeScriptexample.ts
import { OlLayerSwitcherComponent } from '@angular-helpers/openlayers/controls'

# Inputs

InputTypeDefaultDescription
position'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'top-rightPlacement on the map layout
layersLayerSwitcherItem[][]List of manageable layers
collapsiblebooleantrueWhether the control panel can collapse
showOpacitybooleanfalseWhether to display layer opacity range inputs
startCollapsedbooleantrueWhether switcher starts collapsed

# Outputs

OutputTypeDescription
visibilityChange{ id: string; visible: boolean }Emitted when a layer visibility is toggled
opacityChange{ id: string; opacity: number }Emitted when a layer opacity is adjusted
LCP N/A
CLS N/A
INP N/A