[−][src]Module google_maps::directions
The Directions API is a service that calculates directions between locations. You can search for directions for several modes of transportation, including transit, driving, walking, or cycling.
Get Started
-
New Users: Before you can start using the Google Maps Platform APIs and SDKs, you must sign up and create a billing account. To learn more, see Get Started with Google Maps Platform.
-
This service is also available as part of the client-side Maps JavaScript API, or for server-side use with the Java Client, Python Client, Go Client and Node.js Client for Google Maps Services.
Start coding with our client libraries
Client libraries make developing with the Google Maps web service APIs easier by providing simple, native implementations of common tasks, such as authentication, request throttling and automatic retry. The Directions API is available in the Java Client, Python Client, Go Client and Node.js Client for Google Maps Services.
Authentication, quotas, pricing, and policies
Activate the API and get an API key
To use the Directions API, you must first activate the API in the Google Cloud Platform Console and obtain the proper authentication credentials. You need to provide an API key in each request (or a client ID if you have a Premium Plan.
Click the button below to flow through a process where you will:
- Create or select a project
- Enable the API
- Get an API key
Learn more about authentication credentials.
Quotas and pricing
Review the usage and billing page for details on the quotas and pricing set for the Directions API.
Policies
Use of the Directions API must be in accordance with the API policies.
From our Terms of Service: Innovate, but don't duplicate. Don't make a substitute for Google Maps. If your app's primary purpose is navigation, a business directory, or a general purpose "maps app", it's a substitute for Google Maps. Learn more.
Learn more
There’s more you can do with the Directions API, like requesting directions via different travel modes, using waypoints to calculate routes through additional locations, and estimating travel time. See the Directions API developer guide for more examples and other details.
The Directions API developer guide is intended for website and mobile developers who want to compute direction data within maps provided by one of the Google Maps APIs. It provides an introduction to using the API and reference material on the available parameters.
Modules
error | Directions API error types and error messages. |
request | Look in this module for documentation on building your Directions API query. In particular, look at the Request struct for examples of the builder pattern. This module contains the tools (enums, structs, methods) for building your Google Maps Platform request. |
response | Resources (enums, structs) for processing the Directions API response from the Google Maps Platform. Look in here for more information about the data returned from Google's server and how to parse it with your program. |
travel_mode | Contains the |
vehicle_type | Contains the |