layerKey

fun layerKey(label: String, group: String? = null, index: Int? = null, alpha: Any? = null, color: Any? = null, fill: Any? = null, shape: Any? = null, size: Any? = null, width: Any? = null, height: Any? = null, linetype: Any? = null, stroke: Any? = null): Map<String, Any>

Function to configure a custom legend.

Notes

The group name specified with the group parameter can be used in the labs() and guides() functions to further customize the display of this group (e.g. change its name). In particular, items in the "manual" group will be displayed without a title unless you change it manually.

If you set the same group and label for a legend element in different layers, they will merge into one complex legend element.

Parameters

label

Text for the element in the custom legend.

group

default = "manual". Group name by which elements are combined into a legend group.

index

Position of the element in the custom legend.

alpha

Transparency level.

color

Line color.

fill

Fill color.

shape

Shape of the point.

size

Size of the geometry.

width

Width.

height

Height.

linetype

Type of the line.

stroke

Width of the shape border.