maxTiles: If zoom is missing, zoom will be chosen such that the number of map tiles is less than or equl to this number.
crs: Projection for the output, defaulting to the same projection as x. If x has no projection, for instance when x is a matrix or extent, crs is also used as the projection of x. If crs is NA or missing and x has no crs, long-lat is used.
buffer: Extend the extent for which the map is requested, in units of x. Can be negative, or a vector of length 2 for different x and y extensions
fact: Passed to increase or decrease resolution, values above 1 help to produce a clearer image.
verbose: Print information about map images being downloaded, defaults to FALSE.
cachePath: Location to store downloaded map images, defaults to tempdir()
name: name of a tile path, if missing a vector of all available tile paths is returned. name can be any of the names of the vector returned when name is unspecified.
type: format for the attribution
short: short or long attribution
xyz: format of xyz coordinates in URL's
suffix: string to append to URL's, i.e. '.png'
Details
These functions download, display, and manipulate map tiles stored in a standard way either on a web server or a local folder.
Map tiles are a set of PNG images that span the world at a set of zoom levels. Zoom level 1 has four 256x256 pixel tiles in a 2x2 pattern over the whole world. In general, zoom level n has 2n
by 2n tiles. Zoom levels go up to about 17 or 18 depending on the tile server.
See https://mc.bbbike.org/mc/ for a more possible map tiles (not all of which are compatible with openmap)
Be sure to attribute any maps you publish, the osmAttribution function will assist. If type = 'auto' then markdown format will be used unless a variable mdToTex is defined and equal to TRUE.
Returns
openmap returns a SpatRaster with indexed colours or RGB layers.