Learn R Programming

maptiles (version 0.1.0)

plot_tiles: Plot map tiles

Description

Plot a SpatRaster object over a map. It can be used to plot tiles.

Usage

plot_tiles(x, add = FALSE, ...)

Arguments

x

a SpatRaster object.

add

whether to add the layer to an existing plot (TRUE) or not (FALSE).

...

bgalpha, interpolate, or other arguments passed to be passed to plotRGB

Examples

Run this code
# 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)
# }

Run the code above in your browser using DataLab