Learn R Programming

ggmap (version 1.3)

qmap: Quick map plot

Description

qmap is a wrapper for ggmapplot and ggmap.

Usage

qmap(location, ...)

Arguments

location
character; location of interest
...
stuff to pass to ggmapplot and ggmap.

Value

  • a ggplot object

See Also

ggmapplot and ggmap.

Examples

Run this code
qmap(location = 'waco')
qmap(location = 'waco', zoom = 14)
qmap(location = 'waco', zoom = 14, source = 'osm')
qmap(location = 'waco', zoom = 14, source = 'osm', scale = 20000)
qmap(location = 'waco', zoom = 14, maptype = 'satellite')
qmap(location = 'waco', zoom = 14, maptype = 'hybrid')

wh <- geocode('the white house')
qmap('the white house', base_layer = ggplot(aes(x=lon, y=lat), data = wh)) +
  geom_point()
qmap('the white house', maprange = TRUE,
  base_layer = ggplot(aes(x=lon, y=lat), data = wh)) +
  geom_point()

Run the code above in your browser using DataLab