路線規劃功能
路線是指從起點 (起始位置) 到終點 (目的地) 之間可供導航的路徑。您可以選擇使用不同的交通方式規劃路線,例如步行、騎單車或搭乘不同類型的車輛。您也可以要求路線詳細資料,例如距離、路線預估時間、預估通行費和路線指引的逐步說明。
您可以使用路線,協助您判斷最有效率的調度排程路線,例如:
如何最佳分配一組工作人員來取件
最適合將包裹運送至最終目的地的倉庫
Routes API 提供多種選項,可自訂路線類型和路線回應中提供的資訊。以下指南主題可協助您開始使用:
主題 |
說明 |
取得路線 |
瞭解如何建立路線矩陣,以及回應中需要的資訊。 |
可用的路線車輛類型 |
如何選取路線適用的車輛類型。 |
路標類型和選項 |
如何指定路線控點的位置,以及在起點和目的地之間指定路線控點的選項,以及如何處理這些路線控點。 |
可用的流量選項 |
您可以使用哪些交通選項,以及如何在計算路線和預估行程時間時選取要使用的選項。 |
可用的路線選項 |
如何自訂路線,包括最佳化路線控點,以及偏好設定要避開的路線功能,例如收費路段或渡輪。 |
查看路徑回應 |
查看 Routes API 如何傳回路線,瞭解如何在應用程式中處理回應。 |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-02-06 (世界標準時間)。
[null,null,["上次更新時間: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"]]