Description Usage Arguments Examples
View source: R/ggopenstreetmap.R
Plot OpenStreetMap Tiles On 'ggplot2'
1 | annotation_osm(obj, zoomin = +2)
|
obj |
A 'sf' object. |
zoomin |
Additional zoom level. |
1 2 3 4 5 | library(ggplot2)
nc <- sf::st_read(system.file("shape/nc.shp", package = "sf"), quiet = TRUE)
ggplot(nc) +
annotation_osm(nc) +
geom_sf(aes(fill = AREA), alpha = 0.5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.