Learn R Programming

RgoogleMaps (version 1.0)

GetMap.bbox: download a static map from the Google server

Description

Wrapper function for GetMap. Query the Google server for a static map tile, defined primarily by its lat/lon range and/or center and/or zoom. Multiple additional arguments allow the user to customize the map tile.

Usage

GetMap.bbox(lonR, latR, center, size = c(640, 640), destfile = "MyTile.png", 
          MINIMUMSIZE = FALSE, RETURNIMAGE = TRUE, GRAYSCALE = FALSE, 
          NEWMAP = TRUE, zoom, verbose = 1, ...)

Arguments

lonR
longitude range
latR
latitude range
center
optional center
size
desired size of the map tile image. defaults to maximum size returned by the Gogle server, which is 640x640 pixels
destfile
File to load the map image from or save to, depending on NEWMAP.
MINIMUMSIZE
reduce the size of the map to its minimum size that still fits the lat/lon ranges ? default: FALSE
RETURNIMAGE
return image yes/no default: TRUE
GRAYSCALE
Boolean toggle; if TRUE the colored map tile is rendered into a black & white image, see RGB2GRAY
NEWMAP
if TRUE, query the Google server and save to destfile, if FALSE load from destfile.
zoom
Google maps zoom level. optional
verbose
level of verbosity
...
extra arguments to GetMap

Value

  • map tile

See Also

GetMap