GeoPolygon

public extension GeoPolygon
  • Initialize a GeoPolygon, with values for bottom left corner and top right corner.

    Returns nil if the GeoPoints representing a polygon (outer ring or holes), don’t have at least 4 points. Returns nil if the first and the last GeoPoint in a polygon are not the same.

    Declaration

    Swift

    convenience init?(outerRing: [(Double, Double)], holes: [[(Double, Double)]] = [])

    Parameters

    outerRing

    The polygon’s external (outer) ring.

    holes

    The holes (if any) in the polygon.

  • Initialize a GeoPolygon, with values for bottom left corner and top right corner.

    Returns nil if the GeoPoints representing a polygon (outer ring or holes), don’t have at least 4 points. Returns nil if the first and the last GeoPoint in a polygon are not the same.

    Declaration

    Swift

    convenience init?(outerRing: [(Double, Double)], holes: [(Double, Double)]...)

    Parameters

    outerRing

    The polygon’s external (outer) ring.

    holes

    The holes (if any) in the polygon.