plot_tiles | R Documentation |
Plot map tiles.
plot_tiles(x, adjust = FALSE, add = FALSE, ...)
x |
a SpatRaster object. |
adjust |
if TRUE, plot the raster without zoom-in or zoom-out in the graphic device: add margins if the raster is smaller than the graphic device, zoom-in if the raster is larger than the graphic device. This feature does not work with an unprojected (lon/lat) raster. |
add |
whether to add the layer to an existing plot (TRUE) or not (FALSE). |
... |
bgalpha, smooth, or other arguments passed to be passed to
|
This function is a wrapper for plotRGB
from the terra package.
## Not run:
library(sf)
library(maptiles)
nc <- st_read(system.file("shape/nc.shp", package = "sf"), quiet = TRUE)
nc_osm <- get_tiles(nc, crop = TRUE)
plot_tiles(nc_osm)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.