LocationCoordinate2D
extension LocationCoordinate2D: Equatable
-
Instantiates a LocationCoordinate2D from a RadianCoordinate2D
Declaration
Swift
public init(_ radianCoordinate: RadianCoordinate2D)
-
Declaration
Swift
public static func == (lhs: LocationCoordinate2D, rhs: LocationCoordinate2D) -> Bool
-
Returns the direction from the receiver to the given coordinate.
This method is equivalent to the turf-bearing package of Turf.js (source code).
Declaration
Swift
public func direction(to coordinate: LocationCoordinate2D) -> LocationDirection
-
Returns a coordinate a certain Haversine distance away in the given direction.
Declaration
Swift
public func coordinate(at distance: LocationDistance, facing direction: LocationDirection) -> LocationCoordinate2D
-
Returns a coordinate a certain Haversine distance away in the given direction.
This method is equivalent to the turf-destination package of Turf.js (source code).
Declaration
Swift
public func coordinate(at distance: LocationDistance, facing direction: Measurement<UnitAngle>) -> LocationCoordinate2D
-
Returns the Haversine distance between two coordinates measured in degrees.
This method is equivalent to the turf-distance package of Turf.js (source code).
Declaration
Swift
public func distance(to coordinate: LocationCoordinate2D) -> LocationDistance