How to prepopulate Directions widget

151
2
12-02-2021 06:01 AM
RussellMGreen
New Contributor

I have two lat/lng coordinates that I want to pre-populate the Directions widget with. How can I do this? I've tried programmatically setting the stop's input values and dispatching change events, but it doesn't work. Any suggestions?

2 Replies
Noah-Sager
Esri Regular Contributor

Hi @RussellMGreen. This is a great question. Unfortunately, this is not currently possible. However, we do have this on our Directions widget roadmap for a future release.

You could also consider using route for this use case: https://developers.arcgis.com/javascript/latest/sample-code/route/

 

0 Kudos
lawsonkendall
New Contributor II

I am very happy to hear that this is on your roadmap.  This seems like an essential capability.  This appears to be present in the 3.39 JavaScript version of the Directions widget:  https://developers.arcgis.com/javascript/3/jsapi/directions-amd.html. Unfortunately we cannot use that version in our Angular 2 application.

 

Any idea of a timeframe when this capability might be delivered?

0 Kudos