Learn R Programming

ggmap (version 2.6.1)

qmap: Quick map plot

Description

qmap is a wrapper for ggmap and get_map.

Usage

qmap(location = "houston", ...)

Arguments

location

character; location of interest

...

stuff to pass to ggmap and get_map.

Value

a ggplot object

See Also

ggmap and get_map.

Examples

Run this code
# NOT RUN {
# }
# NOT RUN {
# these examples have been excluded for checking efficiency

qmap(location = "baylor university")
qmap(location = "baylor university", zoom = 14)
qmap(location = "baylor university", zoom = 14, source = "osm")
qmap(location = "baylor university", zoom = 14, source = "osm", scale = 20000)
qmap(location = "baylor university", zoom = 14, maptype = "satellite")
qmap(location = "baylor university", zoom = 14, maptype = "hybrid")
qmap(location = "baylor university", zoom = 14, maptype = "toner", source = "stamen")
qmap(location = "baylor university", zoom = 14, maptype = "watercolor", source = "stamen")
qmap(location = "baylor university", zoom = 14, maptype = "terrain-background", source = "stamen")
qmap(location = "baylor university", zoom = 14, maptype = "toner-lite", source = "stamen")

api_key <- "<your api key here>"
qmap(location = "baylor university", zoom = 14, maptype = 15434,
  source = "cloudmade", api_key = api_key)

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



# }
# NOT RUN {
# }

Run the code above in your browser using DataLab