sdk-routing-rxjava2 / com.tomtom.online.sdk.routing.route / RouteCalculationDescriptor / Builder

Builder

@PublicPreview("2021.06") class Builder

Builder used to create an instance of RouteCalculationDescriptor. Once constructed, the user cannot change the field values.

Constructors

<init>

Builder()

Builder used to create an instance of RouteCalculationDescriptor. Once constructed, the user cannot change the field values.

Functions

allowVignettes

fun allowVignettes(allowVignettes: List<String>): RouteCalculationDescriptor.Builder

Specifies countries in which all toll roads and vignettes will be allowed.

alternativeType

fun alternativeType(alternativeType: AlternativeType): RouteCalculationDescriptor.Builder

Controls the optimality with respect to the given planning criteria of the calculated alternatives compared to the reference route.

arriveAt

fun arriveAt(arriveAt: Date): RouteCalculationDescriptor.Builder

Specifies the desired arrival time for the route to calculation.

avoidAreas

fun avoidAreas(areaCoordinates: List<BoundingBox>): RouteCalculationDescriptor.Builder

Specifies areas which will be avoided.

avoidVignettes

fun avoidVignettes(avoidVignettes: List<String>): RouteCalculationDescriptor.Builder

Specifies countries in which all toll roads and vignettes will be avoided.

build

fun build(): RouteCalculationDescriptor

Constructs a new RouteCalculationDescriptor.

computeBestOrder

fun computeBestOrder(computeBestOrder: Boolean): RouteCalculationDescriptor.Builder

Specifies if the best order of waypoints should be used to compute the route. For example, if the maximum allowed number of waypoints is 50, then it might be reduced to 20 in better order.

computeTravelForTraffic

fun computeTravelForTraffic(computeTravelTimeForTraffic: TrafficInformation): RouteCalculationDescriptor.Builder

Specifies whether to return additional travel times using different types of traffic information (none, historic, live) as well as the default best-estimate travel time.

instructionType

fun instructionType(instructionsType: InstructionsType): RouteCalculationDescriptor.Builder

Specifies the instructions type for the route calculation.

language

fun language(language: String): RouteCalculationDescriptor.Builder

Specifies the language used for route calculation.

maxAlternatives

fun maxAlternatives(maxAlternatives: Int): RouteCalculationDescriptor.Builder

Specifies the maximal number of route alternatives to be calculated by the service.

minDeviationDistance

fun minDeviationDistance(minDeviationDistance: Int): RouteCalculationDescriptor.Builder

All alternative routes returned will follow the reference route from the origin point of the calculateRoute Request for at least this number of meters. This can only be used when reconstructing a route. The minDeviationDistance parameter cannot be used in conjunction with arriveAt.

minDeviationTime

fun minDeviationTime(minDeviationTime: Int): RouteCalculationDescriptor.Builder

All alternative routes returned will follow the reference route from the origin point of the calculateRoute Request for at least this number of seconds. This can only be used when reconstructing a route. The minDeviationTime parameter cannot be used in conjunction with arriveAt.

reportType

fun reportType(reportType: ReportType): RouteCalculationDescriptor.Builder

Specifies if the report should be provided in the RoutePlan.

routeDescription

fun routeDescription(routeDescription: RouteDescriptor): RouteCalculationDescriptor.Builder

Specifies parameters related to the route itself.

routeRepresentation

fun routeRepresentation(routeRepresentation: RouteRepresentation): RouteCalculationDescriptor.Builder

Specifies the route representation for the route calculation.

sectionType

fun sectionType(sectionType: SectionType): RouteCalculationDescriptor.Builder

Specifies which of the section types is reported in the result.

supportingPoints

fun supportingPoints(supportingPoints: List<LatLng>): RouteCalculationDescriptor.Builder

A list of base route points to be used as input for route reconstruction.

vehicleHeading

fun vehicleHeading(vehicleHeading: Int): RouteCalculationDescriptor.Builder

Specifies the vehicle heading for route calculation.

waypoints

fun waypoints(waypoints: List<LatLng>): RouteCalculationDescriptor.Builder

Specifies the array of map coordinates whose geographical information indicates your waypoints for the route calculation.

waypointsWithAccuracy

fun waypointsWithAccuracy(waypointWithAccuracy: List<LatLngAcc>): RouteCalculationDescriptor.Builder

Specifies the array of map coordinates whose geographical information indicates your waypoints with a radius for the route calculation.