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 -> 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?,
        timeFromLastMatchedLocation: Measurement<UnitDuration>
    ) throws
        -> MapMatchingResult?

    Parameters

    lastMatchedLocation

    Last matched or extrapolated location.

    route

    (Optional) route to helps with extrapolation.

    timeFromLastMatchedLocation

    Time difference between lastMatchedLocation and now.

    Return Value

    Matched location if possible. Otherwise returns nil.