cannot fix my problem for MULTIPLE filters/polygons. Currently my code works, but very slow, I do not use observe(), reactive(), and LeafletProxy(), becau
Following this issue you can also create the map once and then recolor the polygons as you like.
This involves some javascript code, including the leafletjs code and then using the setShapeStyle function. Note that both the javascript and the setShapeStyle function are shown in the issue above.
# in ui
ui <- fluidPage(leafletjs, ...)
# in server
observe({
leafletProxy("map") %>%
setShapeStyle(layerId = ~LayerIDs, fillColor=input$color)
})