osm_raster | R Documentation |
Load an Open Street Map image
osm_raster(
bbox,
spec,
zoom = osm_zoom_num_tiles(6),
cache_spec = NULL,
quiet = NA
)
bbox |
A [wk::rct()] or object with a [wk::wk_bbox()] method. |
spec |
An [osm_url_spec()] |
zoom |
A zoom level or an auto zoom specifier like [osm_zoom_num_tiles()]. |
cache_spec |
An optional [osm_url_spec()] or character vector to be used as the cache. |
quiet |
Use 'TRUE' for fewer messages or 'FALSE' for more messages. |
A [wk::grd_rct()] whose data member is a nativeRaster.
bounds <- wk::rct(
-7476083, 5349058,
-6594103, 6243203,
crs = osm_crs_native()
)
(grd <- osm_raster(bounds, osm_url_spec()))
plot(grd)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.