Class is used for storing the route path between two points in location.
More...
|
| abstract RoutePath | head (float advance) |
| | Returns the leading segment of the route up to advance meters.
|
| |
| abstract RoutePath | tail (float advance) |
| | Returns the route segment after advance meters.
|
| |
| abstract ArrayList< RouteNode > | nodes () |
| | Returns route nodes with points and events.
|
| |
| abstract float | getLength () |
| | Total route length in meters.
|
| |
| abstract float | getWeight () |
| | Total route weight/cost.
|
| |
Class is used for storing the route path between two points in location.
Referenced from: AsyncRouteListener, AsyncRouteManager, Location, RouteListener, RouteManager
Definition at line 18 of file RoutePath.java.
◆ getLength()
| abstract float com.navigine.idl.java.RoutePath.getLength |
( |
| ) |
|
|
abstract |
Total route length in meters.
- Returns
Java code snippet:
double length = path.getLength();
System.out.println("Route length: " + length + " meters");
Kotlin code snippet:
// Get route length
val length = path.length
println("Route length: $length meters")
◆ getWeight()
| abstract float com.navigine.idl.java.RoutePath.getWeight |
( |
| ) |
|
|
abstract |
Total route weight/cost.
- Returns
Java code snippet:
double weight = path.getWeight();
System.out.println("Route weight: " + weight);
Kotlin code snippet:
// Get total route weight
val weight = path.weight
println("Route weight: $weight")
◆ head()
| abstract RoutePath com.navigine.idl.java.RoutePath.head |
( |
float | advance | ) |
|
|
abstract |
Returns the leading segment of the route up to advance meters.
- Parameters
-
| advance | distance along route (meters). |
- Returns
- route head segment.
Java code snippet:
RoutePath headPath = path.
head(10.0);
if (headPath != null) {
System.out.println("Head path length: " + headPath.getLength() + " meters");
}
Kotlin code snippet:
// Get head of route (first 10 meters)
val headPath = path.head(10.0)
headPath?.let {
println("Head path length: ${it.length} meters")
}
◆ nodes()
| abstract ArrayList< RouteNode > com.navigine.idl.java.RoutePath.nodes |
( |
| ) |
|
|
abstract |
Returns route nodes with points and events.
Java code snippet:
List<RouteNode> nodes = path.getNodes();
System.out.println("Route has " + nodes.size() + " nodes");
for (RouteNode node : nodes) {
}
Kotlin code snippet:
// Get route nodes
val nodes = path.nodes
println("Route has ${nodes.size} nodes")
nodes.forEach { node ->
demonstrateRouteNodeUsage(node)
}
◆ tail()
| abstract RoutePath com.navigine.idl.java.RoutePath.tail |
( |
float | advance | ) |
|
|
abstract |
Returns the route segment after advance meters.
- Parameters
-
| advance | distance along route (meters). |
- Returns
- route tail segment.
Java code snippet:
RoutePath tailPath = path.
tail(10.0);
if (tailPath != null) {
System.out.println("Tail path length: " + tailPath.getLength() + " meters");
}
Kotlin code snippet:
// Get tail of route (remaining after 10 meters)
val tailPath = path.tail(10.0)
tailPath?.let {
println("Tail path length: ${it.length} meters")
}
The documentation for this class was generated from the following file: