Routes Preferred API 目前仅适用于部分客户。如需了解详情,请
与销售人员联系。
Waypoint
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
封装航点。航点用于标记路线的起点和终点,并包含路线上的中途停靠点。
JSON 表示法 |
{
"via": boolean,
"vehicleStopover": boolean,
"sideOfRoad": boolean,
// Union field location_type can be only one of the following:
"location": {
object (Location )
},
"placeId": string
// End of list of possible types for union field location_type .
} |
字段 |
via |
boolean
将此航点标记为里程碑,而不是停止点。对于请求中的每个非经停点路径点,响应都会将一个条目附加到 legs 数组,以提供该行程相应路段上的经停点的详细信息。如果您希望路线通过此航点而不停留,请将此值设置为 true。经由路径点不会导致向 legs 数组添加条目,但会将旅程路线改为途经该路径点。您只能对中间航点设置此值。如果您在终点航点上设置此字段,则请求将失败。如果 ComputeRoutesRequest.optimize_waypoint_order 设为 true,则此字段不能设为 true;否则,请求会失败。
|
vehicleStopover |
boolean
表示该航点是供车辆停靠的,目的是上车或下车。如果您设置此值,则计算出的路线不会包含不适合上车或下车的道路上的非 via 航点。此选项仅适用于 DRIVE 和 TWO_WHEELER 出行方式,并且 locationType 为 location 时有效。
|
sideOfRoad |
boolean
表示此航点的位置旨在让车辆优先停靠在道路的特定侧。设置此值后,路线将穿过相应位置,以便车辆在相应位置偏离道路中心的一侧停车。此选项仅适用于“驾车”和“TWO_WHEELER”行程模式。
|
联合字段 location_type 。表示营业地点的不同方式。location_type 只能是下列其中一项: |
location |
object (Location )
使用地理坐标指定的点,包括可选的航向。
|
placeId |
string
与航点关联的地图注点地点 ID。
|
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-11-10。
[[["易于理解","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-10。"],[[["Waypoints define the start, end, and intermediate stops of a route."],["Waypoints can be specified using geographic coordinates or a Place ID."],["You can customize waypoint behavior, like marking them as pass-through points or vehicle stops."],["`vehicleStopover` helps optimize routes for pickup/drop-off, avoiding unsuitable roads for vehicles."],["The `sideOfRoad` field allows specifying a preference for the vehicle to stop at a particular side of the road."]]],["Waypoints, marking route beginnings, ends, and intermediate stops, are defined by several fields. `via` determines if it's a stop or a milestone. `vehicleStopover` indicates suitability for vehicle stops (pickup/drop-off). `sideOfRoad` specifies a preferred side for the vehicle to stop. The location can be represented as either geographic coordinates (`location`) or by a Place ID (`placeId`). Waypoints can affect the `legs` array. Only `location` is applicable to `vehicleStopover`.\n"]]