RoutingSummary
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
जवाब में, यात्रा शुरू करने की जगह से किसी जगह तक पहुंचने में लगने वाला समय और दूरी. साथ ही, अगर अनुरोध किया गया है, तो उस जगह से डेस्टिनेशन तक पहुंचने में लगने वाला समय और दूरी. ध्यान दें: अनुरोध में routingParameters.origin
पैरामीटर या searchAlongRouteParameters.polyline.encodedPolyline
पैरामीटर को शामिल किए बिना, फ़ील्ड मास्क में routingSummaries
जोड़ने पर गड़बड़ी होती है.
JSON के काेड में दिखाना |
{
"legs": [
{
object (Leg )
}
],
"directionsUri": string
} |
फ़ील्ड |
legs[] |
object (Leg )
यात्रा के चरण. यात्रा की शुरुआत की जगह से यात्रा में लगने वाले समय और दूरी का हिसाब लगाने पर, legs में एक लेग होता है. इसमें, यात्रा की शुरुआत की जगह से डेस्टिनेशन तक की दूरी और यात्रा में लगने वाला समय शामिल होता है. रास्ते के साथ-साथ खोज करने पर, legs में दो लेग होते हैं: पहला, ऑरिजिन से जगह तक और दूसरा, जगह से डेस्टिनेशन तक.
|
directionsUri |
string
रास्ते की खास जानकारी में दिए गए वे रास्ते दिखाने के लिए लिंक, जिन पर क्लिक करके Google Maps पर निर्देश देखे जा सकते हैं. इस लिंक से जनरेट किया गया रास्ता, राउटिंग की खास जानकारी जनरेट करने के लिए इस्तेमाल किए गए रास्ते से मेल नहीं खा सकता. यह लिंक, अनुरोध में दी गई जानकारी का इस्तेमाल करता है. इसमें, routingParameters और searchAlongRouteParameters जैसे फ़ील्ड से मिली जानकारी भी शामिल होती है. यह जानकारी, निर्देशों का लिंक जनरेट करने के लिए इस्तेमाल की जाती है.
|
पैर
लेग, एक जगह से दूसरी जगह की यात्रा का एक हिस्सा होता है.
JSON के काेड में दिखाना |
{
"duration": string,
"distanceMeters": integer
} |
फ़ील्ड |
duration |
string (Duration format)
यात्रा के इस हिस्से को पूरा करने में लगने वाला समय. सेकंड में कुल अवधि, जिसमें दशमलव के बाद नौ अंक हो सकते हैं. यह अवधि 's ' पर खत्म होती है. उदाहरण: "3.5s" .
|
distanceMeters |
integer
यात्रा के इस हिस्से की दूरी.
|
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-08-31 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-08-31 (UTC) को अपडेट किया गया."],[[["\u003cp\u003eRouting Summary provides the duration and distance between an origin and a destination, or between an origin, a place, and a destination when searching along a route.\u003c/p\u003e\n"],["\u003cp\u003eIt includes a directions URI for viewing the route on Google Maps.\u003c/p\u003e\n"],["\u003cp\u003eA Leg within the Routing Summary represents a portion of the journey, containing duration and distance in meters.\u003c/p\u003e\n"],["\u003cp\u003eWhen searching along a route, the \u003ccode\u003elegs\u003c/code\u003e field will contain two legs: one from the origin to the place and another from the place to the destination.\u003c/p\u003e\n"]]],["The content details routing summary data, including journey legs and a directions link. A routing summary contains \"legs,\" with each leg representing a portion of a journey. Each `leg` provides `duration` (time to complete the leg) and `distanceMeters`. The `directionsUri` field provides a Google Maps link for directions. When searching along a route, the summary includes two legs, otherwise it only includes one. Including `routingSummaries` in a request requires including an `origin` or `encodedPolyline` parameter.\n"],null,["# RoutingSummary\n\n- [JSON representation](#SCHEMA_REPRESENTATION)\n- [Leg](#Leg)\n - [JSON representation](#Leg.SCHEMA_REPRESENTATION)\n\nThe duration and distance from the routing origin to a place in the response, and a second leg from that place to the destination, if requested. **Note:** Adding `routingSummaries` in the field mask without also including either the `routingParameters.origin` parameter or the `searchAlongRouteParameters.polyline.encodedPolyline` parameter in the request causes an error.\n\n| JSON representation |\n|-------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"legs\": [ { object (/maps/documentation/places/web-service/reference/rest/v1/RoutingSummary#Leg) } ], \"directionsUri\": string } ``` |\n\n| Fields ||\n|-----------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `legs[]` | `object (`[Leg](/maps/documentation/places/web-service/reference/rest/v1/RoutingSummary#Leg)`)` The legs of the trip. When you calculate travel duration and distance from a set origin, `legs` contains a single leg containing the duration and distance from the origin to the destination. When you do a search along route, `legs` contains two legs: one from the origin to place, and one from the place to the destination. |\n| `directionsUri` | `string` A link to show directions on Google Maps using the waypoints from the given routing summary. The route generated by this link is not guaranteed to be the same as the route used to generate the routing summary. The link uses information provided in the request, from fields including `routingParameters` and `searchAlongRouteParameters` when applicable, to generate the directions link. |\n\nLeg\n---\n\nA leg is a single portion of a journey from one location to another.\n\n| JSON representation |\n|-----------------------------------------------------------|\n| ``` { \"duration\": string, \"distanceMeters\": integer } ``` |\n\n| Fields ||\n|------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `duration` | `string (`[Duration](https://protobuf.dev/reference/protobuf/google.protobuf/#duration)` format)` The time it takes to complete this leg of the trip. A duration in seconds with up to nine fractional digits, ending with '`s`'. Example: `\"3.5s\"`. |\n| `distanceMeters` | `integer` The distance of this leg of the trip. |"]]