Select multiple items using map_click in leaflet, linked to selectizeInput() in shiny app (R)
问题 I would like to create a leaflet map where you can select multiple polygons and this will update the selectizeInput() in a shiny app. This would including removing a selected polygon, when it is removed in the selectizeInput() . I have slightly changed/updated the code from the answer here (use of sf instead of sp and more dplyr where I could work out what the base R was). The polygons could probably be updated with an observeEvent tied in with input$clicked_locations , but not sure exactly