Draw (simple) features on a map
drawFeatures(
map = NULL,
sf = TRUE,
record = FALSE,
viewer = shiny::paneViewer(),
title = "Draw Features",
editor = c("leaflet.extras", "leafpm"),
editorOptions = list(),
...
)a background leaflet or mapview map
to be used for editing. If NULL a blank
mapview canvas will be provided.
logical return simple features. The default is TRUE.
If sf = FALSE, GeoJSON will be returned.
logical to record all edits for future playback.
function for the viewer. See Shiny shiny::viewer.
NOTE: when using browserViewer(browser = getOption("browser")) to
open the app in the default browser, the browser window will automatically
close when closing the app (by pressing "done" or "cancel") in most browsers.
Firefox is an exception. See Details for instructions on how to enable this
behaviour in Firefox.
string to customize the title of the UI window.
character either "leaflet.extras" or "leafpm"
list of options suitable for passing to
either leaflet.extras::addDrawToolbar or
leafpm::addPmToolbar.
additional arguments passed on to editMap.
When setting viewer = browserViewer(browser = getOption("browser")) and
the systems default browser is Firefox, the browser window will likely not
automatically close when the app is closed (by pressing "done" or "cancel").
To enable automatic closing of tabs/windows in Firefox try the following:
input "about:config " to your firefox address bar and hit enter
make sure your "dom.allow_scripts_to_close_windows" is true