PolygonAnnotation

public struct PolygonAnnotation : Annotation
extension PolygonAnnotation: Equatable

Marks a region of coordinates on map, representing a polygon shape.

  • Uniquely identifies the polygon annotation.

    Declaration

    Swift

    public private(set) var identifier: String { get }
  • The type of the annotation - in this case, a polygon.

    Declaration

    Swift

    public private(set) var type: AnnotationType { get }
  • The text string containing the polygon’s title. If the value is defined, the map shows an the polygon’s title near the polygon.

    Declaration

    Swift

    public var title: String?
  • Whether or not the polygon has been selected, either via a tap gesture or programmatically.

    Declaration

    Swift

    public var isSelected: Bool
  • The coordinates belonging to the polygon.

    Declaration

    Swift

    private(set) public var coordinates: [CLLocationCoordinate2D] { get }
  • An optional array containing arrays that represent holes within the polygon.

    Declaration

    Swift

    private(set) public var interiorPolygons: [[CLLocationCoordinate2D]]? { get }
  • The optional userInfo associated with the polygon annotation.

    Declaration

    Swift

    public var userInfo: [String : Any]?
  • Creates a new PolygonAnnotation initialized with given coordinates.

    Note

    This method does make the annotation visible. Use AnnotationManager.addAnnotation(_ annotation:) to render it on the map view.

    Declaration

    Swift

    public init(coordinates: [CLLocationCoordinate2D], interiorPolygons: [[CLLocationCoordinate2D]]? = nil)

    Parameters

    coordinates

    Coordinates representing the shape of the polygon.

    Return Value

    PolygonAnnotation instance initialized with a given set of coordinates.

  • Declaration

    Swift

    public static func == (lhs: PolygonAnnotation, rhs: PolygonAnnotation) -> Bool