Retrieve currently visible map canvas content.
mapCanvas.saveAsImage(filename = tempfile(), format = "png", ...)
filename | name of the file to be written to disk (if none is specified, the image is written to a temporary file). |
---|---|
format | the image format in which the canvas should be exported and
transferred. While this is primarily relevant for how images are saved to
disk, choice of a lossy format (such as |
... | low-level parameters (such as |
A RasterBrick object specifying the RGB values of the returned image, with the projection and extent set to that of the map canvas.
Retrieves the map canvas in the given image format, saves it to disk at the
given path, and returns the image data as a RasterBrick
object.
## imagedata <- mapCanvas.saveAsImage() ## raster::plotRGB(imagedata)