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

Route types

Route types

Allow your users to plan a route that will be the fastest, shortest, most thrilling, or environment friendly.

Sample use case: You plan a trip from Amsterdam to Rotterdam and want to compare ETAs for different types of routes to choose the best fit your preferences.

Available route types:

routeType = RouteType.FASTEST
routeType = RouteType.SHORTEST
routeType = RouteType.ECO
routeType = RouteType.THRILLING

To request a route for a specified travel type:

_

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

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

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

val routeCalculationDescriptor = RouteCalculationDescriptor.Builder()
    .routeDescription(routeDescriptor)
    .reportType(ReportType.EFFECTIVE_SETTINGS)
    .instructionType(InstructionsType.TEXT)
    .build()

val routeSpecification = RouteSpecification.Builder(origin, destination)
    .routeCalculationDescriptor(routeCalculationDescriptor)
    .build()

 

image

Route type eco

image

Route type fastest

image

Route type shortest