RoutingSummary
משך הזמן והמרחק מנקודת המוצא של הניתוב למקום בתגובה, וחלק שני מהמקום הזה ליעד, אם הבקשה הזו נשלחה. הערה: הוספת routingSummaries
במסכת השדה בלי לכלול גם את הפרמטר routingParameters.origin
או את הפרמטר searchAlongRouteParameters.polyline.encodedPolyline
בבקשה גורמת לשגיאה.
ייצוג ב-JSON |
{
"legs": [
{
object (Leg )
}
],
"directionsUri": string
} |
שדות |
legs[] |
object (Leg )
השלבים של הנסיעה. כשמחשבים את משך הנסיעה ואת המרחק מנקודת מוצא מוגדרת, legs מכיל מקטע אחד שמכיל את משך הנסיעה ואת המרחק מנקודת המוצא ליעד. כשמבצעים חיפוש לאורך מסלול, השדה legs מכיל שתי קטעים: אחד מהמוצא למקום, והשני מהמקום ליעד.
|
directionsUri |
string
קישור להצגת מסלול הגעה במפות Google באמצעות נקודות העצירה מסיכום המסלול. אין ערובה שהמסלול שנוצר באמצעות הקישור הזה יהיה זהה למסלול ששימש ליצירת סיכום הניתוב. הקישור משתמש במידע שסופק בבקשה, משדות כמו routingParameters ו-searchAlongRouteParameters במקרים הרלוונטיים, כדי ליצור את הקישור לקבלת מסלול הגעה.
|
רגל
שלב הוא קטע יחיד במסע ממיקום אחד למיקום אחר.
ייצוג ב-JSON |
{
"duration": string,
"distanceMeters": integer
} |
שדות |
duration |
string (Duration format)
משך הזמן שנדרש כדי להשלים את הקטע הזה בנסיעה. משך הזמן בשניות, עם עד תשע ספרות עשרוניות, שמסתיימים ב-'s '. דוגמה: "3.5s" .
|
distanceMeters |
integer
המרחק של מקטע הנסיעה הזה.
|
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-02-27 (שעון UTC).
[null,null,["עדכון אחרון: 2025-02-27 (שעון UTC)."],[[["Routing 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."],["It includes a directions URI for viewing the route on Google Maps."],["A Leg within the Routing Summary represents a portion of the journey, containing duration and distance in meters."],["When searching along a route, the `legs` field will contain two legs: one from the origin to the place and another from the place to the destination."]]],["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"]]