getMap: Get a Map of Appropriate Size

Description Usage Arguments Author(s)

View source: R/getMap.R

Description

Return a ggmap object centered on the middle of the positions data. Will start zoomed in then gradually zoom out until all points fit unless force is TRUE

Usage

1
2
3
4
5
6
7
8
9
getMap(
  positions,
  force = FALSE,
  zoom = 10,
  center = NULL,
  quiet = FALSE,
  offline = FALSE,
  bounds = NULL
)

Arguments

positions

data frame containing columns Latitude and Longitude

force

flag whether or not to force a specific zoom level instead of finding it automatically

zoom

zoom level used for the map. An integer, see zoom description in get_map function of ggmap

center

the location to center the map on. If NULL, will use the mean of the range of the data. If not NULL it must be a named vector with values lon and lat

quiet

FALSE to report zoom level used

offline

flag whether or not to run in offline mode. Offline mode will use coastline files from naturalearthdata.com and a mercator projection.

bounds

optional, the boundaries of a box that must be within the output plot. Used to extend the plotted area, especially useful for the offline mode. Specified as the lat / long coordinates of the lower left and upper right corners.

Author(s)

Taiki Sakai taiki.sakai@noaa.gov


EricArcher/PAMsbuoy documentation built on March 3, 2021, 5:56 a.m.