{"via": boolean,"vehicleStopover": boolean,"sideOfRoad": boolean,// Union field location_type can be only one of the following:"location": {object (Location)},"placeId": string,"address": string,"navigationPointToken": 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。
[[["易于理解","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-03-05。"],[],["Waypoints, marking route start, end, and intermediate stops, are defined using a JSON format. Key properties include `via` (boolean) for non-stopping waypoints, `vehicleStopover` (boolean) for pickup/drop-off locations, and `sideOfRoad` (boolean) for preferred stopping side. A waypoint's `location_type` can be specified via geographic coordinates (`location`), a place ID (`placeId`), or a human-readable address (`address`). `via` cannot be true for terminal waypoints or if `optimize_waypoint_order` is true.\n"]]