Constructors

The following constructors are available globally.

  • Creates a new instance with given collection of polygons to be displayed as a single one.

    Declaration

    Swift

    public init?(uniqueIdentifier: String? = default, polygons: [MKPolygon])

    Parameters

    uniqueIdentifier

    Unique identifier of this overlay. When nil hash of WKT representation of given polygons will be used as unique identifier.

    polygons

    Polygons to be displayed by this overlay.

    Return Value

    Properly initialized instance of nil when given collection is empty.

  • Creates a new instance with given WKT string with polygons to be displayed as a single one.

    Declaration

    Swift

    public convenience init?(uniqueIdentifier: String? = default, wkt: String)

    Parameters

    uniqueIdentifier

    Unique identifier of this overlay. When nil hash of given WKT string will be used as unique identifier.

    wkt

    WKT string with serialized polygons to be displayed by this overlay.

    Return Value

    Properly initialized instance of nil when given WKT string has no polygons or is invalid.

  • Creates a new polygon with given coordinates.

    Declaration

    Swift

    public convenience init(coordinates: [CLLocationCoordinate2D])