Sorry, you need to enable JavaScript to visit this website.

Travel modes

Travel modes

Allow your users to plan a route for different travel modes.

Sample use case: You want to check what travel mode (car or truck) gives you the best ETA for a trip from Amsterdam to Rotterdam.

Available travel modes:

travelMode = TravelMode.CAR
travelMode = TravelMode.TRUCK
travelMode = TravelMode.TAXI
travelMode = TravelMode.BUS
travelMode = TravelMode.VAN
travelMode = TravelMode.MOTORCYCLE
travelMode = TravelMode.BICYCLE
travelMode = TravelMode.PEDESTRIAN
travelMode = TravelMode.OTHER

To request a specified travel mode:

_

RouteDescriptor routeDescriptor = new RouteDescriptor.Builder()
        .travelMode(travelMode)
        .considerTraffic(false)
        .build();

RouteCalculationDescriptor routeCalculationDescriptor = new RouteCalculationDescriptor.Builder()
        .routeDescription(routeDescriptor)
        .maxAlternatives(0)
        .reportType(ReportType.NONE)
        .instructionType(InstructionsType.NONE)
        .build();

RouteSpecification routeSpecification = new RouteSpecification.Builder(
        routeConfig.getOrigin(),
        routeConfig.getDestination()
)
        .routeCalculationDescriptor(routeCalculationDescriptor)
        .build();
val routeDescriptor = RouteDescriptor.Builder()
    .travelMode(travelMode)
    .considerTraffic(false)
    .build()

val routeCalculationDescriptor = RouteCalculationDescriptor.Builder()
    .routeDescription(routeDescriptor)
    .build()

return RouteSpecification.Builder(origin, destination)
    .routeCalculationDescriptor(routeCalculationDescriptor)
    .build()

 

image

Travel mode car

image

Travel mode pedestrian

image

Travel mode truck