Description Usage Arguments Value Examples
View source: R/slippy_raster.R
Creates a square raster centred on any lat long point, or a rectangular raster surrounding a set of lat long points from 'Mapbox', 'Mapzen' or 'Stamen' Maps using the 'slippymath' package
1 2 3 4 5 6 7 8 9 10 | slippy_raster(
lat,
long,
square_km,
width_buffer = 1,
image_source = "stamen",
image_type = "watercolor",
max_tiles = 10,
api_key
)
|
lat |
WGS84 latitude. Either a single point to use as the centre for a |
long |
WGS84 longitude. Either a single point to use as the centre for a |
square_km |
length of one edge the required square area, in km. Ignored if lat and long have length > 1 |
width_buffer |
If lat and long have length > 1, used as buffer distance around the provided points in km |
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", "terrain" (stamen) |
max_tiles |
Maximum number of tiles to be requested by 'slippymath' |
api_key |
API key (required for 'mapbox') |
a rasterBrick image
1 2 3 4 5 6 7 8 9 10 | lat <- 54.4502651
long <- -3.1767946
square_km <- 1
overlay_image <- slippy_raster(lat = lat,
long = long,
square_km = square_km,
image_source = "stamen",
image_type = "watercolor",
max_tiles = 5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.