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"
}
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-09-20。
[null,null,["最后更新时间 (UTC):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,[]]