Options
All
  • Public
  • Public/Protected
  • All
Menu

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.

Hierarchy

  • DirectionsRoute

Index

Properties

bounds

bounds: LatLngBounds

contains the viewport bounding box of the overview_polyline.

copyrights

copyrights: string

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

fare

If present, contains the total fare (that is, the total ticket costs) on this route. This property is only returned for transit requests and only for routes where fare information is available for all transit legs.

Note: The Directions API only returns fare information for requests that contain either an API key or a client ID and digital signature.

legs

legs: RouteLeg[]

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.

overview_path

overview_path: LatLngLiteral[]

An array of LatLngs representing the entire course of this route. The path is simplified in order to make it suitable in contexts where a small number of vertices is required (such as Static Maps API URLs).

overview_polyline

overview_polyline: { points: string }

contains a single points object that holds an encoded polyline representation of the route. This polyline is an approximate (smoothed) path of the resulting directions.

Type declaration

  • points: string

summary

summary: string

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

warnings

warnings: string[]

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

waypoint_order

waypoint_order: number[]

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.

Generated using TypeDoc