if (FALSE) {
library(shiny)
library(mapgl)
# Clear all controls
maplibre_proxy("map") |>
clear_controls()
# Clear specific controls
maplibre_proxy("map") |>
clear_controls("navigation")
# Clear multiple controls
maplibre_proxy("map") |>
clear_controls(c("draw", "navigation"))
# Clear a custom control by ID
maplibre_proxy("map") |>
clear_controls("my_custom_control")
}
Run the code above in your browser using DataLab