LineLayer

@Composable
fun LineLayer(    id: String,     source: Source,     sourceLayer: String = "",     minZoom: Float = 0.0f,     maxZoom: Float = 24.0f,     filter: Expression<BooleanValue> = nil(),     visible: Boolean = true,     sortKey: Expression<FloatValue> = nil(),     translate: Expression<DpOffsetValue> = const(DpOffset.Zero),     translateAnchor: Expression<TranslateAnchor> = const(TranslateAnchor.Map),     opacity: Expression<FloatValue> = const(1f),     color: Expression<ColorValue> = const(Color.Black),     dasharray: Expression<VectorValue<Number>> = nil(),     pattern: Expression<ImageValue> = nil(),     gradient: Expression<ColorValue> = nil(),     blur: Expression<DpValue> = const(0.dp),     width: Expression<DpValue> = const(1.dp),     gapWidth: Expression<DpValue> = const(0.dp),     offset: Expression<DpValue> = const(0.dp),     cap: Expression<LineCap> = const(LineCap.Butt),     join: Expression<LineJoin> = const(LineJoin.Miter),     miterLimit: Expression<FloatValue> = const(2f),     roundLimit: Expression<FloatValue> = const(1.05f),     onClick: FeaturesClickHandler? = null,     onLongClick: FeaturesClickHandler? = null)(source)

A line layer draws polylines and polygons from the sourceLayer in the given source in the given style as a series of lines and outlines, respectively. If nothing else is specified, these will be black lines of 1 dp width.

Parameters

id

Unique layer name.

source

Vector data source for this layer.

sourceLayer

Layer to use from the given vector tile source.

minZoom

The minimum zoom level for the layer. At zoom levels less than this, the layer will be hidden. A value in the range of [0..24].

maxZoom

The maximum zoom level for the layer. At zoom levels equal to or greater than this, the layer will be hidden. A value in the range of [0..24].

filter

An expression specifying conditions on source features. Only features that match the filter are displayed. Zoom expressions in filters are only evaluated at integer zoom levels. The featureState expression is not supported in filter expressions.

visible

Whether the layer should be displayed.

sortKey

Sorts features within this layer in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.

translate

The geometry's offset relative to the translateAnchor. Negative numbers indicate left and up, respectively.

translateAnchor

Frame of reference for offsetting geometry.

Ignored if translate is not set.

opacity

Lines opacity. A value in range [0..1].

color

Lines color.

Ignored if pattern is specified.

dasharray

Specifies the lengths of the alternating dashes and gaps that form the dash pattern. The lengths are later scaled by the line width. To convert a dash length to pixels, multiply the length by the current line width. Note that GeoJSON sources with lineMetrics = true specified won't render dashed lines to the expected scale. Also note that zoom-dependent expressions will be evaluated only at integer zoom levels. Ignored if pattern is specified.

pattern

Image to use for drawing image lines. For seamless patterns, image width must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.

gradient

Defines a gradient with which to color a line feature. Can only be used with GeoJSON sources that specify lineMetrics = true.

Ignored if pattern or dasharray is specified.

blur

Blur applied to the lines.

width

Thickness of the lines' stroke.

gapWidth

If not 0, instead of one, two lines, each left and right of each line's actual path are drawn, with the given gap in-between them.

offset

The lines' offset. For linear features, a positive value offsets the line to the right, relative to the direction of the line, and a negative value to the left. For polygon features, a positive value results in an inset, and a negative value results in an outset.

cap

Display of line endings.

join

Display of joined lines.

miterLimit

Limit at which to automatically convert to bevel join for sharp angles when join is LineJoin.Miter.

roundLimit

Limit at which to automatically convert to miter join for sharp angles when join is LineJoin.Round.

onClick

Function to call when any feature in this layer has been clicked.

onLongClick

Function to call when any feature in this layer has been long-clicked.