get_openstreetmap
accesses a tile server for OpenStreetMap and
downloads/formats a map image. This is simply a wrapper for the web-based
version at get_openstreetmap(bbox = c(left = -95.80204, bottom = 29.38048, right =
-94.92313, top = 30.14344), scale = 606250, format = c("png", "jpeg",
"svg", "pdf", "ps"), messaging = FALSE, urlonly = FALSE,
filename = "ggmapTemp", color = c("color", "bw"), ...)
The scale argument is a tricky number to correctly specify.
download.file
with the message HTTP status
'503 Service Unavailable'. You can confirm this by setting urlonly = TRUE,
and then entering the URL in a web browser. the solution is either (1)
change sources or (2) wait for the OSM servers to come back up.See
ggmap
# osm servers get overloaded, which can result in
# erroneous failed checks
osm <- get_openstreetmap(urlonly = TRUE)
ggmap(osm)
Run the code above in your browser using DataLab