ilayer: Create a raster layer object.

Description Usage Arguments Details Value Author(s) Examples

View source: R/ilayer.R

Description

Create an object for a raster overlay on a map.

Usage

1
2
3
ilayer(xyz, name, pfunc = colorRamp(c("white", "black")), opacity=0.6,...)
## S3 method for class 'ilayer'
print(x,...)

Arguments

xyz

A list with x, y, and z components. Lengths of x and y must equal the dimensions of the z matrix. Coordinates must be in WGS84 lat-long.

name

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

pfunc

A function that maps values to colours.

opacity

The opacity level for the map (0 = transparent, 1 = opaque).

...

Extra arguments, unused at the moment...

x

An ilayer object

Details

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

Value

An object of class 'ilayer'.

Author(s)

Barry Rowlingson

Examples

1
2
3
4
xyz =
list(x=seq(0,1,len=10),y=seq(53,54,len=10),z=matrix(runif(100),10,10))

l2 = ilayer(xyz,"randomfield",colorRamp(c("white","red")),opacity=0.2)

webmaps documentation built on May 2, 2019, 4:52 p.m.