Loading...
Searching...
No Matches
AsyncRouteManagerExample Class Reference
+ Inheritance diagram for AsyncRouteManagerExample:

Public Member Functions

void demonstrateAsyncRouteManagerMethods ()
 
void demonstrateRouteEventTypes ()
 
void demonstrateTurnTypes ()
 
void demonstrateRouteOptions ()
 
void demonstrateRouteStatusUsage ()
 
void demonstrateRouteSessionManagement ()
 
void cleanup ()
 
void initializeSdk ()
 
void setupAsyncRouteListener ()
 
void demonstrateAsyncRouteManagerMethods ()
 
void demonstrateRoutePathUsage: (NCRoutePath *routePath)
 
void demonstrateRouteNodeUsage: (NCRouteNode *node)
 
void demonstrateRouteEventUsage: (NCRouteEvent *event)
 
void demonstrateRouteEventTypes ()
 
void demonstrateTurnTypes ()
 
void demonstrateTurnEventUsage: (NCTurnEvent *event)
 
void demonstrateTransitionEntryEventUsage: (NCTransitionEntryEvent *event)
 
void demonstrateTransitionExitEventUsage: (NCTransitionExitEvent *event)
 
void demonstrateTargetReachedEventUsage: (NCTargetReachedEvent *event)
 
void demonstrateLocationPointUsage: (NCLocationPoint *locationPoint)
 
void demonstratePointUsage: (NCPoint *point)
 
void demonstrateRouteOptions ()
 
void demonstrateAdvancedAsyncRoutingFeatures ()
 
void demonstrateRouteSessionManagement ()
 
void cleanup ()
 
void runExample ()
 
(void) - onRouteChanged:currentPath:
 Called when new route was built or old route was rebuilt after missing previouse one.
 
(void) - onRouteAdvanced:point:
 Called when user has progressed along the route that was built in the method onRouteChanged
 

Public Attributes

NavigineSdk _sdk
 
LocationManager _locationManager
 
NavigationManager _navigationManager
 
AsyncRouteManager _asyncRouteManager
 
AsyncRouteListener _asyncRouteListener
 
RouteSession _currentSession
 

Properties

NCNavigineSdksdk
 
NCLocationManagerlocationManager
 
NCNavigationManagernavigationManager
 
NCAsyncRouteManagerasyncRouteManager
 
NCRouteSessioncurrentSession
 

Detailed Description

AsyncRouteManager usage example for Dart/Flutter Demonstrates working with async route planning, session management, and navigation

AsyncRouteManager usage example for Objective-C Demonstrates working with async route planning, session management, and navigation

Definition at line 9 of file async_route_manager_example.dart.

Member Function Documentation

◆ cleanup() [1/2]

void AsyncRouteManagerExample.cleanup ( )
inline

Clean up resources

Definition at line 560 of file AsyncRouteManagerExample.m.

◆ cleanup() [2/2]

void AsyncRouteManagerExample.cleanup ( )
virtual

◆ demonstrateAdvancedAsyncRoutingFeatures()

void AsyncRouteManagerExample.demonstrateAdvancedAsyncRoutingFeatures ( )
virtual

◆ demonstrateAsyncRouteManagerMethods() [1/2]

void AsyncRouteManagerExample.demonstrateAsyncRouteManagerMethods ( )
inline

Demonstrate AsyncRouteManager methods

Definition at line 100 of file AsyncRouteManagerExample.m.

◆ demonstrateAsyncRouteManagerMethods() [2/2]

void AsyncRouteManagerExample.demonstrateAsyncRouteManagerMethods ( )
virtual

◆ demonstrateLocationPointUsage:()

void AsyncRouteManagerExample::demonstrateLocationPointUsage: ( NCLocationPoint * locationPoint)
virtual

Demonstrate LocationPoint usage

Definition at line 337 of file AsyncRouteManagerExample.m.

◆ demonstratePointUsage:()

