Commit dbf4a007 authored by vbaudrot's avatar vbaudrot

without legend

parent 5630dca0
Pipeline #1895 passed with stages
in 3 minutes and 21 seconds
......@@ -307,29 +307,26 @@ server <- function(input, output, session){
})
output$mapImmunity <- renderLeaflet({
# pal = palImmunity()
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()
proxy <- leafletProxy("mapImmunity")
colorpal = palImmunity()
proxy %>%
leafletProxy("mapImmunity") %>%
clearShapes() %>%
addPolygons(data = dataImmunity(),
color
= ~colorpal(Rt_immunity),
fillOpacity = 0.7)
color = ~colorpal(dataImmunity()$Rt_immunity),
fillOpacity = 0.5)
})
......
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