Wrapper to load a ggmap
Usage
get_ggmap(
coord,
googlekey = NA,
zoom = 12,
mapstyle = c(feature = "all", element = "labels", visibility = "off"),
maptype = "terrain",
mapcolor = "bw",
...
)
Arguments
- coord
a data.frame or tibble with coordinates (latlon) defining the map extensions in the form of coord = tibble(lon = ..., lat = ..., type = c("center", "lb", "rt", ...)); the reason for this structure is, that
ggmap::get_googlemap()
requires a different way (center + zoom) to specify the map frame thanggmap::get_stamenmap()
(bounding box). If needed, coord is converted to bounding box bybbox()
which takes type == "lb" as bottom & left coordinate, and "rt" as top & right, respectively.- googlekey
your google api key as a character string (see ?
ggmap::get_googlemap()
; then, a google map is downloaded) or, if NA, a map viaggmap::get_stamenmap()
is returned- zoom
zoom factor for
ggmap::get_googlemap()
- mapstyle
style parameter for
ggmap::get_googlemap()
- maptype
parameter for
ggmap::get_googlemap()
- mapcolor
color parameter for
ggmap::get_googlemap()
- ...
additional parameter for
ggmap::get_googlemap()
orggmap::get_stamenmap()
, respectively