defaults | R Documentation |
basemaps
defaultsThese functions set, get or reset the defaults of all map arguments passed to basemap
and associated functions.
set_defaults(
ext = NULL,
map_service = NULL,
map_type = NULL,
map_res = NULL,
map_token = NULL,
map_dir = NULL
)
get_defaults()
reset_defaults()
ext |
extent to be covered by the basemap as any spatial class supported by |
map_service |
character, a map service, either |
map_type |
character, a map type, e.g. |
map_res |
numeric, resolution of base map in range from 0 to 1. |
map_token |
character, authentication token for services that require registration, which are |
map_dir |
character, cache directory where downloaded basemap tiles will be stored. By default, a temporary directory is used, which is destroyed when the session is terminated. |
For get_defaults
, a list of defaults, otherwise none.
library(basemaps)
data(ext)
# set defaults for the basemap
set_defaults(ext = ext, map_service = "osm", map_type = "terrain_bg")
# get defaults
get_defaults()
## Not run:
# load and return basemap map as raster (default)
map <- basemap()
## End(Not run)
# reset defaults
reset_defaults()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.