How to prepopulate Directions widget

79
1
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?

0 Kudos
1 Reply
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