MapMatchingEngine
public protocol MapMatchingEngine : ManageableEngine
The MapMatchingEngine provides an interface for map matching functionality.
Important
This is a Public Preview API. It may be changed or removed at any time.-
Function that provides a position matched to the road network.
- location: Raw location to be matched against the road network.
- route: (Optional) route to helps with matching.
- progress: (Optional) progress on the route.
Declaration
Swift
func matchLocation( location: GeoLocation, route: Route?, progress: RouteProgress? ) throws -> MapMatchingResult
Return Value
A result with the matched location and it’s details
-
Function that attempts to extrapolate locations based on the previous position.
Declaration
Swift
func extrapolateLocation( lastMatchedLocation: GeoLocation, route: Route?, progress: RouteProgress?, timeFromLastMatchedLocation: Measurement<UnitDuration> ) throws -> MapMatchingResult?
Parameters
lastMatchedLocation
Last matched or extrapolated location.
route
(Optional) route to helps with extrapolation.
progress
(Optional) progress on the route.
timeFromLastMatchedLocation
Time difference between lastMatchedLocation and now.
Return Value
Matched location if possible. Otherwise returns nil.