drawFeatures: Draw (simple) features on a map

Description Usage Arguments Details

View source: R/draw.R

Description

Draw (simple) features on a map

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
drawFeatures(
  map = NULL,
  sf = TRUE,
  record = FALSE,
  viewer = shiny::paneViewer(),
  title = "Draw Features",
  editor = c("leaflet.extras", "leafpm"),
  editorOptions = list(),
  ...
)

Arguments

map

a background leaflet or mapview map to be used for editing. If NULL a blank mapview canvas will be provided.

sf

logical return simple features. The default is TRUE. If sf = FALSE, GeoJSON will be returned.

record

logical to record all edits for future playback.

viewer

function for the viewer. See 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.

title

string to customize the title of the UI window.

editor

character either "leaflet.extras" or "leafpm"

editorOptions

list of options suitable for passing to either leaflet.extras::addDrawToolbar or leafpm::addPmToolbar.

...

additional arguments passed on to editMap.

Details

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:


mapedit documentation built on Feb. 3, 2020, 1:07 a.m.