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

Public Member Functions

void initializeSdk ()
 
void setupAsyncRouteListener ()
 
void demonstrateAsyncRouteManagerMethods ()
 
void demonstrateRoutePathUsage: (NCRoutePath *routePath)
 
void demonstrateRouteEventUsage: (NCRouteEvent *event)
 
void demonstrateRouteEventTypes ()
 
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
 

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()

void AsyncRouteManagerExample.cleanup ( )
virtual

◆ demonstrateAdvancedAsyncRoutingFeatures()

void AsyncRouteManagerExample.demonstrateAdvancedAsyncRoutingFeatures ( )
virtual

◆ demonstrateAsyncRouteManagerMethods()

void AsyncRouteManagerExample.demonstrateAsyncRouteManagerMethods ( )
virtual

◆ demonstrateLocationPointUsage:()

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

Demonstrate LocationPoint usage

Definition at line 234 of file AsyncRouteManagerExample.m.

◆ demonstratePointUsage:()

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

Demonstrate Point usage

Definition at line 269 of file AsyncRouteManagerExample.m.

◆ demonstrateRouteEventTypes()

void AsyncRouteManagerExample.demonstrateRouteEventTypes ( )
virtual

◆ demonstrateRouteEventUsage:()

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

Demonstrate RouteEvent usage

Definition at line 182 of file AsyncRouteManagerExample.m.

◆ demonstrateRouteOptions()

void AsyncRouteManagerExample.demonstrateRouteOptions ( )
virtual

◆ demonstrateRoutePathUsage:()

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

Demonstrate RoutePath usage

Definition at line 132 of file AsyncRouteManagerExample.m.

◆ demonstrateRouteSessionManagement()

void AsyncRouteManagerExample.demonstrateRouteSessionManagement ( )
virtual

◆ initializeSdk()

void AsyncRouteManagerExample::initializeSdk ( )
virtual

Definition at line 43 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 86 of file AsyncRouteManagerExample.m.

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: