LineLayer

class LineLayer(layerId: String, sourceId: String) : Layer, LineLayerDsl

A stroked line.

See also

Parameters

layerId

the ID of the layer

sourceId

the ID of the source

Constructors

LineLayer
Link copied to clipboard
fun LineLayer(layerId: String, sourceId: String)

Types

Companion
Link copied to clipboard
object Companion

Static variables and methods.

Functions

bindTo
Link copied to clipboard
fun bindTo(delegate: StyleInterface)

Bind the layer to the Style.

open override fun bindTo(delegate: StyleInterface, position: LayerPosition?)

Bind the layer to the map controller.

filter
Link copied to clipboard
open override fun filter(filter: Expression): LineLayer

A filter is a property at the layer level that determines which features should be rendered in a style layer.

lineBlur
Link copied to clipboard
open override fun lineBlur(lineBlur: Expression): LineLayer
open override fun lineBlur(lineBlur: Double): LineLayer

Blur applied to the line, in pixels.

lineBlurTransition
Link copied to clipboard
open override fun lineBlurTransition(options: StyleTransition): LineLayer

Set the LineBlur property transition options

open override fun lineBlurTransition(block: StyleTransition.Builder.() -> Unit): LineLayer
lineCap
Link copied to clipboard
open override fun lineCap(lineCap: Expression): LineLayer
open override fun lineCap(lineCap: LineCap): LineLayer

The display of line endings.

lineColor
Link copied to clipboard
open override fun lineColor(lineColor: Expression): LineLayer
open override fun lineColor(@ColorInt lineColor: Int): LineLayer
open override fun lineColor(lineColor: String): LineLayer

The color with which the line will be drawn.

lineColorTransition
Link copied to clipboard
open override fun lineColorTransition(options: StyleTransition): LineLayer

Set the LineColor property transition options

open override fun lineColorTransition(block: StyleTransition.Builder.() -> Unit): LineLayer
lineDasharray
Link copied to clipboard
open override fun lineDasharray(lineDasharray: Expression): LineLayer
open override fun lineDasharray(lineDasharray: List<Double>): LineLayer

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.

lineDasharrayTransition
Link copied to clipboard
open override fun lineDasharrayTransition(options: StyleTransition): LineLayer

Set the LineDasharray property transition options

open override fun lineDasharrayTransition(block: StyleTransition.Builder.() -> Unit): LineLayer
lineGapWidth
Link copied to clipboard
open override fun lineGapWidth(lineGapWidth: Expression): LineLayer
open override fun lineGapWidth(lineGapWidth: Double): LineLayer

Draws a line casing outside of a line's actual path. Value indicates the width of the inner gap.

lineGapWidthTransition
Link copied to clipboard
open override fun lineGapWidthTransition(options: StyleTransition): LineLayer

Set the LineGapWidth property transition options

open override fun lineGapWidthTransition(block: StyleTransition.Builder.() -> Unit): LineLayer
lineGradient
Link copied to clipboard
open override fun lineGradient(lineGradient: Expression): LineLayer

Defines a gradient with which to color a line feature. Can only be used with GeoJSON sources that specify "lineMetrics": true.

lineJoin
Link copied to clipboard
open override fun lineJoin(lineJoin: Expression): LineLayer
open override fun lineJoin(lineJoin: LineJoin): LineLayer

The display of lines when joining.

lineMiterLimit
Link copied to clipboard
open override fun lineMiterLimit(lineMiterLimit: Expression): LineLayer
open override fun lineMiterLimit(lineMiterLimit: Double): LineLayer

Used to automatically convert miter joins to bevel joins for sharp angles.

lineOffset
Link copied to clipboard
open override fun lineOffset(lineOffset: Expression): LineLayer
open override fun lineOffset(lineOffset: Double): LineLayer

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.

lineOffsetTransition
Link copied to clipboard
open override fun lineOffsetTransition(options: StyleTransition): LineLayer

Set the LineOffset property transition options

open override fun lineOffsetTransition(block: StyleTransition.Builder.() -> Unit): LineLayer
lineOpacity
Link copied to clipboard
open override fun lineOpacity(lineOpacity: Expression): LineLayer
open override fun lineOpacity(lineOpacity: Double): LineLayer

The opacity at which the line will be drawn.

lineOpacityTransition
Link copied to clipboard
open override fun lineOpacityTransition(options: StyleTransition): LineLayer

Set the LineOpacity property transition options

open override fun lineOpacityTransition(block: StyleTransition.Builder.() -> Unit): LineLayer
linePattern
Link copied to clipboard
open override fun linePattern(linePattern: Expression): LineLayer
open override fun linePattern(linePattern: String): LineLayer

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.

