LineLayer

fun LineLayer(sourceState: SourceState, layerId: String = remember { generateRandomLayerId("line") }, lineCap: LineCap = LineCap.default, lineJoin: LineJoin = LineJoin.default, lineMiterLimit: LineMiterLimit = LineMiterLimit.default, lineRoundLimit: LineRoundLimit = LineRoundLimit.default, lineSortKey: LineSortKey = LineSortKey.default, lineBlur: LineBlur = LineBlur.default, lineBlurTransition: Transition = Transition.default, lineBorderColor: LineBorderColor = LineBorderColor.default, lineBorderColorTransition: Transition = Transition.default, lineBorderWidth: LineBorderWidth = LineBorderWidth.default, lineBorderWidthTransition: Transition = Transition.default, lineColor: LineColor = LineColor.default, lineColorTransition: Transition = Transition.default, lineDasharray: LineDasharray = LineDasharray.default, lineDepthOcclusionFactor: LineDepthOcclusionFactor = LineDepthOcclusionFactor.default, lineDepthOcclusionFactorTransition: Transition = Transition.default, lineEmissiveStrength: LineEmissiveStrength = LineEmissiveStrength.default, lineEmissiveStrengthTransition: Transition = Transition.default, lineGapWidth: LineGapWidth = LineGapWidth.default, lineGapWidthTransition: Transition = Transition.default, lineGradient: LineGradient = LineGradient.default, lineOffset: LineOffset = LineOffset.default, lineOffsetTransition: Transition = Transition.default, lineOpacity: LineOpacity = LineOpacity.default, lineOpacityTransition: Transition = Transition.default, linePattern: LinePattern = LinePattern.default, lineTranslate: LineTranslate = LineTranslate.default, lineTranslateTransition: Transition = Transition.default, lineTranslateAnchor: LineTranslateAnchor = LineTranslateAnchor.default, lineTrimOffset: LineTrimOffset = LineTrimOffset.default, lineWidth: LineWidth = LineWidth.default, lineWidthTransition: Transition = Transition.default, visibility: Visibility = Visibility.default, minZoom: MinZoom = MinZoom.default, maxZoom: MaxZoom = MaxZoom.default, sourceLayer: SourceLayer = SourceLayer.default, filter: Filter = Filter.default)

A stroked line.

See also

Parameters

sourceState

the source that drives this layer.

layerId

the ID of the layer, by default, a random id will be generated with UUID.

lineCap

The display of line endings.

lineJoin

The display of lines when joining.

lineMiterLimit

Used to automatically convert miter joins to bevel joins for sharp angles.

lineRoundLimit

Used to automatically convert round joins to miter joins for shallow angles.

lineSortKey

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

lineBlur

Blur applied to the line, in pixels.

lineBorderColor

The color of the line border. If line-border-width is greater than zero and the alpha value of this color is 0 (default), the color for the border will be selected automatically based on the line color.

lineBorderWidth

The width of the line border. A value of zero means no border.

lineColor

The color with which the line will be drawn.

lineDasharray

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.

lineDepthOcclusionFactor

Decrease line layer opacity based on occlusion from 3D objects. Value 0 disables occlusion, value 1 means fully occluded.

lineEmissiveStrength

Controls the intensity of light emitted on the source features.

lineGapWidth

Draws a line casing outside of a line's actual path. Value indicates the width of the inner gap.

lineGradient

A gradient used to color a line feature at various distances along its length. Defined using a step or interpolate expression which outputs a color for each corresponding line-progress input value. line-progress is a percentage of the line feature's total length as measured on the webmercator projected coordinate plane (a number between 0 and 1). Can only be used with GeoJSON sources that specify "lineMetrics": true.

lineOffset

The line's 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.

lineOpacity

The opacity at which the line will be drawn.

linePattern

Name of image in sprite 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.

lineTranslate

The geometry's offset. Values are x, y where negatives indicate left and up, respectively.

lineTranslateAnchor

Controls the frame of reference for line-translate.

lineTrimOffset

The line part between trim-start, trim-end will be marked as transparent to make a route vanishing effect. The line trim-off offset is based on the whole line range 0.0, 1.0.

lineWidth

Stroke thickness.

visibility

Whether this layer is displayed.

minZoom

The minimum zoom level for the layer. At zoom levels less than the minzoom, the layer will be hidden.

maxZoom

The maximum zoom level for the layer. At zoom levels equal to or greater than the maxzoom, the layer will be hidden.

sourceLayer

Layer to use from a vector tile source. Required for vector tile sources; prohibited for all other source types, including GeoJSON sources.

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 ["feature-state", ...] expression is not supported in filter expressions. The ["pitch"] and ["distance-from-center"] expressions are supported only for filter expressions on the symbol layer.