-
Unique layer name
Declaration
Swift
public var id: String -
Rendering type of this layer.
Declaration
Swift
public let type: LayerType -
An expression specifying conditions on source features. Only features that match the filter are displayed.
Declaration
Swift
public var filter: Expression? -
Name of a source description to be used for this layer. Required for all layer types except
BackgroundLayer,SkyLayer, andLocationIndicatorLayer.Declaration
Swift
public var source: String? -
Layer to use from a vector tile source.
Required for vector tile sources. Prohibited for all other source types, including GeoJSON sources.
Declaration
Swift
public var sourceLayer: 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.
Declaration
Swift
public var slot: String? -
The minimum zoom level for the layer. At zoom levels less than the minzoom, the layer will be hidden.
Declaration
Swift
public var minZoom: Double? -
The maximum zoom level for the layer. At zoom levels equal to or greater than the maxzoom, the layer will be hidden.
Declaration
Swift
public var maxZoom: Double? -
Whether this layer is displayed.
Declaration
Swift
public var visibility: Value<Visibility> -
Used to automatically convert miter joins to bevel joins for sharp angles.
Declaration
Swift
public var lineMiterLimit: Value<Double>? -
Used to automatically convert round joins to miter joins for shallow angles.
Declaration
Swift
public var lineRoundLimit: Value<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.
Declaration
Swift
public var lineSortKey: Value<Double>? -
Blur applied to the line, in pixels.
Declaration
Swift
public var lineBlur: Value<Double>? -
Transition options for
lineBlur.Declaration
Swift
public var lineBlurTransition: StyleTransition? -
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.
Declaration
Swift
public var lineBorderColor: Value<StyleColor>? -
Transition options for
lineBorderColor.Declaration
Swift
public var lineBorderColorTransition: StyleTransition? -
The width of the line border. A value of zero means no border.
Declaration
Swift
public var lineBorderWidth: Value<Double>? -
Transition options for
lineBorderWidth.Declaration
Swift
public var lineBorderWidthTransition: StyleTransition? -
The color with which the line will be drawn.
Declaration
Swift
public var lineColor: Value<StyleColor>? -
Transition options for
lineColor.Declaration
Swift
public var lineColorTransition: StyleTransition? -
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.Declaration
Swift
public var lineDasharray: Value<[Double]>? -
Decrease line layer opacity based on occlusion from 3D objects. Value 0 disables occlusion, value 1 means fully occluded.
Declaration
Swift
public var lineDepthOcclusionFactor: Value<Double>? -
Transition options for
lineDepthOcclusionFactor.Declaration
Swift
public var lineDepthOcclusionFactorTransition: StyleTransition? -
Controls the intensity of light emitted on the source features. This property works only with 3D light, i.e. when
lightsroot property is defined.Declaration
Swift
public var lineEmissiveStrength: Value<Double>? -
Transition options for
lineEmissiveStrength.Declaration
Swift
public var lineEmissiveStrengthTransition: StyleTransition? -
Draws a line casing outside of a line’s actual path. Value indicates the width of the inner gap.
Declaration
Swift
public var lineGapWidth: Value<Double>? -
Transition options for
lineGapWidth.Declaration
Swift
public var lineGapWidthTransition: StyleTransition? -
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.Declaration
Swift
public var lineGradient: Value<StyleColor>? -
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.
Declaration
Swift
public var lineOffset: Value<Double>? -
Transition options for
lineOffset.Declaration
Swift
public var lineOffsetTransition: StyleTransition? -
The opacity at which the line will be drawn.
Declaration
Swift
public var lineOpacity: Value<Double>? -
Transition options for
lineOpacity.Declaration
Swift
public var lineOpacityTransition: StyleTransition? -
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.
Declaration
Swift
public var linePattern: Value<ResolvedImage>? -
The geometry’s offset. Values are [x, y] where negatives indicate left and up, respectively.
Declaration
Swift
public var lineTranslate: Value<[Double]>? -
Transition options for
lineTranslate.Declaration
Swift
public var lineTranslateTransition: StyleTransition? -
Controls the frame of reference for
line-translate.Declaration
Swift
public var lineTranslateAnchor: Value<LineTranslateAnchor>? -
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].
Declaration
Swift
public var lineTrimOffset: Value<[Double]>? -
Stroke thickness.
Declaration
Swift
public var lineWidth: Value<Double>? -
Transition options for
lineWidth.Declaration
Swift
public var lineWidthTransition: StyleTransition? -
Undocumented
Declaration
Swift
public init(id: String, source: String) -
Declaration
Swift
public func encode(to encoder: Encoder) throws -
Declaration
Swift
public init(from decoder: Decoder) throws
LineLayer Structure Reference