路线的用途
路线是指起始位置(或起点)和终点位置(或目的地)之间的可导航路径。您可以选择查询不同交通方式(例如步行、骑车或不同类型的车辆)的路线。您还可以请求路线详情,例如距离、预计路线行程时间、预计过路费以及路线导航分步说明。
您可以使用路线来确定最有效的调度路线,例如:
如何最好地分配一组工人来提取一系列包裹
最适合将包裹配送到最终目的地的仓库
Routes API 提供了多个选项,可用于自定义路线类型和路线响应中提供的信息。以下指南主题可帮助您上手:
主题 |
说明 |
查询路线 |
了解如何创建路线矩阵以及您希望在响应中看到哪些信息。 |
可用的路线车辆类型 |
如何选择相应路线适用于哪种车辆。
|
航点类型和选项 |
如何指定航点的位置,以及指定起点和目的地之间的航点的选项,以及如何处理这些航点。 |
可用的流量选项 |
您可以使用哪些交通信息选项,以及如何在计算路线和估算行程时选择要使用的选项。
|
可用路线选项 |
如何自定义路线,包括优化路线航点,以及设置要避开的路线地图项的偏好设置(例如收费站或轮渡)。
|
查看路线响应 |
查看 Routes API 如何返回路线,以便了解如何在应用中处理响应。
|
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-02-06。
[null,null,["最后更新时间 (UTC):2025-02-06。"],[[["A route is a navigable path between a start and end location, which can be calculated for various modes of transportation like walking, biking, or driving."],["You can obtain route details such as distance, estimated travel time, tolls, and step-by-step directions."],["Routes can be used for efficient dispatch scheduling, including optimizing worker assignments and warehouse selection for package delivery."],["The Routes API offers customization options for route types, vehicle types, waypoint handling, traffic considerations, and route preferences."],["Developers can access detailed guides to understand route computation, response handling, and various API features."]]],["Routes provide navigable paths between origins and destinations, supporting various transportation modes. They offer details like distance, time, tolls, and step-by-step directions. The Routes API allows route customization, aiding in tasks like dispatch scheduling. Options include selecting vehicle types, specifying waypoints, incorporating traffic data, and customizing route preferences (e.g., toll or ferry avoidance). The API also provides a method for retrieving route data that is to be reviewed in order to understand how to use this information in an application.\n"]]