
Last chance! 50% off unlimited learning
Sale ends in
Methods to plot map data defined in the sp
package
# S3 method for Line
l_layer(widget, x, ...)
layer id
widget widget path as a string or as an object handle
an object defined in the sp
class
arguments forwarded to the relative l_layer
function
Note that currently loon does neither support holes and ring directions.
Applied Spatial Data Analysis with R by Bivand, Roger S. and Pebesma, Edzer and Gomez-Rubio and Virgilio
sp
, l_layer
if (interactive()) {
if (requireNamespace("rworldmap", quietly = TRUE)) {
world <- rworldmap::getMap(resolution = "coarse")
p <- l_plot()
lmap <- l_layer(p, world, asSingleLayer=TRUE)
l_scaleto_world(p)
attr(lmap,'hole')
attr(lmap,'NAME')
}
}
Run the code above in your browser using DataLab