Browse Source

Deleted code from example

master
Maxime Wack 7 years ago
parent
commit
350b2e9676
1 changed files with 0 additions and 14 deletions
  1. +0
    -14
      app.R

+ 0
- 14
app.R View File

@@ -222,20 +222,6 @@ server <- function(input, output, session)
addPolygons(weight = 1, color = "#222222", opacity = .1, fillOpacity = .3, fillColor = ~pal(n)) %>%
addLegend(position = "topleft", pal = pal, values = ~n)
})

# 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
# )
# }
# })
}

shinyApp(ui = ui, server = server)

Loading…
Cancel
Save