Commit fcab3741 authored by vbaudrot's avatar vbaudrot

make it work

parent dbf4a007
Pipeline #1897 passed with stages
in 12 minutes and 29 seconds
......@@ -310,24 +310,26 @@ server <- function(input, output, session){
leaflet(data = mapFranceDepartement) %>%
addTiles() %>%
fitBounds(~-5.142238, ~42.332755, ~8.231781, ~51.089842) #%>%
# addLegend(position = "bottomright",
# title = "Rate immunity",
# pal = palImmunity(),
# values = ~ unlist(immun_M3_k))
fitBounds(~-5.142238, ~42.332755, ~8.231781, ~51.089842) %>%
addLegend(position = "bottomright",
title = "Rate immunity",
pal = palImmunity(),
values = ~ unlist(immun_M3_k))
})
#
# Use a separate observer to recreate polygons as needed.
observe({
colorpal = palImmunity()
leafletProxy("mapImmunity") %>%
clearShapes() %>%
addPolygons(data = dataImmunity(),
color = ~colorpal(dataImmunity()$Rt_immunity),
fillOpacity = 0.5)
})
# observe({
#
# proxyImmunity <- leafletProxy("map", data = dataImmunity())
#
# colorpal = palImmunity()
# proxyImmunity %>%
# clearMarkers() %>%
# clearShapes() %>%
# addPolygons(data = dataImmunity(),
# color = ~colorpal(dataImmunity()$Rt_immunity),
# fillOpacity = 0.5)
# })
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment