Genel bakış
Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
Maps JavaScript API'deki Rotalar Kitaplığı, eski DirectionsService
ve DistanceMatrixService
nesnelerinin yerini alan Route
ve RouteMatrix
sınıflarını içerir.
Route
sınıf
Route
sınıfı, iki konum arasındaki ideal rotayı döndüren computeRoutes()
yöntemini sağlar. Birden çok konum arasında toplu taşımayla, bisikletle, arabayla, 2 tekerlekli motorlu araçla veya yaya olarak gitmek için gerçek zamanlı trafik bilgilerini içeren yol tarifleri sağlayın.
RouteMatrix
sınıf
RouteMatrix
sınıfı, farklı başlangıç ve hedef konumlar arasındaki bir rota matrisi için mesafeleri ve seyahat sürelerini döndürür. 625'e kadar rota öğesi içeren birden fazla hedef için seyahat sürelerini ve mesafeleri hesaplayın.
Sonraki adımlar
Aksi belirtilmediği sürece bu sayfanın içeriği Creative Commons Atıf 4.0 Lisansı altında ve kod örnekleri Apache 2.0 Lisansı altında lisanslanmıştır. Ayrıntılı bilgi için Google Developers Site Politikaları'na göz atın. Java, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2025-08-27 UTC.
[null,null,["Son güncelleme tarihi: 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)"]]