Skip to end of metadata
Go to start of metadata

When the Directions API returns results, it places them within a (JSON) routes array. Even if the service returns no results (such as if the origin and/or destination doesn't exist) it still returns an empty routes array. (XML responses consist of zero or more route elements.) Each element of the routes array contains a single result from the specified origin and destination. This route may consist of one or more legs depending on whether any waypoints were specified. As well, the route also contains copyright and warning information which must be displayed to the user in addition to the routing information.

Definition

public class Route

Summary

The following table summarizes the members exposed in this class.

Public Constructors

Route Constructor() Initializes a new instance of the Route class.

Public Properties

Bounds bounds contains the viewport bounding box of the overview polyline.
Copyrights copyrights contains the copyrights text to be displayed for this route. You must handle and display this information yourself.
Legs legs[] contains an array which contains information about a leg of the route, between two locations within the given route. A separate leg will be present for each waypoint or destination specified. (A route with no waypoints will contain exactly one leg within the legs array.) Each leg consists of a series of steps. (See Directions Legs below.)
OverviewPath overview_path contains an object holding an array of encoded points and levels that represent an approximate (smoothed) path of the resulting directions.
Summary summary contains a short textual description for the route, suitable for naming and disambiguating the route from alternatives.
Warnings warnings[] contains an array of warnings to be displayed when showing these directions. You must handle and display these warnings yourself.
WaypointOrder waypoint_order contains an array indicating the order of any waypoints in the calculated route. This waypoints may be reordered if the request was passed optimize:true within its waypoints parameter.

Public Constructors

public Route()

Public Properties

public Bounds Bounds { get; set; }

bounds contains the viewport bounding box of the overview polyline.

public string Copyrights { get; set; }

copyrights contains the copyrights text to be displayed for this route. You must handle and display this information yourself.

public List<Leg> Legs { get; set; }

legs[] contains an array which contains information about a leg of the route, between two locations within the given route. A separate leg will be present for each waypoint or destination specified. (A route with no waypoints will contain exactly one leg within the legs array.) Each leg consists of a series of steps. (See Directions Legs below.)

public OverviewPolyline OverviewPath { get; set; }

overview_path contains an object holding an array of encoded points and levels that represent an approximate (smoothed) path of the resulting directions.

public string Summary { get; set; }

summary contains a short textual description for the route, suitable for naming and disambiguating the route from alternatives.

public String[] Warnings { get; set; }

warnings[] contains an array of warnings to be displayed when showing these directions. You must handle and display these warnings yourself.

public Int32[] WaypointOrder { get; set; }

waypoint_order contains an array indicating the order of any waypoints in the calculated route. This waypoints may be reordered if the request was passed optimize:true within its waypoints parameter.

  • No labels