|
|
@@ -188,6 +188,21 @@ server <- function(input, output, session) |
|
|
|
scale_x_continuous(limits = c(min_age, max_age)) + |
|
|
|
theme(axis.title = element_blank()) |
|
|
|
}) |
|
|
|
# Map |
|
|
|
|
|
|
|
# observe({ |
|
|
|
# existing <- in_bounds() |
|
|
|
# leafletProxy("map", data = filteredData()) %>% |
|
|
|
# clearShapes() %>% |
|
|
|
# }) |
|
|
|
|
|
|
|
# Use a separate observer to recreate the legend as needed. |
|
|
|
# observe({ |
|
|
|
# Remove any existing legend, and only if the legend is |
|
|
|
# enabled, create a new one. |
|
|
|
# leafletProxy("map", data = quakes) %>% |
|
|
|
# clearControls() |
|
|
|
# if (input$legend) { |
|
|
|
# pal <- colorpal() |
|
|
|
# proxy %>% addLegend(position = "bottomright", |
|
|
|
# pal = pal, values = ~mag |
|
|
|