Elevator Layer Management: Select a layer within a layer group?

I would like to have a leaflet control where I can select one of the base layers, and this base layer will be a LayerGroup from which I can select sublayers to display. I’m thinking about customization, when I press the switch to select the base level (group of layers), and underneath it I would look at the list of flags for which layers are displayed in it. Is there a way to do this using the stock level control?

I searched for examples and looked through the Leaflet API, but didn't find anything like it.

+4
source share
1 answer

There is currently no sheet support for the layer hierarchy outside of the LayerGroup level. You can use the Leaflet.GroupedLayerControl plugin to achieve some basic grouping in the level control panel, but not the actual hierarchy.

+4
source

Source: https://habr.com/ru/post/1493028/


All Articles