RouteRequest

@Serializable
data class RouteRequest(val coordinates: List<List<Double>>, val radiuses: List<Double>? = null, val bearings: List<List<Double>>? = null, val elevation: Boolean? = null, val extraInfo: List<String>? = null, val instructions: Boolean? = null, val instructionsFormat: String? = null, val language: String? = null, val preference: String? = null, val units: String? = null, val geometry: Boolean? = null, val geometrySimplify: Boolean? = null, val roundaboutExits: Boolean? = null, val attributes: List<String>? = null, val maneuvers: Boolean? = null, val continueStraight: Boolean? = null, val options: RouteOptions? = null)

Payload for the directions v2/directions/{profile} endpoint.

All parameters map to the official ORS API; nullable properties are omitted from the serialized JSON when not provided.

Constructors

Link copied to clipboard
constructor(coordinates: List<List<Double>>, radiuses: List<Double>? = null, bearings: List<List<Double>>? = null, elevation: Boolean? = null, extraInfo: List<String>? = null, instructions: Boolean? = null, instructionsFormat: String? = null, language: String? = null, preference: String? = null, units: String? = null, geometry: Boolean? = null, geometrySimplify: Boolean? = null, roundaboutExits: Boolean? = null, attributes: List<String>? = null, maneuvers: Boolean? = null, continueStraight: Boolean? = null, options: RouteOptions? = null)

Properties

Link copied to clipboard
val attributes: List<String>? = null

Additional attributes to include for each segment.

Link copied to clipboard
val bearings: List<List<Double>>? = null

List of [bearing, range] constraints for each coordinate.

Link copied to clipboard
@SerialName(value = "continue_straight")
val continueStraight: Boolean? = null

Force continue straight at waypoints?

Link copied to clipboard

List of [lon, lat] coordinate pairs in order of travel.

Link copied to clipboard
val elevation: Boolean? = null

Include elevation data in response.

Link copied to clipboard
@SerialName(value = "extra_info")
val extraInfo: List<String>? = null

Additional information to include, e.g., waytype.

Link copied to clipboard
val geometry: Boolean? = null

Whether to include geometry.

Link copied to clipboard
@SerialName(value = "geometry_simplify")
val geometrySimplify: Boolean? = null

Simplify the returned geometry.

Link copied to clipboard
val instructions: Boolean? = null

Whether to return turn-by-turn instructions.

Link copied to clipboard
@SerialName(value = "instructions_format")
val instructionsFormat: String? = null

Format of instructions such as html or text.

Link copied to clipboard
val language: String? = null

Preferred language for textual parts of the response.

Link copied to clipboard
val maneuvers: Boolean? = null

Include a list of maneuvers.

Link copied to clipboard
val options: RouteOptions? = null

Optional advanced options.

Link copied to clipboard
val preference: String? = null

Routing preference such as fastest or shortest.

Link copied to clipboard
val radiuses: List<Double>? = null

Search radiuses around each coordinate in meters.

Link copied to clipboard
@SerialName(value = "roundabout_exits")
val roundaboutExits: Boolean? = null

Return exit indices for roundabouts.

Link copied to clipboard
val units: String? = null

Unit system for distances.