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.
  • 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.

  • 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.

  • 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.

  • 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.

  • 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.

  • 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.

  • 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.

  • 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.

  • 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.

  • 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.

  • 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.

  • 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.

  • 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.