addSidebar | R Documentation |
The sidebar HTML must be created with sidebar_tabs
and
sidebar_pane
before
leafletOutput
is called.
addSidebar(map, id = "sidebar", options = list(position = "left"), ns = NULL)
map |
A leaflet map widget |
id |
Id of the sidebar-div. Must match with the |
options |
A named list with the only option |
ns |
The namespace function, if used in Shiny modules. |
the new map
object
https://github.com/Turbo87/sidebar-v2
Other Sidebar Functions:
closeSidebar()
,
openSidebar()
,
removeSidebar()
,
sidebar_pane()
,
sidebar_tabs()
## Not run:
library(shiny)
# run example app showing a single sidebar
runApp(paste0(
system.file("examples", package = "leaflet.extras2"),
"/sidebar_app.R"
))
# run example app showing two sidebars
runApp(paste0(
system.file("examples", package = "leaflet.extras2"),
"/multi_sidebar_app.R"
))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.