Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
Les points de cheminement intermédiaires sont les points de cheminement non terminaux qui constituent un itinéraire. Vous les configurez à l'aide du champ de requête intermediates. Par défaut, les points de repère intermédiaires sont utilisés pour les arrêts de ramassage et de dépôt, mais vous pouvez spécifier qu'un point de repère intermédiaire est uniquement destiné à passer.
Configurer un point de cheminement de transfert
Vous pouvez configurer un point de cheminement intermédiaire en tant que point de cheminement de transit en définissant le champ via.
Exemple
L'exemple suivant montre comment marquer un point de cheminement intermédiaire comme point de cheminement de transit.
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2024/11/23 (UTC).
[null,null,["Dernière mise à jour le 2024/11/23 (UTC)."],[[["\u003cp\u003eIntermediate waypoints are used for pick-up/drop-off by default, but can be configured as pass-through points using the \u003ccode\u003eintermediates\u003c/code\u003e request field.\u003c/p\u003e\n"],["\u003cp\u003eA pass-through waypoint is set by defining the \u003ccode\u003evia\u003c/code\u003e field as \u003ccode\u003etrue\u003c/code\u003e within the waypoint's configuration.\u003c/p\u003e\n"],["\u003cp\u003eRoutes containing an origin, pass-through waypoint, and destination will only have one leg, connecting the origin and destination while passing through the intermediate point.\u003c/p\u003e\n"]]],["Intermediate waypoints are configurable route points using the `intermediates` field. They can be designated as stops for pickup/drop-off or as pass-through points. To configure a pass-through waypoint, set the `via` field to `true`. A route with a pass-through waypoint includes only one route leg connecting the origin to the destination. The `location` field is required with the lat/lng values for the waypoint.\n"],null,["# Use Intermediate Waypoints\n\nIntermediate waypoints are the non-terminal waypoints that make up a route. You\nconfigure them using the `intermediates` request field. By default, intermediate\nwaypoints are used for stopping to pickup and drop-off, but you can specify that\nan intermediate waypoint is meant just for passing through.\n| **Note:** A route that contains an origin waypoint, a pass-through intermediate waypoint, and a destination waypoint, will contain just one route leg---that connects the origin and the destination, while passing through the intermediate via waypoint.\n\nConfiguring a pass-through waypoint\n-----------------------------------\n\nYou can configure an intermediate waypoint to be a pass-through waypoint by\nsetting the\n[`via`](/maps/documentation/routes_preferred/reference/rest/v1alpha/TopLevel/computeRoutes#Waypoint.FIELDS.via)\nfield.\n\nExample\n-------\n\nThe following example demonstrates how to mark an intermediate waypoint as a\npass-through waypoint. \n\n```cplint\n{\n \"via\": true,\n \"location\": {\n \"latLng\": {\n \"latitude\":37.419734,\n \"longitude\":-122.0827784\n }\n }\n}\n```"]]