LineOptions

public struct LineOptions : AnnotationOptions, Equatable

Line options.

Important

This is a Public Preview API. It may be changed or removed at any time.

Lifecycle

  • Creates an instance of LineOptions from an encoded string.

    Declaration

    Swift

    public init(polyline: String)

    Parameters

    polyline

    The string with encoded polyline.

  • Creates an instance of LineOptions from the list of CLLocationCoordinate2Ds.

    Declaration

    Swift

    public init(coordinates: [CLLocationCoordinate2D])

    Parameters

    coordinates

    The list of CLLocationCoordinate2Ds.

Public

  • List of coordinates for the line.

    Declaration

    Swift

    public let coordinates: [CLLocationCoordinate2D]
  • Inner (fill) color of the line to be created. Default value is blue.

    Declaration

    Swift

    public var lineColor: UIColor
  • Outline color of the line to be created. Default value is red.

    Declaration

    Swift

    public var outlineColor: UIColor
  • Type of outline start cap for the line to be created. Default value is round.

    Declaration

    Swift

    public var lineStartCap: LineCapType
  • Type of end caps for the line to be created. Default value is round.

    Declaration

    Swift

    public var lineEndCap: LineCapType
  • Line width for all scene levels. Default value is 4.

    Declaration

    Swift

    public var lineWidth: Double
  • Outline width of the line to be created. Default value is 1.

    Declaration

    Swift

    public var outlineWidth: Double
  • Type of start and end caps for the line to be created.

    Declaration

    Swift

    public var capType: LineCapType?
  • Controls the rendering policy of the line caps, which can be drawn either within or outside the line end-points. This policy affects the visible length of the line by the size of the line caps. By default the caps are placed outside the line end-points.

    Declaration

    Swift

    public var capPlacement: LineCapPlacement?
  • Join type of the line to be created.

    Declaration

    Swift

    public var joinType: LineJoinType?
  • List of scene levels with corresponding colors.

    Declaration

    Swift

    public var colorForScene: [SceneColor]?
  • List of scene levels with corresponding widths.

    Declaration

    Swift

    public var widthForScene: [WidthScene]?
  • Line offset for all scene levels. The parameter offset specifies by which amount the line is moved parallel to its actual path. Positive values move the line left, negative values move it right (relative to the directionality of the line).

    Declaration

    Swift

    public var offsetUnits: Double?
  • List of scene levels with corresponding line offsets.

    Declaration

    Swift

    public var offsetScenesLevel: [OffsetScene]?
  • List of scene levels with corresponding line outline colors.

    Declaration

    Swift

    public var outlineColorForScenes: [OutlineColorScene]?
  • List of scene levels with corresponding line outline widths.

    Declaration

    Swift

    public var outlineWidthForScenes: [OutlineWidthScene]?
  • Type that represents how the start cap of the line outline will look.

    Declaration

    Swift

    public var outlineStartCapType: LineCapType?
  • Type that represents how the end cap of the line outline will look.

    Declaration

    Swift

    public var outlineEndCapType: LineCapType?
  • Type that represents how the caps of the line outline will look.

    Declaration

    Swift

    public var outlineCapType: LineCapType?
  • Reserves memory in the list of coordinates. Using it may improve performance.

    Declaration

    Swift

    public var reserveCoordinates: [ReserveCoordinate]?
  • Add a coordinate at a specified distance along the line. The explicit distance can include factors such as routing cost as well as the haversine (great-circle) distance.

    Declaration

    Swift

    public var coordinatesWithDistanceAlong: [CoordinateAlongLine]?
  • Add a leading coordinate to use when the beginning of this line is to be joined to another line. When joining this line to the beginning of another line, use the second point of the other line. When joining this line to the end another line, use the second to last point of the other line. For best results use LineCapType.none and use a leading/trailing coordinate on the other line as well.

    Declaration

    Swift

    public var leadingCoordinates: [CLLocationCoordinate2D]?
  • Add a trailing coordinate to use when the end of this line is to be joined to another line. When joining this line to the beginning of another line, use the second point of the other line. When joining this line to the end of another line, use the second to last point of the other line. For best results use LineCapType.none and use a leading/trailing coordinate on the other line as well.

    Declaration

    Swift

    public var trailingsCoordinate: [CLLocationCoordinate2D]?
  • The line pattern properties. By default no pattern is used (i.e. a solid pattern).

    Declaration

    Swift

    public var linePattern: LinePattern?
  • Color to use for gaps in the line pattern.

    Declaration

    Swift

    public var gapColor: UIColor?
  • List of scene levels with corresponding line gap colors.

    Declaration

    Swift

    public var gapColorForScenes: [GapColorScene]?
  • Length of a single dash in the pattern.

    Declaration

    Swift

    public var dashLength: Double?
  • List of scene levels with corresponding dash lengths.

    Declaration

    Swift

    public var dashLengthForScenes: [DashLengthScene]?
  • Length of a single pattern repeat.

    Declaration

    Swift

    public var patternLength: Double?
  • List of scene levels with corresponding pattern lengths.

    Declaration

    Swift

    public var patternLengthForScenes: [PatternLengthScene]?
  • Set a pattern offset for the pattern at the beginning of the line. The pattern begin offset specifies the starting position of the pattern. By default, the offset is zero, which means the pattern starts at the beginning of the line. When the pattern offset is smaller than zero or larger than the pattern length, the line builder uses the supplied value modulus the pattern length as the pattern offset.

    Declaration

    Swift

    public var patternBeginOffset: Double?
  • List of scene levels with corresponding pattern offset values.

    Declaration

    Swift

    public var patternBeginOffsetForScenes: [PatternBeginOffsetScene]?
  • Outline style.

    Declaration

    Swift

    public var outlineStyle: LineOutlineStyle?
  • Outline gap color.

    Declaration

    Swift

    public var outlineGapColor: UIColor?
  • List of scene levels with corresponding line outline gap colors.

    Declaration

    Swift

    public var outlineGapColorForScenes: [OutlineGapColorScene]?
  • Set whether line thinning should be applied. Line thinning is the adjustment of line width based on camera distance. / By default thinning is enabled.

    Declaration

    Swift

    public var thinningEnabled: Bool?
  • Units to use for line width and offset, and line pattern and dash lengths.

    Declaration

    Swift

    public var unit: LineUnit?