MapMatchingResult

public struct MapMatchingResult

Output of the MapMatchingEngine that represents accurate (map matched) location. This is used in driving mode to snap the chevron shown on the map to the road network. MapMatchingEngine provides an individual MapMatchingResult for each TomTomSDKLocationProvider/GeoLocation.

  • The list of alternative matched locations that were generated by the MapMatchingEngine. Can be empty.

    Declaration

    Swift

    public let alternativeMatchedLocations: [MatchedLocation]
  • Route identifiers of all the routes passed to the MapMatchingEngine that the matchedLocation is on.

    Declaration

    Swift

    public let followedRouteIDs: [UUID]
  • Creates a new instance of MapMatchingResult.

    Declaration

    Swift

    public init(
        matchedLocation: MatchedLocation,
        rawLocation: GeoLocation,
        alternativeMatchedLocations: [MatchedLocation] = [],
        followedRouteIDs: [UUID] = []
    )

    Parameters

    matchedLocation

    The best TomTomSDKLocationProvider/MatchedLocation for the given rawLocation.

    rawLocation

    The original TomTomSDKLocationProvider/GeoLocation that was passed to the MapMatchingEngine.

    alternativeMatchedLocations

    The list of alternative matched locations that were generated by the MapMatchingEngine. Can be empty.

    followedRouteIDs

    Route identifiers of all the routes passed to the MapMatchingEngine that the matchedLocation is on.

  • Creates a new instance of MapMatchingResult.

    Important

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

    Declaration

    Swift

    public init(
        matchedLocation: MatchedLocation,
        rawLocation: GeoLocation,
        locationPredictions: [GeoLocation] = [],
        alternativeMatchedLocations: [MatchedLocation] = [],
        followedRouteIDs: [UUID] = []
    )

    Parameters

    matchedLocation

    The best TomTomSDKLocationProvider/MatchedLocation for the given rawLocation.

    rawLocation

    The original TomTomSDKLocationProvider/GeoLocation that was passed to the MapMatchingEngine.

    locationPredictions

    The list of predicted locations that were generated by the MapMatchingEngine. They are useful when location updates from location service lag behind the current situation on the road. Can be empty.

    alternativeMatchedLocations

    The list of alternative matched locations that were generated by the MapMatchingEngine. Can be empty.

    followedRouteIDs

    Route identifiers of all the routes passed to the MapMatchingEngine that the matchedLocation is on.

  • The list of predicted locations that were generated by the MapMatchingEngine. They are useful when location updates from location service lag behind the current situation on the road. Can be empty.

    Important

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

    Declaration

    Swift

    public let locationPredictions: [GeoLocation]
  • The best TomTomSDKLocationProvider/MatchedLocation for the given rawLocation.

    Declaration

    Swift

    public let matchedLocation: MatchedLocation
  • The original TomTomSDKLocationProvider/GeoLocation that was passed to the MapMatchingEngine.

    Declaration

    Swift

    public let rawLocation: GeoLocation