Map background colour/transparency within R leaflet

Viewed 279

I'm using a geojson file to produce a map with leaflet on R. I would like to change the background colour to the white, or make the background transparent if it is possible (this is actually really desired one). I have seen this and this. I am able to change the border colour and filled colour but cannot change the colour of the outside of map > background colour.

wLeaf <- leaflet(states) %>%
  addProviderTiles("MapBox", options = providerTileOptions(
    id = "mapbox.light",
    accessToken = Sys.getenv('MAPBOX_ACCESS_TOKEN')))%>%
    addPolygons(
      weight = 2,
      opacity = 1,
      color = "#222",
      fillColor = "gray",
    )

How can I handle the colour or transparency issue of background for the map?

Thanks

0 Answers
Related