I have made a leaflet map in R, which works perfectly fine. But I would like that only one overlay group can be activated at a time, so when you click another overlay group, the first one is removed. So in the example below that it is not possible to have "Socialdemokratiet" and "Konservative" activated at the same time, so instead when I activate one of them the other is deactivated. How do I do that?
Instead of using the overlayGroups
argument in theaddLayersControl
function, use baseGroups
instead:
addLayersControl(baseGroups=Groups)