Description Usage Arguments Details Value Examples
Create a backdrop for sketchy maps, based on the extent of spdf
. The backdrop
can be from OpenStreetMap, Google, Stamen, ESRI, bing, Apple or other sources
depending on location.
1 2 | make_backdrop(spdf,bw,sepia,...)
spdf
|
spdf |
a SpatialPolygons or SpatialPolygonsDataFrame object |
bw |
A variable indicating whether to create a monochrome backdrop - 0 indicates use colour, 1 is standard brightness, other values vary brightness |
sepia |
A variable indicating whether to create a sepia backdrop - 0 indicates use colour, 1 is standard brightness, other values vary brightness - this overwrites |
... |
parameters passed on to openmap |
This function requires that spdf
has a well-defined proj4string
in
order to match the backdrop map with the extent of the spatial object.
Echos spdf
- this is useful for pipelines using %>%
1 2 3 4 5 6 | # Here make_canvas is inserted in a pipeline after a simplified and tidied
# map of Irish NUTS3 regions is created. A sketchy rendition is then added to the
# backdrop of type osm-bw (monochrome OpenStreetMap)
data(RA)
RA.spdf %>% small_chop %>% gSimplify(tol=11000) %>% tidy_it %>%
make_backdrop(type='osm',sepia=0.8) %>% sketch_it(col='darkred',lwd=2,rough=0.08)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.