I am intermediate to R. This is my first time using bslib package and I would like to have the map layers be selected in the sidebar. I am having trouble how to do this. This is the function I have created, it has more lines, just example. Let me know your thoughts! Thank you.
map <- leaflet( options = leafletOptions(
crs = leafletCRS("L.CRS.EPSG3857"),
doubleClickZoom = FALSE,
maxZoom = 26
))%>%
addScaleBar( position = "bottomleft",
options = scaleBarOptions(imperial = FALSE)) %>%
#add base mapping and trenches
addPolygons(data = vectorWater,
group = "Base Mapping",
fillColor = "#17baff",
color = "#17baff",
opacity = 1,
fillOpacity = 0.4,
weight = 1,
options = pathOptions(interactive = FALSE)
)