Routes Preferred API 目前仅适用于部分客户。如需了解详情,请
与销售人员联系。
使用车辆停靠限定符
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
您可以使用车辆经停点限定符指定某个航点是用于停车上车或下车的。这样可确保计算出的路线不会从或到不适合上车或下车的道路(例如高速公路或隧道)。
用例示例
假设地面道路与隧道内的道路相交。如果您指定位于两条道路相交处的航点(如地图上所示),则生成的路线将从地面道路或隧道开始或结束。这会带来一个问题,因为您无法在隧道中停车上下客。
如果您想将路点用于上车点或下车点,则可以设置 vehicleStopover
字段,以确保生成的路线始于或终于允许上车点或下车点的道路(即地面道路)。
示例
以下示例演示了如何设置 vehicleStopover
限定符。
{
"vehicleStopover": true,
"location": {
"latLng": {
"latitude":37.419734,
"longitude":-122.0827784
}
}
}
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-11-23。
[[["易于理解","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):2024-11-23。"],[[["The Vehicle Stop-over qualifier ensures routes start and end at locations suitable for pickups and drop-offs, avoiding unsuitable roads like highways or tunnels."],["By setting `vehicleStopover` to true for a waypoint, the calculated route will prioritize accessible roads for pickup and drop-off points."],["This feature is particularly useful when a waypoint is located near restricted areas like tunnels, ensuring the route directs to a safe and accessible nearby road."]]],["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"]]