reviewsהשקת Places UI Kit: ספריית רכיבים מוכנה לשימוש בעלות נמוכה, שמאפשרת לכם להוסיף לכל מפה שתבחרו את ממשק המשתמש המוכר של 'מקומות' במפות Google. כדאי לנסות אותו ולשלוח לנו משוב כדי לעזור לנו לעצב את העתיד של GMP.
סקירה כללית של מחלקת Route Matrix
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
מבוא
המחלקות RouteMatrix
מחזירות מרחקים וזמני נסיעה למטריצה של מסלולים בין מיקומי מוצא ויעד שונים. חישוב זמני נסיעה ומרחקים לכמה יעדים, עד 625 רכיבי מסלול.
צריכים מסלולי נסיעה? אם אתם רוצים לקבל הוראות הגעה למסלול, אתם יכולים להשתמש בRoute class.
עוברים ל-Google Workspace? אם אתם מעבירים נתונים מהשירות Distance Matrix (מאגר נתונים מדור קודם) אל המחלקה RouteMatrix
, תוכלו לקרוא את המאמר העברה למחלקה Route Matrix.
למה כדאי להשתמש במחלקת RouteMatrix
?
בעזרת המחלקה RouteMatrix
אפשר לקבוע את המסלולים הכי יעילים לתזמון של שיגור, למשל:
- איך הכי טוב להקצות קבוצת עובדים לאיסוף של סדרת חבילות
- קביעת המחסן הטוב ביותר שממנו כדאי לשלוח חבילות ליעד הסופי שלהן
מה אפשר לעשות בכיתה 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\nIntroduction\n\nThe `RouteMatrix` class returns distances and travel times for a matrix\nof routes between different origin and destination locations. Calculate travel times and\ndistances for multiple destinations for up to 625 route elements.\n\n**Need Driving Routes?** If you are interested in route directions, use the\n[Route class](/maps/documentation/javascript/routes/route-class-overview).\n\n**Migrating?** If you are migrating from the Distance Matrix Service (Legacy)\nto the `RouteMatrix` class, see\n[Migrate to the Route Matrix class](/maps/documentation/javascript/routes/route-matrix-js-migration).\n\nWhy use the `RouteMatrix` class?\n\nWith the `RouteMatrix` class, you can determine the most efficient routes for dispatch\nscheduling, such as:\n\n- How best to assign a set of workers to pick up a series of packages\n- Determine the best warehouse from which to ship packages to their final destination\n\nWhat can you do with the `RouteMatrix` class?\n\nWith the `RouteMatrix` class, you can get a matrix of possible\nroutes between many start and end locations. You can specify multiple origins and\ndestinations per server-side request with the number of origins times the number of\ndestinations up to 625.\n\nYou can request these kinds of route data to determine the most efficient way to route\npassengers, shipments, or workers between multiple origins and destinations:\n\n- Distance in kilometers or miles for a selected travel mode\n- Estimated travel time in traffic\n\nNext steps\n\n- [Get started](/maps/documentation/javascript/routes/start)\n- [Get a route matrix](/maps/documentation/routes/get-route-matrix)"]]