RoutingOptions

data class RoutingOptions(    val itinerary: Itinerary,     val departAt: Date? = null,     val routeType: RouteType = RouteType.FAST,     val considerTraffic: Boolean = true,     val avoidTypes: List<AvoidType> = arrayListOf(),     val travelMode: TravelMode = TravelMode.CAR,     val hilliness: Hilliness? = null,     val windingness: Windingness? = null,     val maxAlternatives: Int = 0,     val alternativeType: AlternativeType? = null,     val minDeviationDistance: Int? = null,     val minDeviationTime: Int? = null,     val instructionType: InstructionType = InstructionType.NONE,     val language: Locale? = null,     val routeRepresentation: RouteRepresentation = RouteRepresentation.POLYLINE,     val includeExtendedRouteRepresentation: Boolean = true,     val trafficInformation: TrafficInformation = TrafficInformation.NONE,     val vehicleHeading: Int? = null,     val sectionTypes: List<SectionType> = mutableListOf(SectionType.TRAVEL_MODE),     val arriveAt: Date? = null,     val supportingPoints: List<List<GeoCoordinate>> = arrayListOf(),     val avoidVignettes: List<String>? = null,     val allowVignettes: List<String>? = null,     val avoidAreas: List<GeoBoundingBox>? = null,     val reportType: ReportType = ReportType.NONE,     val electricVehicleDescriptor: ElectricVehicleDescriptor? = null,     val combustionVehicleDescriptor: CombustionVehicleDescriptor? = null,     val instructionAnnouncementPoints: AnnouncementPoints = AnnouncementPoints.NONE,     val instructionPhonetics: InstructionPhoneticsType = InstructionPhoneticsType.NONE,     val instructionRoadShieldReferences: RoadShieldReferences = RoadShieldReferences.NONE,     val trackingId: String? = null,     val coordinatePrecision: CoordinatePrecision = CoordinatePrecision.FULL,     val extras: Any? = null)

Represents parameters used in a Routing API Request.

Important: This is a Public Preview API. It may be changed or removed at any time.

Parameters

itinerary

Itinerary represents the plan of the user for a specific route.

departAt

The departure time. Specified in RFC 3339 format with an optional time zone offset. Example:

  • 1996-12-19T16:39:57

  • 1996-12-19T16:39:57-08:00

routeType

The type of the requested route. Defaults to RouteType.FAST

considerTraffic

Whether the traffic information will be considered. The default value is true.

avoidTypes

Something that the route calculation should try to avoid when determining the route.

travelMode

The mode of travel for the requested route. Defaults to TravelMode.CAR

hilliness

Degree of hilliness for a thrilling route. Note: This parameter can only be used in conjunction with routeType=RouteType.THRILLING.

windingness

Level of turns for thrilling route. Note: This parameter can only be used in conjunction with routeType=RouteType.THRILLING.

maxAlternatives

The maximum number of route alternatives to be calculated by the service. The default value is 0.

alternativeType

When maxAlternatives is greater than 0, allows to specify the objective of computing alternative routes: finding routes that are significantly different than the reference route, or finding routes that are better than the reference route.

minDeviationDistance

All alternative routes returned will follow the reference route from the origin point of the calculateRoute Request for at least this number of meters. This can only be used when reconstructing a route. The minDeviationDistance parameter cannot be used in conjunction with arriveAt.

minDeviationTime

All alternative routes returned will follow the reference route from the origin point of the calculateRoute Request for at least this number of seconds. This can only be used when reconstructing a route. The minDeviationTime parameter cannot be used in conjunction with arriveAt.

trackingId

Specifies an identifier for the request. The value should be unique for each request. The value must match the regular expression '^a-zA-Z0-9-{1,100}$'. If specified, the same value is sent back in the similar-named response header. Otherwise, a generated value may be sent back.

instructionType

The instruction type for the route calculation.

language

The language of the guidance messages.

  • Proper nouns (the names of streets, plazas, etc.) are returned in the specified language, or if that is not available, they are returned in an available language that is close to it.

  • Allowed values are (a subset of) the IETF language tags described here.

  • The currently supported languages are listed in the Supported languages section.

  • Defaults to the currently set device locale.

routeRepresentation

The route representation for the route calculation.

includeExtendedRouteRepresentation

Specifies whether to include additional info like:

  • travel time from start of the route

  • distance from start of the route

This additional data is generated for group of intermediate points on polyline requested in routeRepresentation and represented as list of com.tomtom.sdk.common.route.Route.intermediateRouteSteps.

includeExtendedRouteRepresentation data is available only in routing with extended guidance.

trafficInformation

Whether to return additional travel times using different types of traffic information (none, historic, live) as well as the default best-estimate travel time.

vehicleHeading

The vehicle heading for route calculation.

sectionTypes

Which of the section types should be reported in the result.

arriveAt

The desired arrival time for the route calculation. Specified in RFC 3339 format with an optional time zone offset. Example:

  • 1996-12-19T16:39:57

  • 1996-12-19T16:39:57-08:00

supportingPoints

A list of base route points per leg to be used as input for route reconstruction.

allowVignettes

This is a list of 3-character, ISO 3166-1, alpha-3 country codes of countries in which toll roads with vignettes are allowed. Specifying allowVignettes with some countries X is equivalent to specifying avoidVignettes with all countries but X. Specifying allowVignettes with an empty list is the same as avoiding all toll roads with vignettes. Note: It is an error to specify both avoidVignettes and allowVignettes.

