SymbolixAU / mapdeck

R interface to Deck.gl and Mapbox
https://symbolixau.github.io/mapdeck/articles/mapdeck.html
363 stars 40 forks source link

add_column and fill_color: stroke provided, ignoring elevation #296

Closed maxlavoie closed 4 years ago

maxlavoie commented 4 years ago

Using add_column with elevation and fill_colorI get:

stroke provided, ignoring elevation

As a consequence, the elevation does not work.

Version mapdeck_0.3.2

df <- capitals
df$elev <- sample(50000:500000, size = nrow(df), replace = T)
add_dependencies 17
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"
    )
SymbolixAU commented 4 years ago

thanks for reporting.

I've just pushed a commit which should fix this.

## install dev version
# remotes::install_github("SymbolixAU/mapdeck")

df <- capitals
df$elev <- sample(50000:500000, size = nrow(df), replace = T)
add_dependencies 17
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"
    )