How can I catch a circle click event with a googleway map in R Shiny?
Here is my code - based on the googleway vignette - however the observer doesn't fire.
library(tidyverse)
library(shiny)
library(googleway)
ui <- fluidPage(
google_mapOutput(outputId = "map")
)
server <- function(input, output){
map_key <- ''
output$map <- renderGoogle_map({
google_map(key = map_key) %>%
add_circles(data = tram_stops, id = "stop_id", lat = "stop_lat", lon = "stop_lon"
)
})
observeEvent(input$map_circle_click, {
cat(input$map_circle_click$id) # doesn't fire!
})
}
shinyApp(ui, server)
Similar code with polygons works.