CLLocation

class CLLocation : NSObject, NSCopying, NSSecureCoding
  • SwifterSwift: Calculate the half-way point along a great circle path between the two points.

    Declaration

    Swift

    public static func midLocation(start: CLLocation, end: CLLocation) -> CLLocation

    Parameters

    start

    Start location.

    end

    End location.

    Return Value

    Location that represents the half-way point.

  • SwifterSwift: Calculate the half-way point along a great circle path between self and another points.

    Declaration

    Swift

    public func midLocation(to point: CLLocation) -> CLLocation

    Parameters

    point

    End location.

    Return Value

    Location that represents the half-way point.

  • SwifterSwift: Calculates the bearing to another CLLocation.

    Declaration

    Swift

    public func bearing(to destination: CLLocation) -> Double

    Parameters

    destination

    Location to calculate bearing.

    Return Value

    Calculated bearing degrees in the range 0° … 360°