RouteResponse
A RouteResponse object is a structure that corresponds to a directions response returned by the Mapbox Directions API.
-
-
The raw HTTP response from the Directions API.
-
The unique identifier that the Mapbox Directions API has assigned to this response.
-
An array of
Waypointobjects in the order of the input coordinates. EachWaypointis an input coordinate snapped to the road and path network.This property omits the waypoint corresponding to any waypoint in
RouteOptions.waypointsthat hasWaypoint.separatesLegsset totrue. -
The criteria for the directions response.
-
The credentials used to make the request.
-
The time when this
RouteResponseobject was created, which is immediately upon recieving the raw URL response.If you manually start fetching a task returned by
Directions.url(forCalculating:), this property is set tonil; use theURLSessionTaskTransactionMetrics.responseEndDateproperty instead. This property may also be set tonilif you create this result from a JSON object or encoded object.This property does not persist after encoding and decoding.
-
Managed array of
RoadClassesrestrictions specified toRouteOptions.roadClassesToAvoidwhich were violated during route calculation.Routing engine may still utilize
RoadClassesmeant to be avoided in cases when routing is impossible otherwise.Violations are ordered by routes from the
routesarray, then by a leg, step, and intersection, whereRoadClassesrestrictions were ignored.niland empty return arrays correspond toniland emptyroutesarray respectively. -
-
-
-
-
Filters
roadClassExclusionViolationslazily to search for specific leg and step.Passing
nilaslegIndexwill result in searching for all legs. -
Filters
roadClassExclusionViolationslazily to search for specific leg and step.Passing
nilasstepIndexwill result in searching for all steps. -
Filters
roadClassExclusionViolationslazily to search for specific leg, step and intersection.Passing
nilasintersectionIndexwill result in searching for all intersections of given step.
Install in Dash
RouteResponse Structure Reference