खास जानकारी
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
Maps JavaScript API की Routes Library में Route
और RouteMatrix
क्लास शामिल हैं. ये लेगसी DirectionsService
और DistanceMatrixService
ऑब्जेक्ट की जगह इस्तेमाल की जाती हैं.
Route
क्लास
Route
क्लास, computeRoutes()
मेथड उपलब्ध कराती है. यह मेथड, दो जगहों के बीच का सबसे सही रास्ता दिखाता है. अलग-अलग जगहों पर बस, मेट्रो वगैरह से, साइकल से, कार से, दो पहियों वाले मोटर वाहन से या पैदल जाने के लिए, रीयल-टाइम ट्रैफ़िक के साथ रास्ते की जानकारी पाने की सुविधा दें.
RouteMatrix
क्लास
RouteMatrix
क्लास, यात्रा शुरू करने की अलग-अलग जगहों और मंज़िलों के बीच के रास्तों की मैट्रिक्स के लिए, दूरी और यात्रा में लगने वाला समय दिखाता है. अलग-अलग मंज़िलों तक की यात्रा में लगने वाले समय और दूरी कैलकुलेट करें. एक बार में ज़्यादा से ज़्यादा 625 रूट एलिमेंट के लिए कैलकुलेशन किया जा सकता है.
अगले चरण
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 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)"]]