public class RouteManager
extends java.lang.Object
Route
from a RoutePlan
, with a
RouteManager.Listener
to monitor calculation progress and trigger appropriate callback methods upon
completion.
Before using a RouteManager
, an application must set appropriate the HERE developer
credentials.
Modifier and Type | Class and Description |
---|---|
static class |
RouteManager.Error
Represents values describing possible route calculation errors.
|
static interface |
RouteManager.Listener
Represents a listener to provide information about
RouteManager events.\ |
Constructor and Description |
---|
RouteManager() |
Modifier and Type | Method and Description |
---|---|
RouteManager.Error |
calculateRoute(RoutePlan routePlan,
RouteManager.Listener listener)
Invokes an asynchronous route calculation.
|
void |
cancel()
Cancels the current route calculation.
|
boolean |
isBusy()
Query whether the RouteManager is currently busy computing a route.
|
public RouteManager.Error calculateRoute(RoutePlan routePlan, RouteManager.Listener listener)
Listener
will be invoked regardless if the request is completed successfully or not.routePlan
- A RoutePlan
used to calculate the routelistener
- A Listener
for the RouteManager
RouteManager.Error
error code, one of:
RouteManager.Error#NONE
if route calculation is startedRouteManager.Error#INVALID_OPERATION
if a route calculation could not be
started because a calculation is already in progressRouteManager.Error#INVALID_PARAMETERS
if any of the input parameters is
null
public void cancel()
RouteManager#isBusy()
to check
when the RouteManager
is free again.public boolean isBusy()