plot_gmap: Plot Google Earth images obtained through dismo::gmap

Description Usage Arguments Value Examples

View source: R/plot_gmap.R

Description

This function is very slightly modified from .plotCT function in raster package to avoid producing an empty plot before the actual Google image.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
plot_gmap(
  x,
  maxpixels = 5e+05,
  ext = NULL,
  interpolate = FALSE,
  axes,
  main,
  xlab = "",
  ylab = "",
  asp,
  add = FALSE,
  addfun = NULL,
  zlim = NULL,
  zlimcol = NULL,
  ...
)

Arguments

x

RasterLayer, as obtained through gmap.

maxpixels

integer > 0. Maximum number of cells to use for the plot. If maxpixels < ncell(x), sampleRegular is used before plotting. If gridded=TRUE maxpixels may be ignored to get a larger sample.

ext

An extent object to zoom in a region

interpolate

Logical. Should the image be interpolated (smoothed)?

axes

not used

main

character. Main plot title

xlab

Optional. x-axis label

ylab

Optional. y-axis label

asp

not used

add

Logical. Add to current plot?

addfun

Function to add additional items such as points or polygons to the plot (map). Typically containing statements like "points(xy); plot(polygons, add=TRUE)". This is particularly useful to add something to each map when plotting a multi-layer Raster* object.

zlim

not used

zlimcol

not used

...

Graphical parameters. Any argument that can be passed to rasterImage.

Value

A plot.

Examples

1
2
3
4
5
6
## Not run: 
library(dismo)
g <- gmap("France")
plot_gmap(g)

## End(Not run)

Pakillo/rSDM documentation built on Oct. 15, 2020, 3:20 a.m.