layer: Create a map vector layer object.

Description Usage Arguments Details Value Author(s) Examples

View source: R/layer.R

Description

Create a map vector layer object for some data and an optional style. The data can be points, lines, or polygons.

Usage

1
2
3
layer(layerData, name, style = lstyle())
## S3 method for class 'layer'
print(x,...)

Arguments

layerData

An sp-class object, such as a SpatialPointsDataFrame

name

An identifier for the data. Must be a valid Javascript label.

style

A style object.

x

A layer object

...

Arguments to the print method.

Details

This function just copies the data and wraps it up with a name and a style.

Value

An object of class 'layer'.

Author(s)

Barry Rowlingson

Examples

1
2
3
4
5
data = data.frame(a=1:10,b=1:10)
coordinates(data)=cbind(runif(10,0,1),runif(10,53,54))

l1 = layer(data,name="mydata",
   style=lstyle(fillColor="red", pointRadius="${a}"))

webmaps documentation built on May 31, 2017, 2:24 a.m.