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.
Centralized Layer Toggle API
Create a
LayerControlModelfor toggling layers by id.It will support normal layers, WMS group layers/sublayers, base layers, and LayerSwitcher group folders.
Expose it as
appModel.layerControlandwindow.hajkPublicApi.layerControl.Required methods:
showLayer,hideLayer,toggleLayer,layerIsVisible. (Probably more will show up)Reuse existing helpers like
setOLSubLayersandgetAllLayerIdsInGroup.This will be added as a standalone API only. Existing LayerSwitcher, URL hash logic, and other features will not be migrated.