Feature request: new option in addGroupedLayersControl()
Using addGroupedLayersControl(), I can set the current groupedLayersControlOptions() in this way:
options = groupedLayersControlOptions(groupCheckboxes = TRUE,
collapsed = FALSE,
autoZIndex = TRUE,
groupsCollapsable = FALSE,
sortLayers = FALSE,
sortGroups = FALSE,
sortBaseLayers = FALSE,
exclusiveGroups = "Miscelanea")) %>%
and get:
or:
options = groupedLayersControlOptions(groupCheckboxes = TRUE,
collapsed = FALSE,
autoZIndex = TRUE,
groupsCollapsable = TRUE,
sortLayers = FALSE,
sortGroups = FALSE,
sortBaseLayers = FALSE,
exclusiveGroups = "Miscelanea")) %>%
and get:
But what I would like the user to see when opening the map is:
which seems to me that would require an additional option "groupsCollapsed=FALSE"
Unfortunately this is currently not supported in the underlying JS library. I will have to see how to include it there
With this commit https://github.com/trafficonese/leaflet.extras/commit/921ec6960a7ffa0c910f443682793b595ec6deb7 you can now pass groupsCollapsed to groupedLayersControlOptions.
A logical, character string, or character vector: TRUE: Collapses all groups. FALSE (default): No groups are collapsed. A string: Collapses a single group (e.g., "Group 1"). A vector of strings: Collapses multiple groups (e.g., c("Group 1", "Group 2")).