Line
A stroke line object.
Property of Paint
line-blur
Blur applied to the line, in pixels.or not the fill should be antialiased. (Default : 0)
Numeric
line-color
The color with which the line will be drawn. (Default : #000000)
Hex values, RGB, RGBA, HSL, HSLA, Colors Name
line-dasharray
Specifies the lengths of the alternating dashes and gaps that form the dash pattern. (Default : [0,0])
Array of numbers
line-gap-width
Draws a line casing outside of a line's actual path. Value indicates the width of the inner gap. (Default : 0)
Numeric
line-gradient
Defines a gradient with which to color a line feature. Can only be used with GeoJSON sources that specify "lineMetrics": true
.
(Default : map)
Hex values, RGB, RGBA, HSL, HSLA, Colors Name
line-offset
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. (Default : 0)
Numeric
line-opacity
The opacity at which the line will be drawn. between 0 and 1 inclusive. (Default : 1)
Numeric
line-translate
The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively. (Default : [0,0])
Array of numbers
line-translate-anchor
Controls the frame of reference for line-translate
.
"map"
:
The line is translated relative to the map.
"viewport"
:
The line is translated relative to the viewport. (Default : map)
String
line-width
Stroke thickness. It must be over than 0. (Default : 1)
Numeric
Property of Layout
visibility
Whether this layer is displayed.
"visible"
:
The layer is shown.
"none"
:
The layer is not shown. (Default : visible)
String
line-cap
The display of line endings.
"butt"
:
A cap with a squared-off end which is drawn to the exact endpoint of the line.
"round"
:
A cap with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line.
"square"
:
A cap with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width. (Default : butt)
String
line-join
The display of lines when joining.
"bevel"
:
A join with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width.
"round"
:
A join with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line.
"miter"
:
A join with a sharp, angled corner which is drawn with the outer sides beyond the endpoint of the path until they meet. (Default : miter)
String
line-miter-limit
Used to automatically convert miter joins to bevel joins for sharp angles. (Default : 2)
Numeric
line-round-limit
Used to automatically convert round joins to miter joins for shallow angles. (Default : 1.05)
Numeric
Last updated