layerLegend {rleafmap} | R Documentation |
Data layer legend
Description
This function creates a legend object that can be attached to a data layer.
Usage
layerLegend(
style,
labels = "",
title = NULL,
position = "bottomright",
png = NULL,
size = 5,
png.width = NULL,
png.height = NULL,
stroke.col = 1,
stroke.lwd = 1,
stroke.lty = -1,
stroke.alpha = 1,
fill.col = 2,
fill.alpha = 0.5,
cells.range = c(1, 10),
cells.col = heat.colors(12),
cells.alpha = 1
)
Arguments
style |
the style of legend to generate.
Can be one of " |
labels |
a vector to label each element of the legend. |
title |
a title which will appear above the legend.
If |
position |
a character string indicating where should the legend be displayed.
This must be one of " |
png |
character vector giving the paths for the PNG icons. If |
size |
a numerical vector giving the size of points (radius in pixels). |
png.width , png.height |
numerical vectors giving the PNG icons dimensions on the map (in pixels). |
stroke.col |
a vector of any of the three kinds of R color specifications to set strokes color. |
stroke.lwd |
a numerical vector to set strokes width. |
stroke.lty |
a character vector that defines the strokes dash patterns (See Details). |
stroke.alpha |
a vector of numeric values in |
fill.col |
a vector of any of the three kinds of R color specifications to set fill colors. |
fill.alpha |
a vector of numeric values in |
cells.range |
range of gradient values. |
cells.col |
a vector of any of the three kinds of R color specifications giving the colors of the gradient. |
cells.alpha |
a vector of numeric values in |
Value
an object layerlegend
which can be passed to an spLayer*
function through the legend
argument.