LineLayer class
A stroked line.
Constructors
-
LineLayer({required String id, Visibility? visibility, List<
Object> ? visibilityExpression, List<Object> ? filter, double? minZoom, double? maxZoom, String? slot, required String sourceId, String? sourceLayer, LineCap? lineCap, List<Object> ? lineCapExpression, LineJoin? lineJoin, List<Object> ? lineJoinExpression, double? lineMiterLimit, List<Object> ? lineMiterLimitExpression, double? lineRoundLimit, List<Object> ? lineRoundLimitExpression, double? lineSortKey, List<Object> ? lineSortKeyExpression, double? lineZOffset, List<Object> ? lineZOffsetExpression, double? lineBlur, List<Object> ? lineBlurExpression, int? lineBorderColor, List<Object> ? lineBorderColorExpression, double? lineBorderWidth, List<Object> ? lineBorderWidthExpression, int? lineColor, List<Object> ? lineColorExpression, List<double?> ? lineDasharray, List<Object> ? lineDasharrayExpression, double? lineDepthOcclusionFactor, List<Object> ? lineDepthOcclusionFactorExpression, double? lineEmissiveStrength, List<Object> ? lineEmissiveStrengthExpression, double? lineGapWidth, List<Object> ? lineGapWidthExpression, int? lineGradient, List<Object> ? lineGradientExpression, double? lineOcclusionOpacity, List<Object> ? lineOcclusionOpacityExpression, double? lineOffset, List<Object> ? lineOffsetExpression, double? lineOpacity, List<Object> ? lineOpacityExpression, String? linePattern, List<Object> ? linePatternExpression, List<double?> ? lineTranslate, List<Object> ? lineTranslateExpression, LineTranslateAnchor? lineTranslateAnchor, List<Object> ? lineTranslateAnchorExpression, int? lineTrimColor, List<Object> ? lineTrimColorExpression, List<double?> ? lineTrimFadeRange, List<Object> ? lineTrimFadeRangeExpression, List<double?> ? lineTrimOffset, List<Object> ? lineTrimOffsetExpression, double? lineWidth, List<Object> ? lineWidthExpression})
Properties
-
filter
↔ List<
Object> ? -
An expression specifying conditions on source features.
Only features that match the filter are displayed.
read / writeinherited
- hashCode → int
-
The hash code for this object.
read-onlyinherited
- id ↔ String
-
The ID of the Layer.
read / writeinherited
- lineBlur ↔ double?
-
Blur applied to the line, in pixels.
Default value: 0. Minimum value: 0.
read / write
-
lineBlurExpression
↔ List<
Object> ? -
Blur applied to the line, in pixels.
Default value: 0. Minimum value: 0.
read / write
- lineBorderColor ↔ int?
-
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.
Default value: "rgba(0, 0, 0, 0)".
read / write
-
lineBorderColorExpression
↔ List<
Object> ? -
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.
Default value: "rgba(0, 0, 0, 0)".
read / write
- lineBorderWidth ↔ double?
-
The width of the line border. A value of zero means no border.
Default value: 0. Minimum value: 0.
read / write
-
lineBorderWidthExpression
↔ List<
Object> ? -
The width of the line border. A value of zero means no border.
Default value: 0. Minimum value: 0.
read / write
- lineCap ↔ LineCap?
-
The display of line endings.
Default value: "butt".
read / write
-
lineCapExpression
↔ List<
Object> ? -
The display of line endings.
Default value: "butt".
read / write
- lineColor ↔ int?
-
The color with which the line will be drawn.
Default value: "#000000".
read / write
-
lineColorExpression
↔ List<
Object> ? -
The color with which the line will be drawn.
Default value: "#000000".
read / write
-
lineDasharray
↔ List<
double?> ? -
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: truespecified 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.read / write -
lineDasharrayExpression
↔ List<
Object> ? -
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: truespecified 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.read / write - lineDepthOcclusionFactor ↔ double?
-
Decrease line layer opacity based on occlusion from 3D objects. Value 0 disables occlusion, value 1 means fully occluded.
Default value: 1. Value range:
0, 1read / write -
lineDepthOcclusionFactorExpression
↔ List<
Object> ? -
Decrease line layer opacity based on occlusion from 3D objects. Value 0 disables occlusion, value 1 means fully occluded.
Default value: 1. Value range:
0, 1read / write - lineEmissiveStrength ↔ double?
-
Controls the intensity of light emitted on the source features.
Default value: 0. Minimum value: 0.
read / write
-
lineEmissiveStrengthExpression
↔ List<
Object> ? -
Controls the intensity of light emitted on the source features.
Default value: 0. Minimum value: 0.
read / write
- lineGapWidth ↔ double?
-
Draws a line casing outside of a line's actual path. Value indicates the width of the inner gap.
Default value: 0. Minimum value: 0.
read / write
-
lineGapWidthExpression
↔ List<
Object> ? -
Draws a line casing outside of a line's actual path. Value indicates the width of the inner gap.
Default value: 0. Minimum value: 0.
read / write
- lineGradient ↔ int?
-
A gradient used to color a line feature at various distances along its length. Defined using a
steporinterpolateexpression which outputs a color for each correspondingline-progressinput value.line-progressis a percentage of the line feature's total length as measured on the webmercator projected coordinate plane (anumberbetween0and1). Can only be used with GeoJSON sources that specify"lineMetrics": true.read / write -
lineGradientExpression
↔ List<
Object> ? -
A gradient used to color a line feature at various distances along its length. Defined using a
steporinterpolateexpression which outputs a color for each correspondingline-progressinput value.line-progressis a percentage of the line feature's total length as measured on the webmercator projected coordinate plane (anumberbetween0and1). Can only be used with GeoJSON sources that specify"lineMetrics": true.read / write - lineJoin ↔ LineJoin?
-
The display of lines when joining.
Default value: "miter".
read / write
-
lineJoinExpression
↔ List<
Object> ? -
The display of lines when joining.
Default value: "miter".
read / write
- lineMiterLimit ↔ double?
-
Used to automatically convert miter joins to bevel joins for sharp angles.
Default value: 2.
read / write
-
lineMiterLimitExpression
↔ List<
Object> ? -
Used to automatically convert miter joins to bevel joins for sharp angles.
Default value: 2.
read / write
- lineOcclusionOpacity ↔ double?
-
Opacity multiplier (multiplies line-opacity value) of the line part that is occluded by 3D objects. Value 0 hides occluded part, value 1 means the same opacity as non-occluded part. The property is not supported when
line-opacityhas data-driven styling. Default value: 0. Value range:0, 1read / write -
lineOcclusionOpacityExpression
↔ List<
Object> ? -
Opacity multiplier (multiplies line-opacity value) of the line part that is occluded by 3D objects. Value 0 hides occluded part, value 1 means the same opacity as non-occluded part. The property is not supported when
line-opacityhas data-driven styling. Default value: 0. Value range:0, 1read / write - lineOffset ↔ double?
-
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 value: 0.
read / write
-
lineOffsetExpression
↔ List<
Object> ? -
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 value: 0.
read / write
- lineOpacity ↔ double?
-
The opacity at which the line will be drawn.
Default value: 1. Value range:
0, 1read / write -
lineOpacityExpression
↔ List<
Object> ? -
The opacity at which the line will be drawn.
Default value: 1. Value range:
0, 1read / write - linePattern ↔ String?
-
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.
read / write
-
linePatternExpression
↔ List<
Object> ? -
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.
read / write
- lineRoundLimit ↔ double?
-
Used to automatically convert round joins to miter joins for shallow angles.
Default value: 1.05.
read / write
-
lineRoundLimitExpression
↔ List<
Object> ? -
Used to automatically convert round joins to miter joins for shallow angles.
Default value: 1.05.
read / write
- lineSortKey ↔ double?
-
Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.
read / write
-
lineSortKeyExpression
↔ List<
Object> ? -
Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.
read / write
-
lineTranslate
↔ List<
double?> ? -
The geometry's offset. Values are
x, ywhere negatives indicate left and up, respectively. Default value:0,0.read / write - lineTranslateAnchor ↔ LineTranslateAnchor?
-
Controls the frame of reference for
line-translate. Default value: "map".read / write -
lineTranslateAnchorExpression
↔ List<
Object> ? -
Controls the frame of reference for
line-translate. Default value: "map".read / write -
lineTranslateExpression
↔ List<
Object> ? -
The geometry's offset. Values are
x, ywhere negatives indicate left and up, respectively. Default value:0,0.read / write - lineTrimColor ↔ int?
-
The color to be used for rendering the trimmed line section that is defined by the
line-trim-offsetproperty. Default value: "transparent".read / write -
lineTrimColorExpression
↔ List<
Object> ? -
The color to be used for rendering the trimmed line section that is defined by the
line-trim-offsetproperty. Default value: "transparent".read / write -
lineTrimFadeRange
↔ List<
double?> ? -
The fade range for the trim-start and trim-end points is defined by the
line-trim-offsetproperty. The first element of the array represents the fade range from the trim-start point toward the end of the line, while the second element defines the fade range from the trim-end point toward the beginning of the line. The fade result is achieved by interpolating betweenline-trim-colorand the color specified by theline-coloror theline-gradientproperty. Default value:0,0. Minimum value:0,0. Maximum value:1,1.read / write -
lineTrimFadeRangeExpression
↔ List<
Object> ? -
The fade range for the trim-start and trim-end points is defined by the
line-trim-offsetproperty. The first element of the array represents the fade range from the trim-start point toward the end of the line, while the second element defines the fade range from the trim-end point toward the beginning of the line. The fade result is achieved by interpolating betweenline-trim-colorand the color specified by theline-coloror theline-gradientproperty. Default value:0,0. Minimum value:0,0. Maximum value:1,1.read / write -
lineTrimOffset
↔ List<
double?> ? -
The line part between
trim-start, trim-endwill be painted usingline-trim-color,which is transparent by default to produce a route vanishing effect. The line trim-off offset is based on the whole line range0.0, 1.0. Default value:0,0. Minimum value:0,0. Maximum value:1,1.read / write -
lineTrimOffsetExpression
↔ List<
Object> ? -
The line part between
trim-start, trim-endwill be painted usingline-trim-color,which is transparent by default to produce a route vanishing effect. The line trim-off offset is based on the whole line range0.0, 1.0. Default value:0,0. Minimum value:0,0. Maximum value:1,1.read / write - lineWidth ↔ double?
-
Stroke thickness.
Default value: 1. Minimum value: 0.
read / write
-
lineWidthExpression
↔ List<
Object> ? -
Stroke thickness.
Default value: 1. Minimum value: 0.
read / write
- lineZOffset ↔ double?
-
Vertical offset from ground, in meters. Defaults to 0. Not supported for globe projection at the moment.
read / write
-
lineZOffsetExpression
↔ List<
Object> ? -
Vertical offset from ground, in meters. Defaults to 0. Not supported for globe projection at the moment.
read / write
- maxZoom ↔ double?
-
The maximum zoom level for the layer. At zoom levels equal to or greater than the maxzoom, the layer will be hidden.
read / writeinherited
- minZoom ↔ double?
-
The minimum zoom level for the layer. At zoom levels less than the minzoom, the layer will be hidden.
read / writeinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-onlyinherited
- slot ↔ String?
-
The slot this layer is assigned to. If specified, and a slot with that name exists, it will be placed at that position in the layer order.
read / writeinherited
- sourceId ↔ String
-
The id of the source.
read / write
- sourceLayer ↔ String?
-
A source layer is an individual layer of data within a vector source. A vector source can have multiple source layers.
read / write
- visibility ↔ Visibility?
-
The visibility of the layer.
read / writeinherited
-
visibilityExpression
↔ List<
Object> ? -
The visibility of the layer.
read / writeinherited
Methods
-
getType(
) → String -
Get the type of current layer as a String.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited