HERE Android SDK Developer's Guide

TransportMode

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

Enumeration Summary

public static final enumeration RouteOptions.TransportMode

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

Represents values describing different mode of transportation a person will be using.

[For complete information, see the section Enumeration Details]

Enum Constant Summary

Table 1. Enum Constants in TransportMode
Fields

public static final TransportMode CAR

A car is being used as the mode of transportation.

public static final TransportMode PEDESTRIAN

Walking is being used as the mode of transportation.

public static final TransportMode PUBLIC_TRANSPORT

Public transport is being used as the mode of transportation.

public static final TransportMode TRACK

Deprecated: As of SDK 3.3 TRACK mode is no longer supported and a route will not be calculated if using this mode.

Straight line connecting the waypoints of a route.

public static final TransportMode TRUCK

Enterprise truck routing mode.

public static final TransportMode BICYCLE

A bicycle is being used as the mode of transportation.

public static final TransportMode UNDEFINED

Routing mode unknown or unsupported

Method Summary

Table 2. Methods in TransportMode
Methods

public static TransportMode getMode (int value)

public int value ()

public static TransportMode valueOf (String name)

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

public static RouteOptions.TransportMode[] values ()

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

Enumeration Details

Represents values describing different mode of transportation a person will be using. (for example, Car, or Public Transit).

Enum Constant Details

public static final TransportMode CAR

A car is being used as the mode of transportation.

public static final TransportMode PEDESTRIAN

Walking is being used as the mode of transportation. When calculating a Route using PEDESTRIAN, Type will be reset to FASTEST

public static final TransportMode PUBLIC_TRANSPORT

Public transport is being used as the mode of transportation. When calculating a Route using PUBLIC_TRANSPORT, Type will be reset to FASTEST

Note: a transit route may not be found if the walking distance from the start to the first transit station, or from the final transit station to the end, is greater than 3 kilometers.

To use this feature, your application must include the google-gson library (release 2.2.4 or a compatible version) on its class path. This library can be downloaded from the google-gson project website at http://code.google.com/p/google-gson/. Attempting to use this feature without adding this library will cause runtime errors.

public static final TransportMode TRACK

Deprecated: As of SDK 3.3 TRACK mode is no longer supported and a route will not be calculated if using this mode.

Please see CoreRouter.calculateRoute for more information.

Straight line connecting the waypoints of a route.

public static final TransportMode TRUCK

Enterprise truck routing mode. When calculating a route using TRUCK mode, only FASTEST will be supported.

public static final TransportMode BICYCLE

A bicycle is being used as the mode of transportation. This is a BETA feature.

public static final TransportMode UNDEFINED

Routing mode unknown or unsupported

Method Details

public static TransportMode getMode (int value)

Parameters:

  • value

public int value ()

public static TransportMode 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.TransportMode[] values ()

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