get_slippy_map: Obtains and merges map tiles from various sources using the...

Description Usage Arguments Value Examples

View source: R/get_slippy_map.R

Description

Obtains and merges map tiles from various sources using the 'slippymath' package

Usage

1
2
3
4
5
6
7
get_slippy_map(
  bounding_box,
  image_source = "stamen",
  image_type = "watercolor",
  max_tiles = 10,
  api_key
)

Arguments

bounding_box

Any object for which raster::extent() can be calculated.

image_source

Source for the overlay image. Valid entries are "mapbox", "mapzen", "stamen".

image_type

The type of overlay to request. "satellite", "mapbox-streets-v8", "mapbox-terrain-v2", "mapbox-traffic-v1", "terrain-rgb", "mapbox-incidents-v1" (mapbox), "dem" (mapzen) or "watercolor", "toner", "toner-background", "toner-lite" (stamen). You can also request a custom Mapbox style by specifying image_source = "mapbox", image_type = "username/mapid"

max_tiles

Maximum number of tiles to be requested by 'slippymath'

api_key

API key (required for 'mapbox')

Value

a rasterBrick with the same dimensions (but not the same resolution) as bounding_box

Examples

1
2
3
4
map <- get_slippy_map(example_raster(),
  image_source = "stamen",
  image_type = "watercolor",
  max_tiles = 5)

neilcharles/geoviz documentation built on May 6, 2020, 9:06 p.m.