Steps contains an array of steps denoting information about each separate step of the leg of the journey.Įach element in the steps array defines a single step of the calculated directions. For routes that contain no waypoints, the route will consist of a single "leg," but for routes that define one or more waypoints, the route will consist of one or more legs, corresponding to the specific legs of the journey. (A route with no waypoints will contain exactly one leg within the legs array.) Each leg consists of a series of steps.Įach element in the legs array specifies a single leg of the journey from the origin to the destination in the calculated route. A separate leg will be present for each waypoint or destination specified. Legs contains an array which contains information about a leg of the route, between two locations within the given route. These two is a part of waypoints that can give you a small detail about the directions. Just take a look at the legs and steps part. Here is a sample request using Directions API: But it also contains information like travel distance and duration. If the Distance Matrix API is a service that provides travel distance and time for a matrix of origins and destinations, the Directions API is a service that calculates directions between locations. You can try to check the Directions API if it can do the things that you want to achieve.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |