1

Using mapdeck to plot elevated columns. Elevation happens when fill_colour is ommitted. However when it is supplied, elevation is ignored. In document or code, there is no such indication that both cannot be used together.

library( mapdeck )
set_token( 'pk.eyJ1IjoicmFqaWJkZSIsImEiOiJjazlnMnhmdGwwMDRrM29ta2Rkbzh5cGVzIn0.SwdQj29syEZzMuTppFwY4A' )


df <- capitals
df$elev <- sample(50000:500000, size = nrow(df), replace = T)

mapdeck(style = mapdeck_style("dark"), pitch = 45) %>%
  add_column(
    data = df
    , lat = "lat"
    , lon = "lon"
    , elevation = "elev"
    , fill_colour = "lon"
    , disk_resolution = 20
    , radius = 100000
    , tooltip = "capital"
  )
Soumya Boral
  • 1,191
  • 14
  • 28
  • 1
    I think you've found [this issue](https://github.com/SymbolixAU/mapdeck/issues/296). Can you please install the dev version `remotes::install_github("SymbolixAU/mapdeck")` and try again? – SymbolixAU May 12 '20 at 03:19

1 Answers1

1

This now works as it should in v0.3.3 on CRAN 20200515

df <- capitals
df$elev <- sample(50000:500000, size = nrow(df), replace = T)

mapdeck(style = mapdeck_style("dark"), pitch = 45) %>%
  add_column(
    data = df
    , lat = "lat"
    , lon = "lon"
    , elevation = "elev"
    , fill_colour = "lon"
    , disk_resolution = 20
    , radius = 100000
    , tooltip = "capital"
  )

enter image description here

SymbolixAU
  • 25,502
  • 4
  • 67
  • 139