How can I make the background of the Leaflet map transparent. I see opacity controls from the layers, but not the map background. Should the be changed just with plain CSS?
3 Answers
Hey plain CSS did the trick:
.leaflet-container {
background-color:rgba(255,0,0,0.0);
}
Try using the leaflet.extras package -- you can make the background white or transparent!
library(leaflet.extras)
mapname%>%
setMapWidgetStyle(list(background= "white"))
-
-
-
I found this very useful, because I couldn't find an appropriate answer for R. Came up on google, problem solved. Thank you.– StephanFeb 18, 2021 at 9:45