#' @describeIn controls Add layer switcher to the map
#'
#' @export
add_layer_switcher <- function(ol) {
ol$dependencies <- c(
ol$dependencies,
layerswitcher_dependencies()
)
invoke_method(ol, "addLayerSwitcher")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.