Description Usage Arguments Details Value
An alternative to ggmap
's get_map
function
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | get_map2(
location = c(lon = -95.3632715, lat = 29.7632836),
zoom = "auto",
scale = "auto",
maptype = c("terrain", "terrain-background", "satellite", "roadmap", "hybrid",
"toner", "watercolor", "terrain-labels", "terrain-lines", "toner-2010", "toner-2011",
"toner-background", "toner-hybrid", "toner-labels", "toner-lines", "toner-lite"),
source = c("google", "osm", "stamen"),
force = ifelse(source == "google", TRUE, FALSE),
messaging = FALSE,
urlonly = FALSE,
filename = NULL,
crop = TRUE,
color = c("color", "bw"),
language = "en-EN",
...
)
|
location |
an address, longitude/latitude pair (in that order), or left/bottom/right/top bounding box |
zoom |
map zoom, an integer from 3 (continent) to 21 (building), default value 10 (city). openstreetmaps limits a zoom of 18, and the limit on stamen maps depends on the maptype. "auto" automatically determines the zoom for bounding box specifications, and is defaulted to 10 with center/zoom specifications. maps of the whole world currently not supported. |
scale |
scale argument of get_googlemap() or get_openstreetmap() |
maptype |
character string providing map theme. options available are "terrain", "terrain-background", "satellite", "roadmap", and "hybrid" (google maps), "terrain", "watercolor", and "toner" (stamen maps) |
source |
Google Maps ("google"), OpenStreetMap ("osm"), Stamen Maps ("stamen") |
force |
force new map (don't use archived version) |
messaging |
turn messaging on/off |
urlonly |
return url only |
filename |
destination file for download (file extension added according
to format). Default |
crop |
(stamen and cloudmade maps) crop tiles to bounding box |
color |
color ("color") or black-and-white ("bw") |
language |
language for google maps |
... |
... |
An error in the CRAN available version of get_map means it will only plot Google Maps objects rather than Stamen or OSM maps. When ggmap is
updated this function will be removed. See help(get_map)
for more details.
a ggmap object (a classed raster object with a bounding box attribute)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.