We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Here is the link to stackoverflow post (reproducible example inside). https://stackoverflow.com/questions/60741317/shiny-leafpopaddpopupgraphs-bug-looking-for-a-walkaround
Best, Lukic
The text was updated successfully, but these errors were encountered:
Sorry for the long silence.
Seems like you need to update the group argument when input$potatoes changes: This works for me:
group
input$potatoes
library(shiny) library(leaflet) library(leafpop) library(ggplot2) ui = fluidPage( sliderInput(inputId = "potatoes", label = "Potatoes:", min = 1, max = 10, value = 2, step = 1, animate = F, width = '100%'), leafletOutput('my_map', height = 700) ) server = function(input, output, session) { output$my_map <- renderLeaflet({ my_map <- function(my.var = character()){ my.plot <- ggplot(mtcars, aes(cyl, mpg)) + geom_line() m <- leaflet() %>% addTiles(urlTemplate = 'https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png') %>% setView(lng = 10, lat = 49, zoom = 4) %>% addCircleMarkers(lng = c(10, 10), lat = c(49, 50), group = paste0('A', input$potatoes), label = my.var ) %>% addPopupGraphs(list(my.plot,my.plot), group = paste0('A', input$potatoes), width = 500, height = 300) return(m) } my_map(input$potatoes) }) } shinyApp(ui, server)
Sorry, something went wrong.
No branches or pull requests
Here is the link to stackoverflow post (reproducible example inside).
https://stackoverflow.com/questions/60741317/shiny-leafpopaddpopupgraphs-bug-looking-for-a-walkaround
Best,
Lukic
The text was updated successfully, but these errors were encountered: