Skip to content

Core: Centralized Layer Toggle API #1863

Description

@jesade-vbg

Centralized Layer Toggle API

Create a LayerControlModel for toggling layers by id.

It will support normal layers, WMS group layers/sublayers, base layers, and LayerSwitcher group folders.

Expose it as appModel.layerControl and window.hajkPublicApi.layerControl.

Required methods: showLayer, hideLayer, toggleLayer, layerIsVisible. (Probably more will show up)

Reuse existing helpers like setOLSubLayers and getAllLayerIdsInGroup.

This will be added as a standalone API only. Existing LayerSwitcher, URL hash logic, and other features will not be migrated.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

Status
In progress

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions