RoutePlanningOptions
Options for planning routes, which are passed to one of the various route planners.
Parameters
The list of route locations. Note: Itinerary.planningTime will be overwritten by departAt/arriveAt in case they are set.
Options governing which streets to prefer.
A departure time for the route. Cannot be used together with arriveAt.
An arrival time for the route. Cannot be used together with departAt.
Options for calculating more than one route.
Properties for the generated instructions. Specify null for no instructions generation.
Options for each route leg, such as a polyline to follow.
The vehicle dimensions, restrictions, and engine parameters. When guidanceOptions are given, the vehicle has to be of type VehicleType.Car, VehicleType.Motorcycle or VehicleType.Truck. Please use VehicleType.Car for VehicleType.Taxi.
Additional options for electric vehicles to take charging into account.
Options regarding the way the request is sent to the server.
Specifies whether to optimize the order of waypoints, and if so, how.
Specifies how much guidance information (instructions and lane guidance) is returned with the route. Defaults to RouteInformationMode.Complete.
Specifies the road side on arrival preference for waypoints and destination.
Throws
if an invalid combination of options is used. Invalid combinations are:
using non-zero
pauseTimefor the origin or destinationusing departAt and arriveAt at the same time.
using alternativeRoutesOptions.maxAlternatives with waypointOptimization other than WaypointOptimization.None
using alternativeRoutesOptions.minDeviationTime or alternativeRoutesOptions.minDeviationDistance with empty routeLegOptions or less than 2 supporting points in any leg
using arriveAt with AlternativeRoutesOptions.minDeviationTime or AlternativeRoutesOptions.minDeviationDistance
using routeLegOptions where any leg has only 1 supporting point.
using Motorized with combustion and electric engines at the same time
using Motorized with weight less than or equal to 0 when combustion or electric engine efficiency is set
using chargingOptions with
a non-motorized vehicle
a motorized vehicle without an electric engine
an electric vehicle without a charge level
chargingOptions.minChargeAtDestination greater than chargeLevel.maxCharge
chargingOptions.minChargeAtChargingStops greater than half of chargeLevel.maxCharge and vehicle.modelId not set
waypointOptimization other than WaypointOptimization.None
costModel.routeType other than RouteType.Fast
costModel.considerTraffic other than ConsiderTraffic.Yes; this limitation is applicable
using reconstructionMode set to ReconstructionMode.Route with an itinerary in which the origin and destination coordinates do not match the first and last point of the supporting polyline respectively. for the Orbis map only
using path alternatives with waypoint optimization
using route- and leg-level routeType together
specifying different number of route leg options than the number of route legs based on the provided itinerary
using guidanceOptions with a vehicle other than VehicleType.Car, VehicleType.Motorcycle or VehicleType.Truck
Options for planning routes, which are passed to one of the various route planners.
Parameters
The list of route locations. Note: Itinerary.planningTime will be overwritten by departAt/arriveAt in case they are set.
General strategy for selecting roads during route calculation.
Use live traffic in the route calculation.
Avoidance criteria.
A departure time for the route. Cannot be used together with arriveAt.
An arrival time for the route. Cannot be used together with departAt.
Options for calculating more than one route.
Properties for the generated instructions. Specify null for no instructions generation.
Options for each route leg, such as a polyline to follow.
The vehicle dimensions, restrictions, and engine parameters.
Additional options for electric vehicles to take charging into account.
Options regarding the way the request is sent to the server.
Specifies whether to optimize the order of waypoints, and if so, how they are optimized.
Specifies how much guidance information (instructions and lane guidance) is returned with the route. Defaults to RouteInformationMode.Complete.
Specifies the road side on arrival preference for waypoints and destination.
Defines the mode used for the route reconstruction. If the value is null and at least one routeLegOptions has supporting points it will be defaulted to ReconstructionMode.Track. If the value is ReconstructionMode.Route or the Itinerary.heading parameter is ignored.
Throws
if an invalid combination of options is used, such as specifying both departAt and arriveAt, or using chargingOptions with a com.tomtom.sdk.vehicle.CombustionEngine, or specifying reconstructionMode without supportingPoints in routeLegOptions, or ReconstructionMode.Route with an itinerary in which the origin and destination coordinates do not match the first and last point of the supporting polyline respectively, or having any leg in routeLegOptions with only 1 supporting point.