-
A
Routeobject defines a single route that the user can follow to visit a series of waypoints in order. The route object includes information about the route, such as its distance and expected travel time. Depending on the criteria used to calculate the route, the route object may also include detailed turn-by-turn instructions.Typically, you do not create instances of this class directly. Instead, you receive route objects when you request directions using the
See moreDirections.calculate(_:completionHandler:)orDirections.calculateRoutes(matching:completionHandler:)method. However, if you use theDirections.url(forCalculating:)method instead, you can useJSONDecoderto convert the HTTP response into aRouteResponseorMapMatchingResponseobject and access theRouteResponse.routesorMapMatchingResponse.routesproperty.Declaration
Swift
-
A
RouteLegobject defines a single leg of a route between two waypoints. If the overall route has only two waypoints, it has a singleRouteLegobject that covers the entire route. The route leg object includes information about the leg, such as its name, distance, and expected travel time. Depending on the criteria used to calculate the route, the route leg object may also include detailed turn-by-turn instructions.You do not create instances of this class directly. Instead, you receive route leg objects as part of route objects when you request directions using the
See moreDirections.calculate(_:completionHandler:)method.Declaration
Swift
-
A
RouteStepobject represents a single distinct maneuver along a route and the approach to the next maneuver. The route step object corresponds to a single instruction the user must follow to complete a portion of the route. For example, a step might require the user to turn then follow a road.You do not create instances of this class directly. Instead, you receive route step objects as part of route objects when you request directions using the
See moreDirections.calculate(_:completionHandler:)method, setting theincludesStepsoption totruein theRouteOptionsobject that you pass into that method.Declaration
Swift
Install in Dash
Results Reference