draw_ext: Draw extent

View source: R/ext.R

draw_extR Documentation

Draw extent

Description

This function lets you draw an extent on an interactive map. It is a simple wrapper around mapedit::drawFeatures() written by Tim Appelhans et al.

Usage

draw_ext()

Value

An sf object

Examples

## Not run: 
library(basemaps)

# draw extent interactively
ext <- draw_ext()

# set defaults for the basemap
set_defaults(ext = ext, map_service = "osm", map_type = "terrain_bg")
# for mapbox maps, you need a map_token. Register for free at mapbox.com to get a token

# load and return basemap map as raster (default)
map <- basemap()

## End(Not run)


basemaps documentation built on Nov. 1, 2024, 5:07 p.m.