A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/SymbolixAU/mapdeck/issues/287 below:

fill_colour in add_polygon not correct when stroke_colour is not defined · Issue #287 · SymbolixAU/mapdeck · GitHub

When using add_polygon and only defining fill_colour the resulting colour seems not correct (should be white).

library(mapdeck)

key = "<my_api_key>"
set_token(key)

sf <- geojsonsf::geojson_sf("https://symbolixau.github.io/data/geojson/SA2_2016_VIC.json")

map = mapdeck(
  token = key
  , style = mapdeck_style('dark')
)

## not white
map %>%
  add_polygon(
    data = sf
    , fill_colour = "#ffffffff"
  )

However, when we also define stroke_colour it renders correctly (in white)

## white
map %>%
  add_polygon(
    data = sf
    , fill_colour = "#ffffffff"
    , stroke_colour = "#000000"
  )

I realised this behaviour when testing mapview with mapdeck for add_pointcloud. Given that add_pointcloud does not have a stroke_colour argument, I haven't found a way to get the proper colour representation for add_pointcloud.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4