HERE Android SDK Developer's Guide

RoutePlan

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

Class Summary

public final class RoutePlan

extends java.lang.Object

This is the definition of the RoutePlan class.

[For complete information, see the section Class Details]

Constructor Summary

Table 1. Constructors in RoutePlan
Constructors

RoutePlan ()

Method Summary

Table 2. Methods in RoutePlan
Methods

public RoutePlan addWaypoint (GeoCoordinate point)

Adds a waypoint to the plan.

public RouteOptions getRouteOptions ()

Gets the route options.

public GeoCoordinate getWaypointAt (int index)

Gets a waypoint at a specified index.

public int getWaypointCount ()

Gets the number of waypoints of the route plan.

public RoutePlan insertWaypoint (GeoCoordinate point, int index)

Inserts a waypoint into a list of existing waypoints.

public RoutePlan removeAllWaypoints ()

Removes all waypoints of the route plan.

public RoutePlan removeWaypoint (int index)

Removes a waypoint at a specified index.

public RoutePlan setRouteOptions (RouteOptions options)

Sets the route options.

Class Details

This is the definition of the RoutePlan class. A RoutePlan contains all information needed to calculate a route. It can carry a number of way points GeoCoordinate.

Constructor Details

RoutePlan ()

Method Details

public RoutePlan addWaypoint (GeoCoordinate point)

Adds a waypoint to the plan.

Parameters:

  • point

    The GeoCoordinate waypoint to add.

Returns:

This RoutePlan object

public RouteOptions getRouteOptions ()

Gets the route options.

Returns:

RouteOptions options associated with this plan.

public GeoCoordinate getWaypointAt (int index)

Gets a waypoint at a specified index.

Parameters:

  • index

    The zero-based index.

Returns:

the waypoint, NULL if the index submitted is out of bounds.

public int getWaypointCount ()

Gets the number of waypoints of the route plan.

Returns:

the number of waypoints.

public RoutePlan insertWaypoint (GeoCoordinate point, int index)

Inserts a waypoint into a list of existing waypoints. The position of the new waypoint is according to the specified index.

Parameters:

  • point

    The waypoint to insert

  • index

    The index in the range from 0 to the number of already existing waypoints.

Returns:

This RoutePlan object

public RoutePlan removeAllWaypoints ()

Removes all waypoints of the route plan.

Returns:

This RoutePlan object

public RoutePlan removeWaypoint (int index)

Removes a waypoint at a specified index.

Parameters:

  • index

    The zero-based index.

Returns:

This RoutePlan object

public RoutePlan setRouteOptions (RouteOptions options)

Sets the route options. This method does not retain a reference to options . If the options object is updated, then this method must be called again for the changes to be in effect.

Parameters:

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.