OfflineMapMatchingEngine

public class OfflineMapMatchingEngine : MapMatchingEngine

Map matching engine that uses an offline map to match a raw location to the road network.

Important

This is a Public Preview API. It may be changed or removed at any time.

Lifecycle

  • Creates an offline engine with the given data store.

    Declaration

    Swift

    public convenience init(store: MapDataStore) throws

    Parameters

    store

    The MapDataStore providing access to the offline map to match the locations against.

Public

  • Provides a position matched to the road network.

    Declaration

    Swift

    public func matchLocation(navigationSnapshot: NavigationSnapshot) throws -> MapMatchingResult

    Parameters

    navigationSnapshot

    The snapshot of the current navigation session.

    Return Value

    Matched location with its details. May throw an error if map access is not granted.

  • Function that attempts to extrapolate locations based on the previous position.

    Declaration

    Swift

    public func extrapolateLocation(navigationSnapshot: NavigationSnapshot) throws -> MapMatchingResult?

    Parameters

    navigationSnapshot

    The snapshot of the current navigation session.

    Return Value

    Matched location if possible. Otherwise returns nil. May throw an error if map access is not granted.

  • Reset the Engine.

    Declaration

    Swift

    public func reset()