Routes API
ממשק API של path.googleapis.com.
שירות: routes.googleapis.com
כדי לקרוא לשירות הזה, מומלץ להשתמש בספריות הלקוח ש-Google מספקת. אם האפליקציה שלכם צריכה להשתמש בספריות משלכם כדי לקרוא לשירות הזה, השתמשו במידע הבא כשתשלחו את בקשות ה-API.
מסמך הגילוי
מסמך Discovery הוא מפרט קריא למחשבים לתיאור ולשימוש בממשקי API ל-REST. הוא משמש לבניית ספריות לקוח, יישומי פלאגין בסביבת פיתוח משולבת (IDE) וכלים אחרים שיוצרים אינטראקציה עם Google APIs. שירות אחד יכול לספק כמה מסמכי גילוי. השירות הזה מספק את מסמך הגילוי הבא:
נקודת קצה בשירות
נקודת קצה של שירות היא כתובת URL בסיסית שמציינת את כתובת הרשת של שירות API. לשירות אחד יכולות להיות כמה נקודות קצה (endpoints) של שירות. לשירות הזה יש את נקודת הקצה הבאה של השירות, וכל מזהי ה-URI הבאים הם יחסיים לנקודת הקצה של השירות:
https://routes.googleapis.com
משאב REST: v2
שיטות |
computeRouteMatrix |
POST /distanceMatrix/v2:computeRouteMatrix
הפונקציה הזו לוקחת רשימה של נקודות מוצא ויעדים ומחזירה זרם שמכיל מידע על המסלול לכל שילוב של מוצא ויעד. |
computeRoutes |
POST /directions/v2:computeRoutes
מחזירה את המסלול הראשי יחד עם מסלולים חלופיים אופציונליים, בהינתן קבוצה של ציוני דרך סופיים ונקודות ביניים. |
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-04-29 (שעון UTC).
[null,null,["עדכון אחרון: 2025-04-29 (שעון UTC)."],[[["The Routes API provides access to functionalities for calculating distances and routes using the Google Maps platform."],["Developers can interact with the API using Google-provided client libraries or by directly making RESTful API requests."],["Two core methods offered are `computeRouteMatrix` for calculating distances between multiple origins and destinations, and `computeRoutes` for generating detailed route information."],["The API utilizes a RESTful architecture and documentation is available through a discovery document."],["The service endpoint for the Routes API is `https://routes.googleapis.com`."]]],["The routes.googleapis.com API offers two primary methods: `computeRouteMatrix` and `computeRoutes`. `computeRouteMatrix` takes a list of origins and destinations, outputting route data for each combination. `computeRoutes` calculates the primary route and optional alternatives between specified waypoints. The service endpoint is `https://routes.googleapis.com`, and a discovery document is available at `https://routes.googleapis.com/$discovery/rest?version=v2` to facilitate building client tools. Google-provided client libraries are recommended.\n"]]