register_tile_source: Register Tile Sources

Description Usage Arguments Examples

View source: R/0_tilespec.R

Description

Use this function to register tile sources so they can be referred to by name in osm.plot. Tile sources will be registered for as long as the namespace is loaded. Use set_default_tile_source() to set the default source.

Usage

1
2
3
4
5

Arguments

...

Passed to as.tile_source for set_default_tile_source, or a named list of tile sources for register_tile_source

x

The tile source (or coercible string) to use as the default tile source

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# set the default tile source
set_default_tile_source("stamenbw")

# register a custom tile source
register_tile_source(dark = "http://a.basemaps.cartocdn.com/dark_all/${z}/${x}/${y}.png")


library(prettymapr)
ns <- makebbox(47.2, -59.7, 43.3, -66.4)
prettymap(osm.plot(ns, "dark"))

paleolimbot/rosm documentation built on July 23, 2019, 7:35 a.m.