Sorry, you need to enable JavaScript to visit this website.

Driving Extensions

Driving Extensions

This module is built on top of Maps SDK for iOS and contains logic and helpful utils that can
be used in more complex scenarios, like driving or cycling.

To use this library, add the following dependency to the Podfile file:

pod 'TomTomOnlineSDKMapsDriving'
Map and route matching

Map matching snaps inaccurate GPS probe to the road network obtained from map tiles so roads are
represented by collections of coordinates. Route matching is a special case of map matching which
snaps inaccurate GPS probe to the given route. The reference route is represented by a collection
of coordinates. The route can be calculated using the Routing API or provided manually.

Sample use case: You have a speed radar application that is used when driving. To have a proper
user experience, you want to match GPS positions with the road data obtained from map tiles.

Sample use case: You want to match/place the chevron with the the right road.

Sample use case: A user plans and displays a route on the map in your app. The vehicle position
is being matched along the planned route.

To create map matcher instance and register for updates:

_

matcher = TTMatcher(matchDataSet: mapView)
matcher.delegate = self
self.matcher = [[TTMatcher alloc] initWithMatchDataSet:self.mapView];
self.matcher.delegate = self;

 
To create route matcher instance and register for updates:

_

matcher = TTMatcher(matchDataSet: plannedRoute)
matcher?.delegate = self
self.matcher = [[TTMatcher alloc] initWithMatchDataSet:plannedRoute];
self.matcher.delegate = self;

 
To update map matcher with new GPS position:

_

matcher.setMatcherLocation(location)
[self.source updateLocationWithLocation: location];

 
To process map matcher results:

_

public func matcherResultMatchedLocation(_ matched: TTMatcherLocation, withOriginalLocation original: TTMatcherLocation, isMatched: Bool) {
- (void)matcherResultMatchedLocation:(TTMatcherLocation *)matched withOriginalLocation:(TTMatcherLocation *)original isMatched:(BOOL)isMatched {