Learn R Programming

loon (version 1.4.1)

l_layer.SpatialLinesDataFrame: Layer lines in SpatialLinesDataFrame object

Description

Methods to plot map data defined in the sp package

Usage

# S3 method for SpatialLinesDataFrame
l_layer(widget, x, asSingleLayer = TRUE, ...)

Value

layer id

Arguments

widget

widget widget path as a string or as an object handle

x

an object defined in the sp class

asSingleLayer

If TRUE then prefer a single layer over groups with nested 1-dimensinal layers

...

arguments forwarded to the relative l_layer function

Details

Note that currently loon does neither support holes and ring directions.

References

Applied Spatial Data Analysis with R by Bivand, Roger S. and Pebesma, Edzer and Gomez-Rubio and Virgilio

See Also

sp, l_layer

Examples

Run this code

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