buildEvRoutePlanningOptions

fun buildEvRoutePlanningOptions(itinerary: Itinerary, chargingOptions: ChargingOptions, @IntRange(from = 0, to = 2) maxAlternatives: Int = 0, avoids: Set<AvoidType> = emptySet(), language: Locale = Locale.ENGLISH, instructionPhoneticsType: InstructionPhoneticsType = InstructionPhoneticsType.Ipa): RoutePlanningOptions

Creates EV options for planning routes which are passed to one of the various route planners.

Parameters

itinerary

The list of route locations.

chargingOptions

Represents options related to the battery charging.

maxAlternatives

Maximum number of desired alternative routes. Value must be in range: 0,2.

avoids

What kind of roads should be be avoided while calculating a route. Default value is an empty set.

language

The locale of guidance instruction and road name sections. Default value is Locale.ENGLISH.

instructionPhoneticsType

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.