Simulation Navigation
Simulation navigation is a navigation that simulates the process of a route, primarily to help you understand some of the conditions of a given route in advance. The simulated navigation needs to be called after the calculation is successful. The sample code is as follows:
// simulated navigation mNaviSession.setSimulationSpeed(1.0f); // Set the speed of the simulated navigation mNaviSession.enableSound(true); // Open real-time voice announcement mNaviSession.startSimulation(); // Start simulation // Simulated navigation end and start navigation must be paired // Simulated navigation ends if (mRouteBase != null) { if (mNaviSession.isInSimulation()) { mNaviSession.endSimulation(); mDemoMapView.setTouchZoom(false); // End the simulation navigation back to the starting point mDemoMapView.setCarPosition(mStartPoint); } }