NavigationWaypointArrivalObserver
public protocol NavigationWaypointArrivalObserver : Observer
Declares an observer that can receive navigation events related with visiting waypoints.
The waypoint arrival state changes are detected by the ArrivalDetectionEngine.
Different observer methods are called depending on what state has been detected by the ArrivalDetectionEngine:
didArriveAtWaypoint(waypoint:on:)is received when theArrivalDetectionEnginedetects an arrival at a waypoint.didDepartFromWaypoint(waypoint:on:)is received when theArrivalDetectionEnginedetects a departure from a waypoint.
To be notified about the waypoint arrival events while navigating, first
implement the NavigationWaypointArrivalObserver protocol:
class CustomNavigationWaypointArrivalObserver: NavigationWaypointArrivalObserver {
func didArriveAtWaypoint(waypoint: RouteStop, on route: Route) {
// Add code here that handles an arrival at a waypoint.
}
func didDepartFromWaypoint(waypoint: RouteStop, on route: Route) {
// Add code here that handles a departure from a waypoint.
}
}
Then add this observer using
addWaypointArrivalObserver(_:).
To stop receiving these events, remove the observer using
removeWaypointArrivalObserver(_:).
TomTom SDK for iOS (0.71.1)
NavigationWaypointArrivalObserver