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):2024-11-23。
[null,null,["最后更新时间 (UTC):2024-11-23。"],[[["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."]]],[]]