DefaultSimpleEngineCommonCalculator
public final class DefaultSimpleEngineCommonCalculator : SimpleEngineCommonCalculator
Default implementation of the SimpleEngineCommonCalculator protocol.
Important
This is a Public Preview API. It may be changed or removed at any time.-
Initializes a new instance of
DefaultSimpleEngineCommonCalculator
.Declaration
Swift
public init()
-
Calculates the progress on a given route.
Declaration
Swift
public func calculateProgressOnRoute( location: CLLocation, route: Route, distanceThreshold: Measurement<UnitLength>, lastDistanceAlongRoute: Double ) -> SimpleEngineCalcResult
Parameters
location
The current location.
route
The route to calculate progress on.
distanceThreshold
The distance threshold for calculations.
lastDistanceAlongRoute
The last recorded distance along the route.
Return Value
A result containing the closest distance, last distance along the route, number of loops, and the closest point.