Line Layer State
The state holder for LineLayer's layer properties.
See also
Constructors
Construct an default LineLayerState.
Properties
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.
Defines the transition of lineBlur. Default value: 0. Minimum value: 0.
Defines the transition of lineBorderColor. Default value: "rgba(0, 0, 0, 0)".
Defines the transition of lineBorderWidth. Default value: 0. Minimum value: 0.
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. Minimum value: 0.
Defines the transition of lineDepthOcclusionFactor. Default value: 1. Value range: 0, 1
Defines the transition of lineEmissiveStrength. Default value: 0. Minimum value: 0.
Defines the transition of lineGapWidth. Default value: 0. Minimum value: 0.
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
.
Defines the transition of lineOcclusionOpacity. Default value: 0. Value range: 0, 1
Defines the transition of lineOpacity. Default value: 1. Value range: 0, 1
Defines the transition of lineWidth. Default value: 1. Minimum value: 0.