knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
Download and plot Open Street Map, Bing Maps, and other tiled map sources. A previous version of this package provided an API for plotting base maps; the new API is more low-level and covers tile math, URL generation, and fetching tiles in parallel.
The rosm package is available on CRAN, and can be installed using install.packages("rosm")
.
library(rosm) bounds <- wk::rct( -7476083, 5349058, -6594103, 6243203, crs = osm_crs_native() ) (grd <- osm_raster(bounds, osm_url_spec_example())) plot(grd)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.