在 mapdeck 的 add_column 中提供 fill_color 时,海拔参数不起作用
elevation argument not working when fill_color is supplied in add_column in mapdeck
使用 mapdeck 绘制高架柱。省略 fill_colour 时会发生提升。然而,当它被提供时,高程被忽略。在文档或代码中,没有表示两者不能一起使用。
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"
)
这现在可以在 CRAN 20200515 上的 v0.3.3 中正常工作
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"
)
使用 mapdeck 绘制高架柱。省略 fill_colour 时会发生提升。然而,当它被提供时,高程被忽略。在文档或代码中,没有表示两者不能一起使用。
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"
)
这现在可以在 CRAN 20200515 上的 v0.3.3 中正常工作
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"
)