Google sử dụng công nghệ AI để dịch nội dung sang ngôn ngữ bạn ưu tiên. Bản dịch bằng AI có thể có lỗi.
Tuyến đường dành cho xe hai bánh
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Routes Preferred API hỗ trợ 4 phương tiện đi lại:
- Drive
- Đi bộ
- Xe đạp
- Xe máy
Xe hai bánh là xe cơ giới hai bánh (ví dụ: xe mô tô).
Chế độ đi xe hai bánh khác với chế độ đi xe đạp, là chế độ đi bằng sức người.
Chỉ định phương thức di chuyển bằng xe hai bánh
Khi gọi Routes Preferred API, bạn sử dụng giá trị enum RouteTravelMode để chỉ định phương tiện di chuyển.
Ví dụ
Ví dụ sau đây minh hoạ cách đặt phương tiện di chuyển trong nội dung yêu cầu của phương thức ComputeRoutes().
{
"origin":{
"location":{
"latLng":{
"latitude":37.419734,
"longitude":-122.0827784
}
}
},
"destination":{
"location":{
"latLng":{
"latitude":37.417670,
"longitude":-122.079595
}
}
},
"travelMode":"TWO_WHEELER"
}
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2026-11-02 UTC."],[],["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"]]