HERE Android SDK Developer's Guide

Type

The enumeration Type is a member of com.here.android.mpa.routing.RouteOptions.

Enumeration Summary

public static final enumeration RouteOptions.Type

extends java.lang.Enum, java.lang.Object

Represents different types of routing, such as by speed or by distance.

[For complete information, see the section Enumeration Details]

Enum Constant Summary

Table 1. Enum Constants in Type
Fields

public static final Type FASTEST

Search for the fastest route (minimizes travel time).

public static final Type SHORTEST

Search for the shortest route (minimizes travel distance).

public static final Type BALANCED

Search for balanced route, some travel time may be sacrificed in order to reduce the distance traveled.

Method Summary

Table 2. Methods in Type
Methods

public int value ()

public static Type valueOf (String name)

This method retrieves the enumeration value that matches the name specified by the caller.

public static RouteOptions.Type[] values ()

This method retrieves an array of constants of the given enum type in the order in which they are declared.

Enumeration Details

Represents different types of routing, such as by speed or by distance.

Note: a Type has no effect on PEDESTRIAN or PUBLIC_TRANSPORT transport modes, since they always use FASTEST (if SHORTEST is set as the Type when one of these TransportMode types is selected, it will be reset to FASTEST when a Route is calculated). For TRUCK, however, using any Type other than FASTEST will result in INVALID_PARAMETERS being returned when calculating a route.

Enum Constant Details

public static final Type FASTEST

Search for the fastest route (minimizes travel time).

public static final Type SHORTEST

Search for the shortest route (minimizes travel distance). Car Mode Only.

public static final Type BALANCED

Search for balanced route, some travel time may be sacrificed in order to reduce the distance traveled. It calculates the optimal route based on time and distance combination. Car Mode Only.

Method Details

public int value ()

public static Type valueOf (String name)

This method retrieves the enumeration value that matches the name specified by the caller.

Parameters:

  • name

    A string containing the name of the enumeration member whose value is to be retrieved.

public static RouteOptions.Type[] values ()

This method retrieves an array of constants of the given enum type in the order in which they are declared.