Learn R Programming

sorvi (version 0.4.05)

GetStaticmapGoogleMaps: Load static Google Map

Description

Get static map from Google Maps API and convert it to ggplot2-compatible form. See Terms and Conditions from http://code.google.com/apis/maps/documentation/staticmaps/index.html. https://github.com/hadley/ggplot2/wiki/Crime-in-Downtown-Houston,-Texas-:-Combining-ggplot2-and-Google-Maps

Usage

GetStaticmapGoogleMaps(center, zoom = 10,
    GRAYSCALE = FALSE, scale = 1, maptype = "map",
    destfile = "TemporaryMap.png", n_pix = 640,
    format = "png32")

Arguments

center
Coordinates for the center of the map
zoom
Zoom-level
GRAYSCALE
Grayscale or colours?
scale
Scale of the map, 1: less details, faster to load, 2: more details, much slower to load
maptype
Type of the map
destfile
Temporary file to save the obtained map picture
n_pix
Size of the figure (max = 640)
format
Format of the map picture (png32 is best)

Value

  • df Map data frame