sdk-routing / com.tomtom.online.sdk.routing.route / RouteSpecification / Builder

Builder

@PublicPreview("2021.06") class Builder

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

Parameters

origin - A location of the origin defined as a latitude longitude pair.

destination - A location of the destination defined as a latitude longitude pair.

Constructors

<init>

Builder(origin: LatLng, destination: LatLng)

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

Functions

build

fun build(): RouteSpecification

Constructs a new RouteSpecification.

combustionVehicleDescriptor

fun combustionVehicleDescriptor(combustionVehicleDescriptor: CombustionVehicleDescriptor): RouteSpecification.Builder

Specifies parameters for the combustion vehicle.

electricVehicleDescriptor

fun electricVehicleDescriptor(electricVehicleDescriptor: ElectricVehicleDescriptor): RouteSpecification.Builder

Specifies parameters for the electric vehicle.

routeCalculationDescriptor

fun routeCalculationDescriptor(routeCalculationDescriptor: RouteCalculationDescriptor): RouteSpecification.Builder

Specifies parameters related to the route calculation.