TomTomNavigationDelegate
public protocol TomTomNavigationDelegate : AnyObject
TomTomNavigationDelegate defines methods to provide information about events that occur during navigation.
Important
This is a Public Preview API. It may be changed or removed at any time.-
tomTomNavigation(_:
Default implementationdidMapMatchLocation: ) Reports that a location has been matched to the road network.
Default Implementation
Declaration
Swift
func tomTomNavigation(_ navigation: Navigation, didMapMatchLocation: GeoLocation)
Parameters
navigation
TomTomNavigation
instance representing the current navigation.didMapMatchLocation
Location on the road network that matches the navigation location.
-
tomTomNavigation(_:
Default implementationnextPredictionGenerated: ) Reports that a location has been matched to the road network.
Default Implementation
Declaration
Swift
func tomTomNavigation(_ navigation: Navigation, nextPredictionGenerated: [GeoLocation])
Parameters
navigation
TomTomNavigation
instance representing the current navigation.nextPredictionGenerated
Locations prediction on the road network that matches the navigation location.
-
tomTomNavigation(_:
Default implementationdidUpdateProgress: ) Reports the driver’s progress along the route.
Default Implementation
Declaration
Swift
func tomTomNavigation(_ navigation: Navigation, didUpdateProgress: RouteProgress)
Parameters
navigation
TomTomNavigation
instance representing the current navigation.didUpdateProgress
The driver’s progress along the route.
-
tomTomNavigation(_:
Default implementationdidDeviateRoute: location: ) Reports if the driver has deviated from the current route.
Default Implementation
Declaration
Swift
func tomTomNavigation(_ navigation: Navigation, didDeviateRoute currentRoute: Route, location: GeoLocation)
Parameters
navigation
TomTomNavigation
instance representing the current navigation.didDeviateRoute
The current route.
location
Location that deviates from the current route.
-
tomTomNavigation(_:
Default implementationdidProposeRoutePlan: reason: ) Reports if a new route plan is available.
Default Implementation
Declaration
Swift
func tomTomNavigation( _ navigation: Navigation, didProposeRoutePlan routePlan: RoutePlan, reason: RouteReplanningReason )
Parameters
navigation
TomTomNavigation
instance representing the current navigation.didProposeRoutePlan
The new route plan
type
Describes why the route has been replanned and how it is different from the previous route
-
Reports that route has been replanned.
Declaration
Swift
func tomTomNavigation(_ navigation: Navigation, didReplanRoute replannedRoute: Route, reason: RouteReplanningReason)
Parameters
navigation
TomTomNavigation
instance representing the current navigation.didReplanRoute
The replanned route.
type
Describes why the route has been replanned and how it is different from the previous route.
-
tomTomNavigation(_:
Default implementationdidUpdateInstructions: ) Reports that instructions have been updated.
Default Implementation
Declaration
Swift
func tomTomNavigation(_ navigation: Navigation, didUpdateInstructions instruction: [GuidanceInstruction])
Parameters
navigation
TomTomNavigation
instance representing the current navigation.instruction
New instructions.
-
tomTomNavigation(_:
Default implementationdidUpdateDistanceToNextInstruction: instructions: ) Reports that the distance to the next instruction has beed updated.
Default Implementation
Declaration
Swift
func tomTomNavigation( _ navigation: Navigation, didUpdateDistanceToNextInstruction distance: Measurement<UnitLength>, instructions: [GuidanceInstruction] )
Parameters
navigation
TomTomNavigation
instance representing the current navigation.distance
Distance to the next instruction.
instructions
Current instructions.
-
tomTomNavigation(_:
Default implementationdidGenerateAnnouncement: ) Reports that a new announcement has been generated.
Default Implementation
Declaration
Swift
func tomTomNavigation(_ navigation: Navigation, didGenerateAnnouncement announcement: GuidanceAnnouncement)
Parameters
navigation
TomTomNavigation
instance representing the current navigation.announcement
New announcement.
-
tomTomNavigation(_:
Default implementationdidDetectLocationContext: ) Reports that a new location context has been generated.
Default Implementation
Declaration
Swift
func tomTomNavigation(_ navigation: Navigation, didDetectLocationContext: LocationContext)
Parameters
navigation
TomTomNavigation
instance representing the current navigation.didDetectLocationContext
New location context.
-
tomTomNavigation(_:
Default implementationdidArriveAtDestinationOnRoute: ) Reports that the driver has arrived at the destination.
Default Implementation
Declaration
Swift
func tomTomNavigation(_ navigation: Navigation, didArriveAtDestinationOnRoute route: Route)
Parameters
navigation
TomTomNavigation
instance representing the current navigation.didArriveAtDestinationOnRoute
The current route.
-
tomTomNavigation(_:
Default implementationdidArriveAtWaypoint: on: ) Reports that the driver has arrived at waypoint.
Default Implementation
Declaration
Swift
func tomTomNavigation(_ navigation: Navigation, didArriveAtWaypoint: Waypoint, on route: Route)
Parameters
navigation
TomTomNavigation
instance representing the current navigation.didArriveAtWaypoint
waypoint, where driver arrived at
route
The current route.
-
tomTomNavigation(_:
Default implementationdidStartLaneGuidance: ) Reports that location guidance has been generated
Default Implementation
Declaration
Swift
func tomTomNavigation(_ navigation: Navigation, didStartLaneGuidance laneGuidance: LaneGuidance)
Parameters
navigation
TomTomNavigation
instance representing the current navigation.laneGuidance
New lane guidance.
-
tomTomNavigation(_:
Default implementationdidEndLaneGuidance: ) Reports that location guidance should be hidden
Default Implementation
Declaration
Swift
func tomTomNavigation(_ navigation: Navigation, didEndLaneGuidance laneGuidance: LaneGuidance)
Parameters
navigation
TomTomNavigation
instance representing the current navigation.laneGuidance
Lane guidance that should be hidden.