linePatternTransition
Link copied to clipboard
open override fun linePatternTransition(options: StyleTransition): LineLayer

Set the LinePattern property transition options

open override fun linePatternTransition(block: StyleTransition.Builder.() -> Unit): LineLayer
lineRoundLimit
Link copied to clipboard
open override fun lineRoundLimit(lineRoundLimit: Expression): LineLayer
open override fun lineRoundLimit(lineRoundLimit: Double): LineLayer

Used to automatically convert round joins to miter joins for shallow angles.

lineSortKey
Link copied to clipboard
open override fun lineSortKey(lineSortKey: Expression): LineLayer
open override fun lineSortKey(lineSortKey: Double): LineLayer

Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.

lineTranslate
Link copied to clipboard
open override fun lineTranslate(lineTranslate: Expression): LineLayer
open override fun lineTranslate(lineTranslate: List<Double>): LineLayer

The geometry's offset. Values are x, y where negatives indicate left and up, respectively.

lineTranslateAnchor
Link copied to clipboard
open override fun lineTranslateAnchor(lineTranslateAnchor: Expression): LineLayer
open override fun lineTranslateAnchor(lineTranslateAnchor: LineTranslateAnchor): LineLayer

Controls the frame of reference for line-translate.

lineTranslateTransition
Link copied to clipboard
open override fun lineTranslateTransition(options: StyleTransition): LineLayer

Set the LineTranslate property transition options

open override fun lineTranslateTransition(block: StyleTransition.Builder.() -> Unit): LineLayer
lineTrimOffset
Link copied to clipboard
open override fun lineTrimOffset(lineTrimOffset: Expression): LineLayer
open override fun lineTrimOffset(lineTrimOffset: List<Double>): LineLayer

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.

lineWidth
Link copied to clipboard
open override fun lineWidth(lineWidth: Expression): LineLayer
open override fun lineWidth(lineWidth: Double): LineLayer

Stroke thickness.

lineWidthTransition
Link copied to clipboard
open override fun lineWidthTransition(options: StyleTransition): LineLayer

Set the LineWidth property transition options

open override fun lineWidthTransition(block: StyleTransition.Builder.() -> Unit): LineLayer
maxZoom
Link copied to clipboard
open override fun maxZoom(maxZoom: Double): LineLayer

The maximum zoom level for the layer. At zoom levels equal to or greater than the maxzoom, the layer will be hidden.

minZoom
Link copied to clipboard
open override fun minZoom(minZoom: Double): LineLayer

The minimum zoom level for the layer. At zoom levels less than the minzoom, the layer will be hidden.

sourceLayer
Link copied to clipboard
open override fun sourceLayer(sourceLayer: String): LineLayer

A source layer is an individual layer of data within a vector source. A vector source can have multiple source layers.

visibility
Link copied to clipboard
open override fun visibility(visibility: Visibility): LineLayer

Whether this layer is displayed.

Properties

filter
Link copied to clipboard
val filter: Expression?

A filter is a property at the layer level that determines which features should be rendered in a style layer.

layerId
Link copied to clipboard
open override val layerId: String
lineBlur
Link copied to clipboard
val lineBlur: Double?

Blur applied to the line, in pixels.

lineBlurAsExpression
Link copied to clipboard
val lineBlurAsExpression: Expression?

Blur applied to the line, in pixels.

lineBlurTransition
Link copied to clipboard
val lineBlurTransition: StyleTransition?

Transition options for LineBlur.

lineCap
Link copied to clipboard
val lineCap: LineCap?

The display of line endings.

lineCapAsExpression
Link copied to clipboard
val lineCapAsExpression: Expression?

The display of line endings.

lineColor
Link copied to clipboard
val lineColor: String?

The color with which the line will be drawn.

lineColorAsColorInt
Link copied to clipboard
val lineColorAsColorInt: Int?

The color with which the line will be drawn.

lineColorAsExpression
Link copied to clipboard
val lineColorAsExpression: Expression?

The color with which the line will be drawn.

lineColorTransition
Link copied to clipboard
val lineColorTransition: StyleTransition?

Transition options for LineColor.

lineDasharray
Link copied to clipboard
val 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: 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.

lineDasharrayAsExpression
Link copied to clipboard
val lineDasharrayAsExpression: Expression?

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.

lineDasharrayTransition
Link copied to clipboard
val lineDasharrayTransition: StyleTransition?

Transition options for LineDasharray.

lineGapWidth
Link copied to clipboard
val lineGapWidth: Double?

