Displaying 1 result from an estimated 1 matches for "leafletoutput".
2018 Feb 23
0
Mapedit::selectMap in shiny map.
...dataframe giving the ids of the
selected polygons.
##however the code below - trying to implement in shiny fails with "Can?t
call runApp() from within runApp(). If your application code contains
runApp(), please remove it.
library(shiny)
library(leaflet)
library(mapedit)
ui <- fluidPage(
leafletOutput(?mymap?)
)
server <- function(input, output, session) {
lf<-leaflet() %>%
addTiles()%>%
addPolygons(data =gadmCHE,
label = ~NAME_1,
layerId = ~NAME_1)
output$mymap <- renderLeaflet({selectMap(lf)
})
}
shinyApp(ui, server)
##How do I achieve the same in a shiny map?
[[alternative...