如何在传单Map上添加按钮以显示和隐藏以下r代码中的datatable部分:
library(leaflet)
library(DT)
library(crosstalk)
df <- read.csv(textConnection(
"Name,Lat,Long
Samurai Noodle,47.597131,-122.327298
Kukai Ramen,47.6154,-122.327157
Tsukushinbo,47.59987,-122.326726"
))
sdf <- SharedData$new(df, df$Name)
bscols(leaflet(sdf) %>% addTiles() %>%
addMarkers(~ Long, ~ Lat),
datatable(sdf, width = "100%"))
需要添加一个按钮来处理显示/隐藏datatable部分,如下图所示:
暂无答案!
目前还没有任何答案,快来回答吧!