Description Usage Arguments Details Value Author(s) See Also Examples
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 http://www.openstreetmap.org/. If you don't know how to
get the map you want, go there, navigate to the map extent that you want,
click the export tab at the top of the page, and copy the information into
this function.
1 2 3 4 |
bbox |
a bounding box in the format c(lowerleftlon, lowerleftlat, upperrightlon, upperrightlat) |
scale |
scale parameter, see http://wiki.openstreetmap.org/wiki/MinScaleDenominator. smaller scales provide a finer degree of detail, where larger scales produce more coarse detail. The scale argument is a tricky number to correctly specify. In most cases,
if you get an error when downloading an openstreetmap the error is
attributable to an improper scale specification.
|
format |
character string providing image format - png, jpeg, svg, pdf, and ps formats |
messaging |
turn messaging on/off |
urlonly |
return url only |
filename |
destination file for download (file extension added according to format) |
color |
color or black-and-white |
... |
... |
receive an error message from 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 http://www.openstreetmap.org/copyright for license and copyright information.
a ggmap object (a classed raster object with a bounding box attribute)
David Kahle david.kahle@gmail.com
http://www.openstreetmap.org/, ggmap
1 2 3 4 5 6 7 8 9 | ## Not run:
# osm servers get overloaded, which can result in
# erroneous failed checks
osm <- get_openstreetmap(urlonly = TRUE)
ggmap(osm)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.