Hello, I have a question regarding directions widget. When I have multiple stops, is there a servise or a function I can create or call that can give me the optimized/best route to visit all the stops?
Hi @ErsiLover, thanks for posting your question here. Unfortunately, the Directions widget cannot reorder stops for you. However, we do have optimized routing available. Here is a link to the doc, and to an older, working proof-of-concept example.
https://developers.arcgis.com/documentation/mapping-apis-and-services/routing/optimized-routing/
https://noashx.github.io/presentations/DS_2022/5_ArcGIS_API_for_JavaScript_Vehicle_routing_problem.html
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.