HERE Android SDK Developer's Guide

RouteManager

The class RouteManager is a member of com.here.android.mpa.routing .

Class Summary

public class RouteManager

extends java.lang.Object

Represents a manager responsible for calculating a Route from a RoutePlan, with a RouteManager.Listener to monitor calculation progress and trigger appropriate callback methods upon completion.

[For complete information, see the section Class Details]

Nested Class Summary

Table 1. Nested Classes in RouteManager
Nested Classes

public static final enumeration RouteManager.Error

Represents values describing possible route calculation errors.

public static abstract interface RouteManager.Listener

Represents a listener to provide information about RouteManager events.\

Constructor Summary

Table 2. Constructors in RouteManager
Constructors

RouteManager ()

Method Summary

Table 3. Methods in RouteManager
Methods

public Error calculateRoute (RoutePlan routePlan, Listener listener)

Invokes an asynchronous route calculation.

public void cancel ()

Cancels the current route calculation.

public boolean isBusy ()

Query whether the RouteManager is currently busy computing a route.

Class Details

Represents a manager responsible for calculating a 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.

Constructor Details

RouteManager ()

Method Details

public Error calculateRoute (RoutePlan routePlan, Listener listener)

Invokes an asynchronous route calculation. Upon completion of the request, the Listener will be invoked regardless if the request is completed successfully or not.

Parameters:

  • routePlan

    A RoutePlan used to calculate the route

  • listener

    A Listener for the RouteManager

Returns:

The RouteManager.Error error code, one of:

  • RouteManager.Error#NONE if route calculation is started
  • RouteManager.Error#INVALID_OPERATION if a route calculation could not be started because a calculation is already in progress
  • RouteManager.Error#INVALID_PARAMETERS if any of the input parameters is null
  • All other errors also indicate route calculation could not be started

public void cancel ()

Cancels the current route calculation. Note that this API is asynchronous as it takes some time cancel all underlying operations. {Please use RouteManager#isBusy() to check when the RouteManager is free again.

public boolean isBusy ()

Query whether the RouteManager is currently busy computing a route.

Returns:

true if a route calculation is ongoing, false otherwise.

You cannot use this account to purchase a commercial plan on Developer Portal, as it is already associated to plans with different payment methods.

To purchase a commercial plan on Developer Portal, please register for or sign in with a different HERE Account.

Something took longer than expected.

The project should be available soon under your projects page.

Sorry, our services are not available in this region.

Something seems to have gone wrong. Please try again later.

We've detected that your account is set to Australian Dollars (AUD).
Unfortunately, we do not offer checkouts in AUD anymore.
You can continue using your current plan as normal, but to subscribe to one of our new plans,
please register for a new HERE account or contact us for billing questions on selfservesupport@here.com.