avoidVignettes

This is a list of 3-character, ISO 3166-1, alpha-3 country codes of countries in which all toll roads with vignettes are to be avoided. Toll roads with vignettes in countries not in the list are unaffected. Note: It is an error to specify both avoidVignettes and allowVignettes.

avoidAreas

Areas which will be avoided.

reportType

Whether the report should be provided in the RoutingResult.

electricVehicleDescriptor

Parameters for an electric vehicle.

combustionVehicleDescriptor

Parameters for a combustion vehicle.

instructionAnnouncementPoints

Specifies whether to include announcement points in instructions. If specified, the instruction will include up to three additional fine-grained announcement points, each with its own location, maneuver type, and distance to the instruction point. Available only in routing with extended guidance.

instructionPhonetics

Specifies whether to include the phonetic transcription of street names, signpost text, and road numbers in the instructions in the response. Available only in routing with extended guidance.

instructionRoadShieldReferences

Specifies whether to include road shield references into the external road shields atlas. Available only in routing with extended guidance.

coordinatePrecision

Specifies the coordinate precision to use for returned geometry.

extras

Any which can be used to provide additional data to a custom implementation of RoutingApi.

Constructors

Link copied to clipboard
fun RoutingOptions(    itinerary: Itinerary,     departAt: Date? = null,     routeType: RouteType = RouteType.FAST,     considerTraffic: Boolean = true,     avoidTypes: List<AvoidType> = arrayListOf(),     travelMode: TravelMode = TravelMode.CAR,     hilliness: Hilliness? = null,     windingness: Windingness? = null,     maxAlternatives: Int = 0,     alternativeType: AlternativeType? = null,     minDeviationDistance: Int? = null,     minDeviationTime: Int? = null,     instructionType: InstructionType = InstructionType.NONE,     language: Locale? = null,     routeRepresentation: RouteRepresentation = RouteRepresentation.POLYLINE,     includeExtendedRouteRepresentation: Boolean = true,     trafficInformation: TrafficInformation = TrafficInformation.NONE,     vehicleHeading: Int? = null,     sectionTypes: List<SectionType> = mutableListOf(SectionType.TRAVEL_MODE),     arriveAt: Date? = null,     supportingPoints: List<List<GeoCoordinate>> = arrayListOf(),     avoidVignettes: List<String>? = null,     allowVignettes: List<String>? = null,     avoidAreas: List<GeoBoundingBox>? = null,     reportType: ReportType = ReportType.NONE,     electricVehicleDescriptor: ElectricVehicleDescriptor? = null,     combustionVehicleDescriptor: CombustionVehicleDescriptor? = null,     instructionAnnouncementPoints: AnnouncementPoints = AnnouncementPoints.NONE,     instructionPhonetics: InstructionPhoneticsType = InstructionPhoneticsType.NONE,     instructionRoadShieldReferences: RoadShieldReferences = RoadShieldReferences.NONE,     trackingId: String? = null,     coordinatePrecision: CoordinatePrecision = CoordinatePrecision.FULL,     extras: Any? = null)

Types

Link copied to clipboard
class Builder(itinerary: Itinerary)

Important: This is a Public Preview API. It may be changed or removed at any time.

Properties

Link copied to clipboard
val allowVignettes: List<String>? = null
Link copied to clipboard
val alternativeType: AlternativeType? = null
Link copied to clipboard
val arriveAt: Date? = null
Link copied to clipboard
val avoidAreas: List<GeoBoundingBox>? = null
Link copied to clipboard
val avoidTypes: List<AvoidType>
Link copied to clipboard
val avoidVignettes: List<String>? = null
Link copied to clipboard
val combustionVehicleDescriptor: CombustionVehicleDescriptor? = null
Link copied to clipboard
val considerTraffic: Boolean = true
Link copied to clipboard
val coordinatePrecision: CoordinatePrecision
Link copied to clipboard
val departAt: Date? = null
Link copied to clipboard
val electricVehicleDescriptor: ElectricVehicleDescriptor? = null
Link copied to clipboard
val extras: Any? = null
Link copied to clipboard
val hilliness: Hilliness? = null
Link copied to clipboard
val includeExtendedRouteRepresentation: Boolean = true
Link copied to clipboard
val instructionAnnouncementPoints: AnnouncementPoints
Link copied to clipboard
val instructionPhonetics: InstructionPhoneticsType
Link copied to clipboard
Link copied to clipboard
val instructionType: InstructionType
Link copied to clipboard
val itinerary: Itinerary
Link copied to clipboard
val language: Locale? = null
Link copied to clipboard
val maxAlternatives: Int = 0
Link copied to clipboard
val minDeviationDistance: Int? = null
Link copied to clipboard
val minDeviationTime: Int? = null
Link copied to clipboard
val reportType: ReportType
Link copied to clipboard
val routeRepresentation: RouteRepresentation
Link copied to clipboard
val routeType: RouteType
Link copied to clipboard
val sectionTypes: List<SectionType>
Link copied to clipboard
val supportingPoints: List<List<GeoCoordinate>>
Link copied to clipboard
val trackingId: String? = null
Link copied to clipboard
val trafficInformation: TrafficInformation
Link copied to clipboard
val travelMode: TravelMode
Link copied to clipboard
val vehicleHeading: Int? = null
Link copied to clipboard
val windingness: Windingness? = null