cancelNavigation static method
Cancel the active navigation.
This method cancels the active navigation. If a route calculation is in progress then the provided callback will be triggered first with GemError.cancel.
Parameters
- IN navigationListener Navigation listener used to identify the navigation session. If no listener is provided then the active navigation session will be cancelled.
Throws
- An exception if it fails.
Implementation
static void cancelNavigation([final TaskHandler? taskHandler]) {
if (taskHandler != null) {
taskHandler as TaskHandlerImpl;
staticMethod('NavigationService', 'stopNavigation', args: taskHandler.id);
} else {
staticMethod('NavigationService', 'stopNavigation');
}
}