Draws a line casing outside of a line's actual path. Value indicates the width of the inner gap.

lineGapWidthAsExpression
Link copied to clipboard
val lineGapWidthAsExpression: Expression?

Draws a line casing outside of a line's actual path. Value indicates the width of the inner gap.

lineGapWidthTransition
Link copied to clipboard
val lineGapWidthTransition: StyleTransition?

Transition options for LineGapWidth.

lineGradient
Link copied to clipboard
val lineGradient: Expression?

Defines a gradient with which to color a line feature. Can only be used with GeoJSON sources that specify "lineMetrics": true.

lineJoin
Link copied to clipboard
val lineJoin: LineJoin?

The display of lines when joining.

lineJoinAsExpression
Link copied to clipboard
val lineJoinAsExpression: Expression?

The display of lines when joining.

lineMiterLimit
Link copied to clipboard
val lineMiterLimit: Double?

Used to automatically convert miter joins to bevel joins for sharp angles.

lineMiterLimitAsExpression
Link copied to clipboard
val lineMiterLimitAsExpression: Expression?

Used to automatically convert miter joins to bevel joins for sharp angles.

lineOffset
Link copied to clipboard
val 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.

lineOffsetAsExpression
Link copied to clipboard
val lineOffsetAsExpression: Expression?

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.

lineOffsetTransition
Link copied to clipboard
val lineOffsetTransition: StyleTransition?

Transition options for LineOffset.

lineOpacity
Link copied to clipboard
val lineOpacity: Double?

The opacity at which the line will be drawn.

lineOpacityAsExpression
Link copied to clipboard
val lineOpacityAsExpression: Expression?

The opacity at which the line will be drawn.

lineOpacityTransition
Link copied to clipboard
val lineOpacityTransition: StyleTransition?

Transition options for LineOpacity.

linePattern
Link copied to clipboard
val 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.

linePatternAsExpression
Link copied to clipboard
val linePatternAsExpression: Expression?

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.

linePatternTransition
Link copied to clipboard
val linePatternTransition: StyleTransition?

Transition options for LinePattern.

lineRoundLimit
Link copied to clipboard
val lineRoundLimit: Double?

Used to automatically convert round joins to miter joins for shallow angles.

lineRoundLimitAsExpression
Link copied to clipboard
val lineRoundLimitAsExpression: Expression?

Used to automatically convert round joins to miter joins for shallow angles.

lineSortKey
Link copied to clipboard
val 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.

lineSortKeyAsExpression
Link copied to clipboard
val lineSortKeyAsExpression: Expression?

Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.

lineTranslate
Link copied to clipboard
val lineTranslate: List<Double>?

The geometry's offset. Values are x, y where negatives indicate left and up, respectively.

lineTranslateAnchor
Link copied to clipboard
val lineTranslateAnchor: LineTranslateAnchor?

Controls the frame of reference for line-translate.

lineTranslateAnchorAsExpression
Link copied to clipboard
val lineTranslateAnchorAsExpression: Expression?

Controls the frame of reference for line-translate.

lineTranslateAsExpression
Link copied to clipboard
val lineTranslateAsExpression: Expression?

The geometry's offset. Values are x, y where negatives indicate left and up, respectively.

lineTranslateTransition
Link copied to clipboard
val lineTranslateTransition: StyleTransition?

Transition options for LineTranslate.

lineTrimOffset
Link copied to clipboard
val lineTrimOffset: List<Double>?

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.

lineTrimOffsetAsExpression
Link copied to clipboard
val lineTrimOffsetAsExpression: Expression?

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.

lineWidth
Link copied to clipboard
val lineWidth: Double?

Stroke thickness.

lineWidthAsExpression
Link copied to clipboard
val lineWidthAsExpression: Expression?

Stroke thickness.

lineWidthTransition
Link copied to clipboard
val lineWidthTransition: StyleTransition?

Transition options for LineWidth.

maxZoom
Link copied to clipboard
open override val maxZoom: Double?

The maximum zoom level for the layer. At zoom levels equal to or greater than the maxzoom, the layer will be hidden.

minZoom
Link copied to clipboard
open override val minZoom: Double?

The minimum zoom level for the layer. At zoom levels less than the minzoom, the layer will be hidden.

sourceId
Link copied to clipboard
val sourceId: String
sourceLayer
Link copied to clipboard
val sourceLayer: String?

A source layer is an individual layer of data within a vector source. A vector source can have multiple source layers.

visibility
Link copied to clipboard
open override val visibility: Visibility?

Whether this layer is displayed.