Enum TravelMode
- All Implemented Interfaces:
Comparable<TravelMode>
How the traveller moves, which decides the road network and speeds a
RouteService routes over.
Not every backend implements every mode. A service that cannot honor the
requested mode answers with the closest profile it does have rather than
failing the request, so check the RouteService you installed before
promising a user a walking route -- see OsrmRouteService for how the
built-in default behaves.
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptiongetId()The lowercase wire identifier (driving,walking,cycling) used in routing service URLs.static TravelModeReturns the enum constant of this type with the specified name.static TravelMode[]values()Returns an array containing the constants of this enum type, in the order they are declared.Methods inherited from class Enum
clone, compareTo, equals, getDeclaringClass, getEnumValues, hashCode, name, ordinal, setEnumValues, toString, valueOf
-
Enum Constant Details
-
DRIVING
Route over roads open to cars, respecting one-way streets and turn restrictions. -
WALKING
Route over footpaths and pedestrian crossings, ignoring one-way restrictions that do not apply on foot. -
CYCLING
Route over cycleways and bike-legal roads.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getId
The lowercase wire identifier (driving,walking,cycling) used in routing service URLs.
-