7

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?

Thanks

12

Hey plain CSS did the trick:

.leaflet-container {
    background-color:rgba(255,0,0,0.0);
}
-2

Try using the leaflet.extras package -- you can make the background white or transparent!

library(leaflet.extras)

mapname%>%

setMapWidgetStyle(list(background= "white"))
  • This question is about Javascript Leaflet. – Stefan Jan 16 '19 at 18:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.