Learn R Programming

RgoogleMaps (version 1.0)

PlotOnStaticMap: overlays plot on background image of map tile

Description

This function is the workhorse of the package RgoogleMaps. It

Usage

PlotOnStaticMap(MyMap, lat, lon, destfile, zoom = NULL, size = c(640, 640), 
                GRAYSCALE = FALSE, add = FALSE, FUN = points, verbose = 1, ...)

Arguments

MyMap
optional map object to be passed
lat
vector latitude values to be overlaid
lon
vector of longitude values to be overlaid
destfile
File to load the map image from or save to, depending on whether MyMap was passed.
zoom
Google maps zoom level. optional if MyMap is passed, required if not.
size
desired size of the map tile image. defaults to maximum size returned by the Gogle server, which is $640x640$ pixels.
GRAYSCALE
Boolean toggle; if TRUE the colored map tile is rendered into a black & white image, see RGB2GRAY
add
start a new plot or add to an existing
FUN
plotting function to use for overlay; typical choices would be points and lines
verbose
level of verbosity
...
further arguments to be passed to FUN

Value

  • the map object is returned via invisible(MyMap)

See Also

GetMap GetMap.bbox