void AsyncRouteManagerExample::demonstratePointUsage: ( NCPoint * point)
virtual

Demonstrate Point usage

Definition at line 372 of file AsyncRouteManagerExample.m.

◆ demonstrateRouteEventTypes() [1/2]

void AsyncRouteManagerExample.demonstrateRouteEventTypes ( )
inline

Demonstrate RouteEventType enum values

Definition at line 253 of file AsyncRouteManagerExample.m.

◆ demonstrateRouteEventTypes() [2/2]

void AsyncRouteManagerExample.demonstrateRouteEventTypes ( )
virtual

◆ demonstrateRouteEventUsage:()

void AsyncRouteManagerExample::demonstrateRouteEventUsage: ( NCRouteEvent * event)
virtual

Demonstrate RouteEvent usage

Definition at line 209 of file AsyncRouteManagerExample.m.

◆ demonstrateRouteNodeUsage:()

void AsyncRouteManagerExample::demonstrateRouteNodeUsage: ( NCRouteNode * node)
virtual

Definition at line 182 of file AsyncRouteManagerExample.m.

◆ demonstrateRouteOptions() [1/2]

void AsyncRouteManagerExample.demonstrateRouteOptions ( )
inline

Demonstrate RouteOptions usage

Definition at line 400 of file AsyncRouteManagerExample.m.

◆ demonstrateRouteOptions() [2/2]

void AsyncRouteManagerExample.demonstrateRouteOptions ( )
virtual

◆ demonstrateRoutePathUsage:()

void AsyncRouteManagerExample::demonstrateRoutePathUsage: ( NCRoutePath * routePath)
virtual

Demonstrate RoutePath usage

Definition at line 138 of file AsyncRouteManagerExample.m.

◆ demonstrateRouteSessionManagement() [1/2]

void AsyncRouteManagerExample.demonstrateRouteSessionManagement ( )
inline

Demonstrate route session management

Definition at line 516 of file AsyncRouteManagerExample.m.

◆ demonstrateRouteSessionManagement() [2/2]

void AsyncRouteManagerExample.demonstrateRouteSessionManagement ( )
virtual

◆ demonstrateRouteStatusUsage()

void AsyncRouteManagerExample.demonstrateRouteStatusUsage ( )
inline

Demonstrate RouteStatus enum usage

Definition at line 479 of file AsyncRouteManagerExample.m.

◆ demonstrateTargetReachedEventUsage:()

void AsyncRouteManagerExample::demonstrateTargetReachedEventUsage: ( NCTargetReachedEvent * event)
virtual

Definition at line 322 of file AsyncRouteManagerExample.m.

◆ demonstrateTransitionEntryEventUsage:()

void AsyncRouteManagerExample::demonstrateTransitionEntryEventUsage: ( NCTransitionEntryEvent * event)
virtual

Definition at line 298 of file AsyncRouteManagerExample.m.

◆ demonstrateTransitionExitEventUsage:()

void AsyncRouteManagerExample::demonstrateTransitionExitEventUsage: ( NCTransitionExitEvent * event)
virtual

Definition at line 310 of file AsyncRouteManagerExample.m.

◆ demonstrateTurnEventUsage:()

void AsyncRouteManagerExample::demonstrateTurnEventUsage: ( NCTurnEvent * event)
virtual

Definition at line 286 of file AsyncRouteManagerExample.m.

◆ demonstrateTurnTypes() [1/2]

void AsyncRouteManagerExample.demonstrateTurnTypes ( )
inline

Definition at line 269 of file AsyncRouteManagerExample.m.

◆ demonstrateTurnTypes() [2/2]

void AsyncRouteManagerExample.demonstrateTurnTypes ( )
virtual

◆ initializeSdk()

void AsyncRouteManagerExample::initializeSdk ( )
virtual

Definition at line 49 of file AsyncRouteManagerExample.m.

◆ onRouteAdvanced:point:

