slippy_overlay: Creates an overlay image from 'Mapbox' or 'Stamen' Maps using...

Description Usage Arguments Value Examples

View source: R/slippy_overlay.R

Description

Creates an overlay image from 'Mapbox' or 'Stamen' Maps using the 'slippymath' package

Usage

1
2
3
4
5
6
7
8
9
slippy_overlay(
  raster_base,
  image_source = "stamen",
  image_type = "watercolor",
  max_tiles = 10,
  api_key,
  return_png = TRUE,
  png_opacity = 0.9
)

Arguments

raster_base

A raster to use to calculate dimensions for the overlay

image_source

Source for the overlay image. Valid entries are "mapbox", "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)

return_png

TRUE to return a png image. FALSE will return a raster

png_opacity

Opacity of the returned image. Ignored if return_png = FALSE

Value

an overlay image for raster_base

Examples

1
2
3
4
overlay_image <- slippy_overlay(example_raster(),
  image_source = "stamen",
  image_type = "watercolor",
  max_tiles = 2)

geoviz documentation built on March 26, 2020, 9:15 p.m.