نمای کلی کلاس Route Matrix
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
مقدمه
کلاس RouteMatrix
مسافت ها و زمان سفر را برای ماتریسی از مسیرها بین مکان های مبدا و مقصد مختلف برمی گرداند. محاسبه زمان سفر و مسافت برای چندین مقصد تا 625 عنصر مسیر.
آیا به مسیرهای رانندگی نیاز دارید؟ اگر به مسیرهای مسیر علاقه دارید، از کلاس Route استفاده کنید.
مهاجرت؟ اگر از سرویس Distance Matrix (Legacy) به کلاس RouteMatrix
مهاجرت می کنید، مهاجرت به کلاس Route Matrix را ببینید.
چرا از کلاس RouteMatrix
استفاده کنیم؟
با کلاس RouteMatrix
میتوانید کارآمدترین مسیرها را برای زمانبندی اعزام تعیین کنید، مانند:
- چگونه می توان مجموعه ای از کارگران را برای برداشتن یک سری بسته ها اختصاص داد
- بهترین انباری را که می توان بسته ها را از آنجا به مقصد نهایی ارسال کرد، تعیین کنید
با کلاس RouteMatrix
چه کاری می توانید انجام دهید؟
با کلاس RouteMatrix
، می توانید ماتریسی از مسیرهای ممکن بین بسیاری از مکان های شروع و پایان دریافت کنید. شما می توانید چندین مبدا و مقصد را برای هر درخواست سمت سرور با تعداد مبدا ضربدر تعداد مقصد تا 625 مشخص کنید.
میتوانید این نوع دادههای مسیر را برای تعیین کارآمدترین راه برای مسیریابی مسافران، محمولهها یا کارگران بین مبدا و مقصد مختلف درخواست کنید:
- فاصله بر حسب کیلومتر یا مایل برای یک حالت سفر انتخابی
- زمان تخمینی سفر در ترافیک
مراحل بعدی
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-08-26 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-08-26 بهوقت ساعت هماهنگ جهانی."],[],[],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)"]]