Routes Preferred API 目前仅适用于部分客户。如需了解详情,请
与销售人员联系。
Google uses AI technology to translate content into your preferred language. AI translations can contain errors.
使用车辆停靠限定符
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
您可以使用“车辆中途停靠”限定符来指定航点用于停靠以接送乘客。这样可确保计算出的路线不会在不适合接送乘客的道路(例如高速公路或隧道)上开始或结束。
用例示例
假设地面道路与隧道内的道路交叉。
如果您指定一个位于两条道路交叉处的航点(如地图所示),则生成的路线会在地面道路或隧道内开始或结束。这会带来问题,因为您无法在隧道内停靠以接送乘客。
如果您想使用航点接送乘客,则可以设置 vehicleStopover 字段,以确保生成的路线在允许接送乘客的道路(即地面道路)上开始或结束。
示例
以下示例演示了如何设置
vehicleStopover 限定符。
{
"vehicleStopover": true,
"location": {
"latLng": {
"latitude":37.419734,
"longitude":-122.0827784
}
}
}
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2026-05-13。
[[["易于理解","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"]],["最后更新时间 (UTC):2026-05-13。"],[],["The `vehicleStopover` qualifier designates a waypoint for pick-up or drop-off. Setting `vehicleStopover` to `true` ensures the route begins or ends on a suitable road, avoiding unsuitable locations like highways or tunnels. Without this, a waypoint at an intersection (e.g., surface road over a tunnel) could lead to a route beginning or ending in the tunnel. The example demonstrates setting `vehicleStopover` to `true` within a waypoint's definition.\n"]]