buildEvRoutePlanningOptions
Deprecated
This will be removed from future releases after 2027-04-19. Use com.tomtom.sdk.routing.options.buildEvRoutePlanningOptions with the builder lambda instead. Move each explicit parameter into the trailing lambda.
Replace with
import com.tomtom.sdk.routing.options.buildEvRoutePlanningOptions
buildEvRoutePlanningOptions(itinerary, chargingOptions) { }Creates EV options for planning routes which are passed to one of the various route planners.
Prefer the builder-style com.tomtom.sdk.routing.options.buildEvRoutePlanningOptions, which configures the options through a RoutePlanningOptions.EvBuilder 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 = buildEvRoutePlanningOptions(itinerary = itinerary, chargingOptions = chargingOptions) {
maxAlternatives = 2
}Parameters
The list of route locations.
Represents options related to the battery charging.
Maximum number of desired alternative routes. Value must be in range: 0,2.
What kind of roads should be be avoided while calculating a route. Default value is an empty set.
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.