Description Usage Arguments Value Examples
Create the polygon for the study area by drawing into a world map
1 | drawPolygon(lat = 0, lng = 0, zoom = 1, editor = "leafpm")
|
lat |
initial geographical coordinate for latitude in decimal degrees (EPSG:4326) for the map to start at. Default = “0”. |
lng |
initial geographical coordinate for longitude in decimal degrees (EPSG:4326) for the map to start at. Default = “0”. |
zoom |
initial zoom level for the map. Range 1 - 19. Default = “1”. |
editor |
type of editor for the drawing tools. Options are “leafpm” (default)
and “leaflet.extras”. Requires additional packages |
an object of class ‘sf’ with a polygon (only the first one drawn) with geodesic coordinates in WGS84 (ESPG:4326).
1 2 3 | if(interactive()){
polygon <- drawPolygon()
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.