Routes Preferred API 目前僅適用於特定客戶。如需瞭解詳情,請
聯絡銷售人員。
雙輪車
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
Routes Preferred API 支援四種交通方式:
二輪車輛是指二輪機動車輛 (例如摩托車)。
機車交通方式與自行車交通方式不同,後者是人力驅動的交通方式。
指定機車交通方式
呼叫 Routes Preferred API 時,您可以使用 RouteTravelMode
列舉值指定交通方式。
範例
以下範例說明如何在 ComputeRoutes()
方法要求主體中設定交通方式。
{
"origin":{
"location":{
"latLng":{
"latitude":37.419734,
"longitude":-122.0827784
}
}
},
"destination":{
"location":{
"latLng":{
"latitude":37.417670,
"longitude":-122.079595
}
}
},
"travelMode":"TWO_WHEELER"
}
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-09-20 (世界標準時間)。
[null,null,["上次更新時間:2025-09-20 (世界標準時間)。"],[],["The Routes Preferred APIs support four travel modes: Drive, Walk, Bicycle, and Two-wheeler, where Two-wheeler refers to motorized two-wheeled vehicles. To use a specific mode, utilize the `RouteTravelMode` enumeration in the API call. For example, to specify the two-wheeler mode in the `ComputeRoutes()` method request body, set the `\"travelMode\"` parameter to `\"TWO_WHEELER\"`. The two-wheeler mode is distinct from the bicycle mode, which is human-powered.\n"],null,[]]