如何在tmap中为rshiny添加图层?
如何在tmap中为rshiny添加图层?我不知道该怎么办 我想有一个页面加载的基础地图。如果用户选中/取消选中该框,则气泡层将出现并消失。我计划只使用Tmap()方法 对于server.ui,我有以下粗略的代码:如何在tmap中为rshiny添加图层?,r,shiny,tmap,R,Shiny,Tmap,如何在tmap中为rshiny添加图层?我不知道该怎么办 我想有一个页面加载的基础地图。如果用户选中/取消选中该框,则气泡层将出现并消失。我计划只使用Tmap()方法 对于server.ui,我有以下粗略的代码: server <- function(input, output) { output$map <- renderTmap({ tm_shape(sz)+tm_polygons(zindex = 401) }) infoselect <- reactive({
server <- function(input, output) {
output$map <- renderTmap({
tm_shape(sz)+tm_polygons(zindex = 401)
})
infoselect <- reactive({
if (input$checkGroup == "check1") {
#notsure what to do here.
}
})
observe({
#notsure what to add here
tm_bubbles(col = "total",
breaks=c(50,100,150),
style = "cont",
size = "count",
border.col = "black",
border.lwd = 1)
})
})
服务器