public enum TravelMode
- Object
- Enum<TravelMode>
- TravelMode
ImplementsComparable<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 constants
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. |
Methods
public static TravelMode[] values() | |
public static TravelMode valueOf(String name) | |
public String getId() | The lowercase wire identifier (driving, walking, cycling) used in routing service URLs. |
Inherited methods
Enum constant details
DRIVING
DRIVINGRoute over roads open to cars, respecting one-way streets and turn
restrictions.
WALKING
WALKINGRoute over footpaths and pedestrian crossings, ignoring one-way
restrictions that do not apply on foot.
CYCLING
CYCLINGRoute over cycleways and bike-legal roads.
Method details
values
public static TravelMode[] values()valueOf
public static TravelMode valueOf(String name)getId
public String getId()The lowercase wire identifier (
driving, walking, cycling) used in
routing service URLs.