Type Alias PolylineLayerOptions
lineBlur?: number | ZoomNumberValues;
lineCap?: "butt" | "round" | "square";
lineColor?: string | ZoomStringValues;
lineDashArray?: number[] | string;
lineGapWidth?: number | ZoomNumberValues;
lineJoin?: "bevel" | "round" | "miter";
lineOpacity?: number | ZoomNumberValues;
lineWidth?: number | ZoomNumberValues;
outlineBlur?: number | ZoomNumberValues;
}
Type Declaration
OptionallineBlur?: number | ZoomNumberValuesOptionallineCap?: "butt" | "round" | "square"The display of line endings for both the line and the outline (if
.outlineistrue)- "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: "round"
OptionallineColor?: string | ZoomStringValuesColor of the line (or polyline). This is can be a constant color string or a definition based on zoom levels. Default: a color randomly pick from a list
OptionallineDashArray?: number[] | stringSequence of line and void to create a dash pattern. The unit is the line width so that a dash array value of
[3, 1]will create a segment worth 3 times the width of the line, followed by a spacing worth 1 time the line width, and then repeat.Alternatively, this property can be a string made of underscore and whitespace characters such as
"___ _ "and internaly this will be translated into [3, 1, 1, 1]. Note that this way of describing dash arrays with a string only works for integer values.Dash arrays can contain more than 2 element to create more complex patters. For instance a dash array value of [3, 2, 1, 2] will create the following sequence:
- a segment worth 3 times the width
- a spacing worth 2 times the width
- a segment worth 1 times the width
- a spacing worth 2 times the width
- repeat
Default: no dash pattern
OptionallineGapWidth?: number | ZoomNumberValuesDraws a line casing outside of a line's actual path. Value indicates the width of the inner gap. Default:
0OptionallineJoin?: "bevel" | "round" | "miter"The display of lines when joining for both the line and the outline (if
.outlineistrue)- "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: "round"
OptionallineOpacity?: number | ZoomNumberValuesOpacity of the line. This is can be a constant opacity in [0, 1] or a definition based on zoom levels. Default:
1OptionallineWidth?: number | ZoomNumberValuesWidth of the line (relative to screen-space). This is can be a constant width or a definition based on zoom levels Default:
3OptionaloutlineBlur?: number | ZoomNumberValuesHow blury the outline is, with
0being no blur and10and beyond being quite blurry. Applies only if.outlineistrue. Default:0
How blury the line is, with
0being no blur and10and beyond being quite blurry. Default:0