- (void) onRouteAdvanced: (float) distance
point: (nonnull NCLocationPoint *) point 

Called when user has progressed along the route that was built in the method onRouteChanged

Parameters
distancedistance from the beginning or the route (unit meters)
pointcurrent location point on the route

Swift code snippet:

func onRouteAdvanced(_ distance: Float, point: NCLocationPoint) {
print("Route advanced: \‍(distance) meters")
demonstrateLocationPointUsage(point)
}

Objective C code snippet:

- (void)onRouteAdvanced:(float)distance point:(NCLocationPoint *)point {
NSLog(@"Route advanced: %f meters", distance);
[self demonstrateLocationPointUsage:point];
}

◆ onRouteChanged:currentPath:

- (void) onRouteChanged: (NCRouteStatus) status
currentPath: (nullable NCRoutePath *) currentPath 

Called when new route was built or old route was rebuilt after missing previouse one.

Parameters
statusRouteStatus indicating the current router state
currentPathRoutePath from current postion to destination point (null if status is not new_route)

Swift code snippet:

func onRouteChanged(_ status: NCRouteStatus, currentPath: NCRoutePath) {
print("Route changed with status: \‍(status)")
if status == .newRoute && currentPath != nil {
demonstrateRoutePathUsage(currentPath)
} else {
print("Route not ready, status: \‍(status)")
}
}

Objective C code snippet:

- (void)onRouteChanged:(NCRouteStatus)status currentPath:(NCRoutePath *)currentPath {
NSLog(@"Route changed with status: %@", @(status));
if (status == NCRouteStatusNewRoute && currentPath != nil) {
[self demonstrateRoutePathUsage:currentPath];
} else {
NSLog(@"Route not ready, status: %@", @(status));
}
}

◆ runExample()

void AsyncRouteManagerExample.runExample ( )
virtual

◆ setupAsyncRouteListener()

void AsyncRouteManagerExample::setupAsyncRouteListener ( )
virtual

Setup async route listener

Definition at line 92 of file AsyncRouteManagerExample.m.

Member Data Documentation

◆ _asyncRouteListener

AsyncRouteListener AsyncRouteManagerExample._asyncRouteListener

Definition at line 14 of file async_route_manager_example.dart.

◆ _asyncRouteManager

AsyncRouteManager AsyncRouteManagerExample._asyncRouteManager

Definition at line 13 of file async_route_manager_example.dart.

◆ _currentSession

RouteSession AsyncRouteManagerExample._currentSession

Definition at line 15 of file async_route_manager_example.dart.

◆ _locationManager

LocationManager AsyncRouteManagerExample._locationManager

Definition at line 11 of file async_route_manager_example.dart.

◆ _navigationManager

NavigationManager AsyncRouteManagerExample._navigationManager

Definition at line 12 of file async_route_manager_example.dart.

◆ _sdk

NavigineSdk AsyncRouteManagerExample._sdk

Definition at line 10 of file async_route_manager_example.dart.

Property Documentation

◆ asyncRouteManager

NCAsyncRouteManager* AsyncRouteManagerExample.asyncRouteManager
readwritenonatomicstrong

Definition at line 13 of file AsyncRouteManagerExample.m.

◆ currentSession

NCRouteSession* AsyncRouteManagerExample.currentSession
readwritenonatomicstrong

Definition at line 14 of file AsyncRouteManagerExample.m.

◆ locationManager

NCLocationManager* AsyncRouteManagerExample.locationManager
readwritenonatomicstrong

Definition at line 11 of file AsyncRouteManagerExample.m.

◆ navigationManager

NCNavigationManager* AsyncRouteManagerExample.navigationManager
readwritenonatomicstrong

Definition at line 12 of file AsyncRouteManagerExample.m.

◆ sdk

NCNavigineSdk* AsyncRouteManagerExample.sdk
readwritenonatomicstrong

Definition at line 10 of file AsyncRouteManagerExample.m.


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