Description Usage Arguments Examples
Add style editor
Remove style editor
1 2 3 4 | addStyleEditor(map, position = c("topleft", "topright", "bottomleft",
"bottomright"), openOnLeafletDraw = TRUE, useGrouping = FALSE, ...)
removeStyleEditor(map)
|
map |
the map widget |
position |
position of the control |
openOnLeafletDraw |
whether to open automatically when used with |
useGrouping |
Should be false to work with |
... |
other options. See plugin code |
1 2 3 4 5 6 7 8 9 10 11 12 | leaflet() %>%
setView(0, 0, 2) %>%
addProviderTiles(providers$CartoDB.Positron) %>%
addDrawToolbar(
targetGroup = "draw",
editOptions = editToolbarOptions(selectedPathOptions = selectedPathOptions())
) %>%
addLayersControl(
overlayGroups = c("draw"), options = layersControlOptions(collapsed = FALSE)
) %>%
# add the style editor to alter shapes added to map
addStyleEditor()
|
Loading required package: leaflet
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.