Simulate Navigation¶
Calculate a route and simulate navigating on it.

Use case¶
Calculate a route between two given pairs of coordinates then simulate navigation on it.
How to use the sample¶
First, get an API key token, see the Getting Started guide.
Download the Maps & Navigation SDK for C++ archive file for Linux or WindowsWhen you open the sample, you’ll be viewing the scene from above. When the route calculation is completed a simulation will start.
How it works¶
Create a
MapViewListener
,OpenGLContext
andMapView
.Create a
RouteList
, aLandmarkList
with twoLandmarks
in it and aRoutePreferences
object.Call the
RoutingService
usingRouteList
,LandmarkList
,RoutePreferences
and the progress listener.Once the route calculation operation completes, add the first calculated route to the
MapViewPreferences
routes collection.Create a
``ProgressListener``
and aNavigationListener
. Instruct theNavigationService
to start a simulation using the first route and the newly created listeners.Instruct the
MapView
to start following the position.