PolygonGeometry

public struct PolygonGeometry : Equatable, Hashable

Polygon geometry for searchArea.

  • Creates a new PolygonGeometry.

    Declaration

    Swift

    public init(vertices: [CLLocationCoordinate2D])

    Parameters

    vertices

    an array of vertices of the polygon.

  • Vertices of the polygon.

    Declaration

    Swift

    public let vertices: [CLLocationCoordinate2D]
  • Implements method to check two PolygonGeometry objects for equality

    Two Location objects are equal if they have same enum values and associated coordinates have exactly the same latitude and longitude. Double values compared directly without threshold of any kind.

    Declaration

    Swift

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

    Parameters

    lhs

    A value to compare.

    rhs

    Another value to compare.

    Return Value

    True if both coordinates are equal.

  • Hashes the essential components of this value by feeding them into the given hasher.

    To calculate PolygonGeometry hash, each vertex latitude and longitude fed to the hasher.

    Declaration

    Swift

    public func hash(into hasher: inout Hasher)

    Parameters

    hasher

    The hasher to use when combining the components of this instance.