ขณะนี้
เส้นทาง API ที่ต้องการมีให้บริการเฉพาะลูกค้าบางรายเท่านั้น
ติดต่อฝ่ายขายเพื่อดูข้อมูลเพิ่มเติม
เส้นทางสําหรับรถสองล้อ
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
Routes Preferred API รองรับโหมดการเดินทาง 4 โหมด ได้แก่
- ไดรฟ์
- เดิน
- จักรยาน
- มอเตอร์ไซค์
ยานพาหนะ 2 ล้อหมายถึงยานพาหนะ 2 ล้อที่ขับเคลื่อนด้วยเครื่องยนต์ (เช่น รถจักรยานยนต์)
โหมดการเดินทางด้วยยานพาหนะ 2 ล้อแตกต่างจากโหมดการเดินทางด้วยจักรยาน ซึ่งเป็นโหมดการเดินทางที่มนุษย์เป็นผู้ขับเคลื่อน
การระบุโหมดการเดินทางด้วยยานพาหนะ 2 ล้อ
เมื่อเรียกใช้ Routes Preferred API คุณจะใช้ค่าการแจกแจงประเภท RouteTravelMode
เพื่อระบุโหมดการเดินทาง
ตัวอย่าง
ตัวอย่างต่อไปนี้แสดงวิธีตั้งค่าโหมดการเดินทางในComputeRoutes()
method request
body
{
"origin":{
"location":{
"latLng":{
"latitude":37.419734,
"longitude":-122.0827784
}
}
},
"destination":{
"location":{
"latLng":{
"latitude":37.417670,
"longitude":-122.079595
}
}
},
"travelMode":"TWO_WHEELER"
}
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-04-24 UTC
[[["เข้าใจง่าย","easyToUnderstand","thumb-up"],["แก้ปัญหาของฉันได้","solvedMyProblem","thumb-up"],["อื่นๆ","otherUp","thumb-up"]],[["ไม่มีข้อมูลที่ฉันต้องการ","missingTheInformationINeed","thumb-down"],["ซับซ้อนเกินไป/มีหลายขั้นตอนมากเกินไป","tooComplicatedTooManySteps","thumb-down"],["ล้าสมัย","outOfDate","thumb-down"],["ปัญหาเกี่ยวกับการแปล","translationIssue","thumb-down"],["ตัวอย่าง/ปัญหาเกี่ยวกับโค้ด","samplesCodeIssue","thumb-down"],["อื่นๆ","otherDown","thumb-down"]],["อัปเดตล่าสุด 2025-04-24 UTC"],[[["Routes Preferred APIs support four travel modes: drive, walk, bicycle, and two-wheeler (motorcycles)."],["Two-wheeler travel mode is distinct from bicycle travel mode, catering to motorized two-wheeled vehicles instead of human-powered ones."],["When using Routes Preferred APIs, specify the desired travel mode using the `RouteTravelMode` enumeration value within the request."],["An example demonstrates how to set the `travelMode` to \"TWO_WHEELER\" within the `ComputeRoutes()` method request body, illustrating its practical application."]]],["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"]]