buildRoutePlanningOptions
Deprecated
This will be removed from future releases after 2027-04-19. Use com.tomtom.sdk.routing.options.buildRoutePlanningOptions with the builder lambda instead. Move each explicit parameter into the trailing lambda.
Replace with
import com.tomtom.sdk.routing.options.buildRoutePlanningOptions
buildRoutePlanningOptions(itinerary) { }Creates options for planning routes which are passed to one of the various route planners.
Prefer the builder-style com.tomtom.sdk.routing.options.buildRoutePlanningOptions, which configures the options through a RoutePlanningOptions.Builder lambda. To migrate, change the import to the com.tomtom.sdk.routing.options package and move each explicit parameter into the trailing lambda, for example:
val options = buildRoutePlanningOptions(itinerary = itinerary) {
maxAlternatives = 2
routeType = RouteType.Fast
}Parameters
The list of route locations.
Maximum number of desired alternative routes. Value must be in range: 0,2.
General strategy for selecting roads during route calculation.
What kind of roads should be be avoided while calculating a route.
The locale of guidance instruction and road name sections. Default value is Locale.ENGLISH.
The phonetics type of the guidance instructions. Default value is InstructionPhoneticsType.Ipa.
Throws
when:
maxAlternatives is set to a value outside 0, 2.
VehicleProvider.vehicle is not set to Vehicle.Car.