Plot tiles from open map servers.

tilesLayer(x, add = FALSE)

Arguments

x
a RasterBrick object; the getTiles function outputs these objects.
add
whether to add the layer to an existing plot (TRUE) or not (FALSE).

Note

This function is a wrapper for plotRGB from the raster package.

See also

getTiles

Examples

## Not run: ------------------------------------ # data("nuts2006") # # extract Denmark # spdf <- nuts0.spdf[nuts0.spdf$id=="DK",] # # Download the tiles, extent = Denmark # den <- getTiles(spdf = spdf, type = "osm", crop = TRUE) # class(den) # # Plot the tiles # tilesLayer(den) # # Plot countries # plot(spdf, add=TRUE) # # Map tiles sources # mtext(text = "Map data © OpenStreetMap contributors, under CC BY SA.", # side = 1, adj = 0, cex = 0.7, font = 3) ## ---------------------------------------------