LineLayer

public struct LineLayer : Layer

A stroked line.

  • id

    Declaration

    Swift

    public var id: String
  • Declaration

    Swift

    public let type: LayerType
  • Declaration

    Swift

    public var filter: Expression?
  • Declaration

    Swift

    public var source: String?
  • Declaration

    Swift

    public var sourceLayer: String?
  • Declaration

    Swift

    public var minZoom: Double?
  • Declaration

    Swift

    public var maxZoom: Double?
  • Whether this layer is displayed.

    Declaration

    Swift

    public var visibility: Value<Visibility>?
  • The display of line endings.

    Declaration

    Swift

    public var lineCap: Value<LineCap>?
  • The display of lines when joining.

    Declaration

    Swift

    public var lineJoin: Value<LineJoin>?
  • 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 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: 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.

    Declaration

    Swift

    public var lineDasharray: Value<[Double]>?
  • Transition options for lineDasharray.

    Declaration

    Swift

    public var lineDasharrayTransition: 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?
  • Defines a gradient with which to color a line feature. 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>?
  • Transition options for linePattern.

    Declaration

    Swift

    public var linePatternTransition: StyleTransition?
  • 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 trim-off percentage range based on the whole line gradinet range [0.0, 1.0]. The line part between [trim-start, trim-end] will be marked as transparent to make a route vanishing effect. If either ‘trim-start’ or ‘trim-end’ offset is out of valid range, the default range will be set.

    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)
  • Declaration

    Swift

    public func encode(to encoder: Encoder) throws
  • Declaration

    Swift

    public init(from decoder: Decoder) throws