toolbarOptions | R Documentation |
Customize the toolbar for addDrawToolbar
toolbarOptions(
actions = list(title = "Cancel drawing", text = "Cancel"),
finish = list(title = "Finish drawing", text = "Finish"),
undo = list(title = "Delete last point drawn", text = "Delete last point"),
buttons = list(polyline = "Draw a polyline", polygon = "Draw a polygon", rectangle =
"Draw a rectangle", circle = "Draw a circle", marker = "Draw a marker", circlemarker
= "Draw a circlemarker")
)
actions |
List of options for actions toolbar button. |
finish |
List of options for finish toolbar button. |
undo |
List of options for undo toolbar button. |
buttons |
List of options for buttons toolbar button. |
## Not run:
library(leaflet)
library(leaflet.extras)
leaflet() %>%
addTiles() %>%
addDrawToolbar(
toolbar = toolbarOptions(
actions = list(text = "STOP"),
finish = list(text = "DONE"),
buttons = list(
polyline = "Draw a sexy polyline",
rectangle = "Draw a gigantic rectangle",
circlemarker = "Make a nice circle"
),
),
polylineOptions = T, rectangleOptions = T, circleOptions = T,
polygonOptions = F, markerOptions = F, circleMarkerOptions = F
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.