I would like to make the tabPanel change to Shiny when I click on the Leaflet polygon. I have a couple of ideas on how to do this, but I can’t find the information needed to implement them. I have a leaf in tabPanel, but I would like to switch to another tab when a polygon is clicked on it.
leaflet(llmap) %>%
addTiles() %>%
addPolygons(stroke = F,
fillOpacity = .8,
smoothFactor = .5,
color=~pal(x),
popup = pop)
I was thinking of creating popup=updateTabsetPanel(session="New Tab"), but that doesn't work. My other idea is to call updateTabsetPanel(session="New Tab")at any time when the user clicks on the new polygon, but I don’t know what event I will need to return in order to tell him that the new polygon was pressed or even if a pop-up window pops up. Does anyone know this?