MapMatchingEngine
public protocol MapMatchingEngine : ManagableEngine
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.
Declaration
Swift
func matchLocation(location: GeoLocation, route: Route?) throws -> MapMatchingResultReturn 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?, timeFromLastMatchedLocation: Measurement<UnitDuration> ) throws -> MapMatchingResult?Parameters
lastMatchedLocationLast matched or extrapolated location.
route(Optional) route to helps with extrapolation.
timeFromLastMatchedLocationTime difference between lastMatchedLocation and now.
Return Value
Matched location if possible. Otherwise returns nil.
MapMatchingEngine Protocol Reference