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
navigationTomTomNavigationinstance representing the current navigation.didMapMatchLocationLocation 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
navigationTomTomNavigationinstance representing the current navigation.nextPredictionGeneratedLocations 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
navigationTomTomNavigationinstance representing the current navigation.didUpdateProgressThe 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
navigationTomTomNavigationinstance representing the current navigation.didDeviateRouteThe current route.
locationLocation 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
navigationTomTomNavigationinstance representing the current navigation.didProposeRoutePlanThe new route plan
typeDescribes 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
navigationTomTomNavigationinstance representing the current navigation.didReplanRouteThe replanned route.
typeDescribes 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
navigationTomTomNavigationinstance representing the current navigation.instructionNew 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
navigationTomTomNavigationinstance representing the current navigation.distanceDistance to the next instruction.
instructionsCurrent instructions.
-
tomTomNavigation(_:Default implementationdidGenerateAnnouncement: ) Reports that a new announcement has been generated.
Default Implementation
Declaration
Swift
func tomTomNavigation(_ navigation: Navigation, didGenerateAnnouncement announcement: GuidanceAnnouncement)Parameters
navigationTomTomNavigationinstance representing the current navigation.announcementNew announcement.
-
tomTomNavigation(_:Default implementationdidDetectLocationContext: ) Reports that a new location context has been generated.
Default Implementation
Declaration
Swift
func tomTomNavigation(_ navigation: Navigation, didDetectLocationContext: LocationContext)Parameters
navigationTomTomNavigationinstance representing the current navigation.didDetectLocationContextNew 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
navigationTomTomNavigationinstance representing the current navigation.didArriveAtDestinationOnRouteThe 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
navigationTomTomNavigationinstance representing the current navigation.didArriveAtWaypointwaypoint, where driver arrived at
routeThe current route.
-
tomTomNavigation(_:Default implementationdidStartLaneGuidance: ) Reports that location guidance has been generated
Default Implementation
Declaration
Swift
func tomTomNavigation(_ navigation: Navigation, didStartLaneGuidance laneGuidance: LaneGuidance)Parameters
navigationTomTomNavigationinstance representing the current navigation.laneGuidanceNew lane guidance.
-
tomTomNavigation(_:Default implementationdidEndLaneGuidance: ) Reports that location guidance should be hidden
Default Implementation
Declaration
Swift
func tomTomNavigation(_ navigation: Navigation, didEndLaneGuidance laneGuidance: LaneGuidance)Parameters
navigationTomTomNavigationinstance representing the current navigation.laneGuidanceLane guidance that should be hidden.
TomTomNavigationDelegate Protocol Reference