-
Identifier for this annotation
Declaration
Swift
internal(set) public var id: String { get } -
The geometry backing this annotation
Declaration
Swift
public var geometry: Geometry { get } -
The line string backing this annotation
Declaration
Swift
public var lineString: LineString -
Toggles the annotation’s selection state. If the annotation is deselected, it becomes selected. If the annotation is selected, it becomes deselected.
Declaration
Swift
public var isSelected: Bool -
Property to determine whether annotation can be manually moved around map
Declaration
Swift
public var isDraggable: Bool -
Handles tap gesture on this annotation.
Should return
trueif the gesture is handled, orfalseto propagate it to the annotations or layers below.Declaration
Swift
public var tapHandler: ((MapContentGestureContext) -> Bool)? { get set } -
Handles long press gesture on this annotation.
Should return
trueif the gesture is handled, orfalseto propagate it to the annotations or layers below.Declaration
Swift
public var longPressHandler: ((MapContentGestureContext) -> Bool)? { get set } -
Properties associated with the annotation
Declaration
Swift
public var userInfo: [String : Any]? { get set } -
Create a polyline annotation with a
LineStringand an optional identifier.Declaration
Swift
public init(id: String = UUID().uuidString, lineString: LineString, isSelected: Bool = false, isDraggable: Bool = false) -
Create a polyline annotation with an array of coordinates and an optional identifier.
Declaration
Swift
public init(id: String = UUID().uuidString, lineCoordinates: [CLLocationCoordinate2D], isSelected: Bool = false, isDraggable: Bool = false)
-
The display of lines when joining.
Declaration
Swift
public var lineJoin: LineJoin? -
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: Double? -
Blur applied to the line, in pixels.
Declaration
Swift
public var lineBlur: Double? -
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: StyleColor? -
The width of the line border. A value of zero means no border.
Declaration
Swift
public var lineBorderWidth: Double? -
The color with which the line will be drawn.
Declaration
Swift
public var lineColor: StyleColor? -
Draws a line casing outside of a line’s actual path. Value indicates the width of the inner gap.
Declaration
Swift
public var lineGapWidth: 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.
Declaration
Swift
public var lineOffset: Double? -
The opacity at which the line will be drawn.
Declaration
Swift
public var lineOpacity: Double? -
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: String? -
Stroke thickness.
Declaration
Swift
public var lineWidth: Double? -
The display of lines when joining.
Declaration
Swift
@_documentation(visibility: public) public func lineJoin(_ newValue: LineJoin) -> PolylineAnnotation -
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
@_documentation(visibility: public) public func lineSortKey(_ newValue: Double) -> PolylineAnnotation -
Blur applied to the line, in pixels.
Declaration
Swift
@_documentation(visibility: public) public func lineBlur(_ newValue: Double) -> PolylineAnnotation -
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
@_documentation(visibility: public) public func lineBorderColor(_ newValue: StyleColor) -> PolylineAnnotation -
The width of the line border. A value of zero means no border.
Declaration
Swift
@_documentation(visibility: public) public func lineBorderWidth(_ newValue: Double) -> PolylineAnnotation -
The color with which the line will be drawn.
Declaration
Swift
@_documentation(visibility: public) public func lineColor(_ newValue: StyleColor) -> PolylineAnnotation -
Draws a line casing outside of a line’s actual path. Value indicates the width of the inner gap.
Declaration
Swift
@_documentation(visibility: public) public func lineGapWidth(_ newValue: Double) -> PolylineAnnotation -
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
@_documentation(visibility: public) public func lineOffset(_ newValue: Double) -> PolylineAnnotation -
The opacity at which the line will be drawn.
Declaration
Swift
@_documentation(visibility: public) public func lineOpacity(_ newValue: Double) -> PolylineAnnotation -
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
@_documentation(visibility: public) public func linePattern(_ newValue: String) -> PolylineAnnotation -
Stroke thickness.
Declaration
Swift
@_documentation(visibility: public) public func lineWidth(_ newValue: Double) -> PolylineAnnotation -
Adds a handler for tap gesture on current annotation.
The handler should return
trueif the gesture is handled, orfalseto propagate it to the annotations or layers below.Parameters:
- handler: A handler for tap gesture.
Declaration
Swift
@_documentation(visibility: public) public func onTapGesture(handler: @escaping (MapContentGestureContext) -> Bool) -> PolylineAnnotation -
Adds a handler for tap gesture on current annotation.
Parameters:
- handler: A handler for tap gesture.
Declaration
Swift
@_documentation(visibility: public) public func onTapGesture(handler: @escaping () -> Void) -> PolylineAnnotation -
Adds a handler for long press gesture on current annotation.
The handler should return
trueif the gesture is handled, orfalseto propagate it to the annotations or layers below.Parameters:
- handler: A handler for long press gesture.
Declaration
Swift
@_documentation(visibility: public) public func onLongPressGesture(handler: @escaping (MapContentGestureContext) -> Bool) -> PolylineAnnotation -
Adds a handler for long press gesture on current annotation.
Parameters:
- handler: A handler for long press gesture.
Declaration
Swift
@_documentation(visibility: public) public func onLongPressGesture(handler: @escaping () -> Void) -> PolylineAnnotation
PolylineAnnotation Structure Reference