LineLayer
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
Unique layer name.
Vector data source for this layer.
Layer to use from the given vector tile source.
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]
.
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]
.
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.
Whether the layer should be displayed.
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.
The geometry's offset relative to the translateAnchor. Negative numbers indicate left and up, respectively.
Frame of reference for offsetting geometry.
Ignored if translate is not set.
Lines opacity. A value in range [0..1]
.
Lines color.
Ignored if pattern is specified.
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.
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.
Blur applied to the lines.
Thickness of the lines' stroke.
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.
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.
Display of line endings.
Display of joined lines.
Limit at which to automatically convert to bevel join for sharp angles when join is LineJoin.Miter.
Limit at which to automatically convert to miter join for sharp angles when join is LineJoin.Round.
Function to call when any feature in this layer has been clicked.
Function to call when any feature in this layer has been long-clicked.