Loading...
Searching...
No Matches
AsyncRouteManager Class Referenceabstract

Class is used for managing RouteSessions. More...

Inherits Finalizable.

Public Member Functions

RouteSession createRouteSession (LocationPoint wayPoint, RouteOptions routeOptions)
 Method is used to create routing session with 'default' graph tag.
 
RouteSession createRouteSessionWithTag (LocationPoint wayPoint, RouteOptions routeOptions, String tag)
 Creates a routing session using a specific graph tag.
 
void cancelRouteSession (RouteSession session)
 Method is used to cancel routing session.
 

Detailed Description

Class is used for managing RouteSessions.

Referenced from NavigineSdk.

Definition at line 21 of file async_route_manager.dart.

Member Function Documentation

◆ cancelRouteSession()

void AsyncRouteManager.cancelRouteSession ( RouteSession session)

Method is used to cancel routing session.

Parameters
sessionRouteSession object to cancel.

Dart code snippet:

// Cancel route session
_asyncRouteManager!.cancelRouteSession(sessions[i]);
print("Cancelled session ${i + 1}");

◆ createRouteSession()

RouteSession AsyncRouteManager.createRouteSession ( LocationPoint wayPoint,
RouteOptions routeOptions )

Method is used to create routing session with 'default' graph tag.

Parameters
wayPointdestination point.
routeOptionsparams of RouteSession.
Returns
RouteSession instance.

Dart code snippet:

// Create route session with default graph tag
RouteSession session = _asyncRouteManager!.createRouteSession(
destinationLocationPoint,
routeOptions,
);
print("Created route session with default graph tag");

◆ createRouteSessionWithTag()

RouteSession AsyncRouteManager.createRouteSessionWithTag ( LocationPoint wayPoint,
RouteOptions routeOptions,
String tag )

Creates a routing session using a specific graph tag.

Initializes a RouteSession for building a route to the given waypoint using the specified routing options and graph tag. If the specified tag is not present in the current location (i.e., the corresponding sublocation graph is not yet available), the returned RouteSession will produce an empty route and will not trigger any listeners until the location data for that tag becomes available (e.g., after a location update).

Parameters
wayPointDestination point for the route.
routeOptionsRouting parameters RouteSession used to build the route.
tagGraph tag identifying which sublocation graph to use. Sublocation
Returns
A RouteSession instance, which may initially be empty if the tag is not available. RouteSession

Dart code snippet:

// Create route session with specific graph tag
RouteSession sessionWithTag = _asyncRouteManager!.createRouteSessionWithTag(
destinationLocationPoint,
routeOptions,
"main",
);
print("Created route session with 'main' graph tag");

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