BoundingBox
public struct BoundingBox : Equatable, Hashable
The smallest rectangular area within which all the coordinates lie.
-
Creates an instance of
BoundingBox
.Declaration
Swift
public init(southWestCorner: CLLocationCoordinate2D, northEastCorner: CLLocationCoordinate2D)
Parameters
southWestCorner
A coordinate representing the south-west (bottom left) corner of the bounding box.
northEastCorner
A coordinate representing the north-east (top right) corner of the bounding box.
-
An alternative constructor to create a rect (rectangle) from north-west (top left) and south-east (bottom right) corners.
Declaration
Swift
public init(northWestCorner: CLLocationCoordinate2D, southEastCorner: CLLocationCoordinate2D)
-
An equatable south-west corner coordinate.
Declaration
Swift
@EquatableWrapper public private(set) var southWestCorner: CLLocationCoordinate2D { get set }
-
An equatable north-east corner coordinate
Declaration
Swift
@EquatableWrapper public private(set) var northEastCorner: CLLocationCoordinate2D { get set }
-
Custom implementation because CLLocationCoordinate2D should not conform to Hashable
Declaration
Swift
public func hash(into hasher: inout Hasher)