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
.
-
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 givenrawLocation
.rawLocation
The original
TomTomSDKLocationProvider/GeoLocation
that was passed to theMapMatchingEngine
.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 thematchedLocation
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 givenrawLocation
.rawLocation
The original
TomTomSDKLocationProvider/GeoLocation
that was passed to theMapMatchingEngine
.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 thematchedLocation
is on.
-
The best
TomTomSDKLocationProvider/MatchedLocation
for the givenrawLocation
.Declaration
Swift
public let matchedLocation: MatchedLocation
-
The original
TomTomSDKLocationProvider/GeoLocation
that was passed to theMapMatchingEngine
.Declaration
Swift
public let rawLocation: GeoLocation
-
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 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 thematchedLocation
is on.Declaration
Swift
public let followedRouteIDs: [UUID]