CartoType C++ API 8.8-7-gb35e4dc71
for Windows, Linux, Qt and other platforms supporting C++ development
Public Member Functions | List of all members
CartoTypeCore::MNavigatorObserver Class Reference

#include <cartotype_navigation.h>

Inheritance diagram for CartoTypeCore::MNavigatorObserver:
CartoTypeCore::Framework

Public Member Functions

virtual void OnRoute (const Route *)
 
virtual void OnRouteAsync ()
 
virtual void OnTurn (const NavigatorTurn &, const NavigatorTurn *, const NavigatorTurn *, double, double)
 
virtual void OnState (NavigationState)
 

Detailed Description

Create an object of a class derived from MNavigatorObserver to handle navigation events like turn instructions.

Member Function Documentation

◆ OnRoute()

virtual void CartoTypeCore::MNavigatorObserver::OnRoute ( const Route )
inlinevirtual

This message updates the current route.

◆ OnRouteAsync()

virtual void CartoTypeCore::MNavigatorObserver::OnRouteAsync ( )
inlinevirtual

This message is sent asynchronously when a new route is created. It exists so that the Framework object can display a new route without making any fresh call to a Navigator function. The call to OnRouteAsync is made from a different thread to the one calling Navigator functions, so mutual exclusion may be necessary in the called function.

◆ OnState()

virtual void CartoTypeCore::MNavigatorObserver::OnState ( NavigationState  )
inlinevirtual

This message updates the state.

◆ OnTurn()

virtual void CartoTypeCore::MNavigatorObserver::OnTurn ( const NavigatorTurn ,
const NavigatorTurn ,
const NavigatorTurn ,
double  ,
double   
)
inlinevirtual

This message is sent whenever there is a location update and the location is on route and the direction along the route is correct.

aFirstTurn is the first significant turn after the current position, ignoring 'ahead' and 'continue' turns. If its type is TurnType::None there are no remaining significant turns. aFirstTurn.Distance is the distance from the current position to the first turn or the arrival point.

aSecondTurn, if non-null, indicates that there is a significant turn 100 metres or less after aFirstTurn. aSecondTurn->Distance is the distance from the first turn to the second turn.

aContinuationTurn, if non-null, signals that there is an 'ahead' or 'continue' turn before aFirstTurn, so that the navigation system can show that no turn is required at the next junction or adjoining minor road. aContinuationTurn->Distance is the distance from the current position to the continuation turn.

aDistanceLeft is the distance to the destination (along the route) in metres.

aTimeLeft is the time to the destination in seconds.


The documentation for this class was generated from the following file: