Line Layer
See also
Parameters
the ID of the layer
the ID of the source
Constructors
Types
Functions
Bind the layer to the Style.
Bind the layer to the map controller.
A filter is a property at the layer level that determines which features should be rendered in a style layer.
Set the LineBlur property transition options
DSL for lineBlurTransition.
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.
Set the LineBorderColor property transition options
DSL for lineBorderColorTransition.
The width of the line border. A value of zero means no border.
Set the LineBorderWidth property transition options
DSL for lineBorderWidthTransition.
Set the LineColor property transition options
DSL for lineColorTransition.
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.
Decrease line layer opacity based on occlusion from 3D objects. Value 0 disables occlusion, value 1 means fully occluded.
Set the LineDepthOcclusionFactor property transition options
DSL for lineDepthOcclusionFactorTransition.
Controls the intensity of light emitted on the source features. This property works only with 3D light, i.e. when lights
root property is defined.
Set the LineEmissiveStrength property transition options
DSL for lineEmissiveStrengthTransition.
Draws a line casing outside of a line's actual path. Value indicates the width of the inner gap.
Set the LineGapWidth property transition options
DSL for lineGapWidthTransition.
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
.
Used to automatically convert miter joins to bevel joins for sharp angles.
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.
Set the LineOffset property transition options
DSL for lineOffsetTransition.
The opacity at which the line will be drawn.
Set the LineOpacity property transition options
DSL for lineOpacityTransition.
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.
Used to automatically convert round joins to miter joins for shallow angles.
Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.
The geometry's offset. Values are x, y where negatives indicate left and up, respectively.
Controls the frame of reference for line-translate
.
Set the LineTranslate property transition options
DSL for lineTranslateTransition.
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.
Set the LineWidth property transition options
DSL for lineWidthTransition.
A source layer is an individual layer of data within a vector source. A vector source can have multiple source layers.
Whether this layer is displayed.
Properties
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.
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.
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
.