reviewsהשקת Places UI Kit: ספריית רכיבים מוכנה לשימוש בעלות נמוכה, שמאפשרת לכם להוסיף לכל מפה שתבחרו את ממשק המשתמש המוכר של 'מקומות' במפות Google. כדאי לנסות אותו ולשלוח לנו משוב כדי לעזור לנו לעצב את העתיד של GMP.
סקירה כללית
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
ספריית המסלולים, Maps JavaScript API כוללת את המחלקות Route
ו-RouteMatrix
, שמחליפות את האובייקטים הקודמים DirectionsService
ו-DistanceMatrixService
.
Route
כיתה
המחלקות Route
מספקות את השיטה computeRoutes()
, שמחזירה את המסלול האידיאלי בין שני מיקומים. הצגת מסלולים עם נתוני תנועה בזמן אמת לתחבורה ציבורית, לרכיבה על אופניים, לנהיגה, לכלי רכב דו-גלגליים ממונעים או להליכה בין כמה מיקומים.
RouteMatrix
כיתה
המחלקות RouteMatrix
מחזירות מרחקים וזמני נסיעה למטריצה של מסלולים בין מיקומי מוצא ויעד שונים. חישוב זמני נסיעה ומרחקים לכמה יעדים, עד 625 רכיבי מסלול.
השלבים הבאים
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-08-27 (שעון UTC).
[null,null,["עדכון אחרון: 2025-08-27 (שעון UTC)."],[],[],null,["**European Economic Area (EEA) developers** If your billing address is in the European Economic Area, effective on 8 July 2025, the [Google Maps Platform EEA Terms of Service](https://cloud.google.com/terms/maps-platform/eea) will apply to your use of the Services. Functionality varies by region. [Learn more](/maps/comms/eea/faq).\n\nThe Routes Library, Maps JavaScript API includes the `Route` and `RouteMatrix`\nclasses, which replace the legacy `DirectionsService` and `DistanceMatrixService`\nobjects.\n\n`Route` class\n\nThe `Route` class provides the `computeRoutes()` method, which returns\nthe ideal route between two locations. Provide directions with real-time traffic for transit,\nbiking, driving, 2-wheel motorized vehicles, or walking between multiple locations.\n\n- [Route class overview](/maps/documentation/javascript/routes/route-class-overview)\n- [Migrate to the new `Route` class](/maps/documentation/javascript/routes/routes-js-migration)\n- [Try the Routes library demo](/maps/documentation/javascript/routes/demo)\n\n`RouteMatrix` class\n\nThe `RouteMatrix` class returns distances and travel times for a matrix of routes\nbetween different origin and destination locations. Calculate travel times and distances for\nmultiple destinations for up to 625 route elements.\n\n- [Route matrix class overview](/maps/documentation/javascript/routes/route-matrix-class-overview)\n- [Migrate to the new `RouteMatrix` class](/maps/documentation/javascript/routes/route-matrix-js-migration)\n\nNext steps\n\n- [Get started](/maps/documentation/javascript/routes/start)"]]