Loading...
Searching...
No Matches
com.navigine.idl.java.RouteManager Class Referenceabstract

Class is used for evaluating RoutePath from point to point. More...

Public Member Functions

abstract RoutePath makeRoute (LocationPoint from, LocationPoint to)
 Method is used to build a route between points about evaluated RoutePath from your position to target point.
 
abstract ArrayList< RoutePathmakeRoutes (LocationPoint from, ArrayList< LocationPoint > to)
 Method is used to build a route between the starting point and several destination points.
 
abstract void setTarget (LocationPoint target)
 Method is used to set target point in your location. Through RouteListener you will be notified about new paths to target point.
 
abstract void addTarget (LocationPoint target)
 Method is used to add target point in your location. Through RouteListener you will be notified about new paths to target point.
 
abstract void cancelTarget ()
 Method is used for removing current target points to where the routes were built.
 
abstract void clearTargets ()
 Method is used for removing all target points to where the routes were built.
 
abstract void setGraphTag (String tag)
 Method is used to select graph tag (Default: "default").
 
abstract String getGraphTag ()
 Method is used to get current graph tag (Default: "default").
 
abstract ArrayList< String > getGraphTags ()
 Method is used to get all graph tags,.
 
abstract void addRouteListener (RouteListener listener)
 Method is used to add RouteListener class element which will notify about evaluated route path from your position to target point.
 
abstract void removeRouteListener (RouteListener listener)
 Method is used for removing previously added RouteListener class element.
 

Detailed Description

Class is used for evaluating RoutePath from point to point.

Referenced from NavigineSdk.

Definition at line 17 of file RouteManager.java.

Member Function Documentation

◆ addRouteListener()

abstract void com.navigine.idl.java.RouteManager.addRouteListener ( RouteListener listener)
abstract

Method is used to add RouteListener class element which will notify about evaluated route path from your position to target point.

Note
Do not forget to remove listener if it is no longer needed!
Parameters
listenerСorresponding RouteListener class.

Java code snippet:

// Add route listener
routeManager.addRouteListener(routeListener);

Kotlin code snippet:

// Add route listener
manager.addRouteListener(listener)

◆ addTarget()

abstract void com.navigine.idl.java.RouteManager.addTarget ( LocationPoint target)
abstract

Method is used to add target point in your location. Through RouteListener you will be notified about new paths to target point.

Parameters
targetfinish LocationPoint.

Java code snippet:

// Add additional target point
LocationPoint additionalTarget = new LocationPoint(new Point(90.0, 100.0), 12345, 1);
routeManager.addTarget(additionalTarget);

Kotlin code snippet:

// Add additional target point
val additionalTarget = LocationPoint(Point(90.0, 100.0), 12345, 1)
manager.addTarget(additionalTarget)

◆ cancelTarget()

abstract void com.navigine.idl.java.RouteManager.cancelTarget ( )
abstract

Method is used for removing current target points to where the routes were built.

Java code snippet:

// Cancel current target
routeManager.cancelTarget();

Kotlin code snippet:

// Cancel current target
manager.cancelTarget()

◆ clearTargets()

abstract void com.navigine.idl.java.RouteManager.clearTargets ( )
abstract

Method is used for removing all target points to where the routes were built.

Java code snippet:

// Clear all targets
routeManager.clearTargets();

Kotlin code snippet:

// Clear all targets
manager.clearTargets()

◆ getGraphTag()

abstract String com.navigine.idl.java.RouteManager.getGraphTag ( )
abstract

Method is used to get current graph tag (Default: "default").

Java code snippet:

// Get current graph tag
String currentGraphTag = routeManager.getGraphTag();
System.out.println("Current graph tag: " + currentGraphTag);

Kotlin code snippet:

// Get current graph tag
val currentGraphTag = manager.getGraphTag()
println("Current graph tag: $currentGraphTag")

◆ getGraphTags()

abstract ArrayList< String > com.navigine.idl.java.RouteManager.getGraphTags ( )
abstract

Method is used to get all graph tags,.

Java code snippet:

// Get all graph tags
List<String> graphTags = routeManager.getGraphTags();
System.out.println("Available graph tags: " + graphTags);

Kotlin code snippet:

// Get all graph tags
val graphTags = manager.getGraphTags()
println("Available graph tags: $graphTags")

◆ makeRoute()

abstract RoutePath com.navigine.idl.java.RouteManager.makeRoute ( LocationPoint from,
LocationPoint to )
abstract

Method is used to build a route between points about evaluated RoutePath from your position to target point.

Parameters
fromstarting LocationPoint.
todestination LocationPoint.
Returns
RoutePath from starting to destination point.

Java code snippet:

// Make route from point to point
RoutePath routePath = routeManager.makeRoute(startLocationPoint, endLocationPoint);
System.out.println("Route created with length: " + routePath.getLength() + " meters");

Kotlin code snippet:

// Make route from point to point
val routePath = manager.makeRoute(startLocationPoint, endLocationPoint)
println("Route created with length: ${routePath.length} meters")

◆ makeRoutes()

abstract ArrayList< RoutePath > com.navigine.idl.java.RouteManager.makeRoutes ( LocationPoint from,
ArrayList< LocationPoint > to )
abstract

Method is used to build a route between the starting point and several destination points.

Parameters
fromstarting LocationPoint.
todestination list of LocationPoints.
Returns
vector of RoutePaths from starting to destination point.

Java code snippet:

// Make routes to multiple destinations
List<LocationPoint> destinations = new ArrayList<>();
destinations.add(new LocationPoint(new Point(30.0, 40.0), 12345, 1));
destinations.add(new LocationPoint(new Point(70.0, 80.0), 12345, 1));
List<RoutePath> routePaths = routeManager.makeRoutes(startLocationPoint, destinations);
System.out.println("Created " + routePaths.size() + " routes");

Kotlin code snippet:

// Make routes to multiple destinations
val destinations = listOf(
LocationPoint(Point(30.0, 40.0), 12345, 1),
LocationPoint(Point(70.0, 80.0), 12345, 1)
)
val routePaths = manager.makeRoutes(startLocationPoint, destinations)
println("Created ${routePaths.size} routes")

◆ removeRouteListener()

abstract void com.navigine.idl.java.RouteManager.removeRouteListener ( RouteListener listener)
abstract

Method is used for removing previously added RouteListener class element.

Parameters
listenerСorresponding RouteListener class to remove.

Java code snippet:

// Remove route listener
routeManager.removeRouteListener(routeListener);

Kotlin code snippet:

// Remove route listener
manager.removeRouteListener(listener)

◆ setGraphTag()

abstract void com.navigine.idl.java.RouteManager.setGraphTag ( String tag)
abstract

Method is used to select graph tag (Default: "default").

Java code snippet:

// Set graph tag
routeManager.setGraphTag("main");

Kotlin code snippet:

// Set graph tag
manager.setGraphTag("main")

◆ setTarget()

abstract void com.navigine.idl.java.RouteManager.setTarget ( LocationPoint target)
abstract

Method is used to set target point in your location. Through RouteListener you will be notified about new paths to target point.

Parameters
targetfinish LocationPoint.

Java code snippet:

// Set target point
routeManager.setTarget(endLocationPoint);

Kotlin code snippet:

// Set target point
manager.setTarget(endLocationPoint)

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