Select to view content in your preferred language

How to use the built in widgets like Directions in AMD Dojo (ArcGIS Api 4.27)

292
2
3 weeks ago
MirzaMuhammadAhsanAli
Occasional Contributor

I am migrating the 3.x application into 4.27, there is directions widget imported as "esri/dijit/Directions", how can i import it in dojo AMD with api 4.27. there is widget.html and widget.js files. In 4.x there is only ESM import is available in the documentation, how can i import this in dojo - AMD like i had imported in 3.x.

@Sage_Wall , @TimWestern , Could you please help me here.

I found this ( esri/widget/Directions),  and its working, where I can find the documentation for this.

Thank You!

0 Kudos
2 Replies
JoelBennett
MVP Regular Contributor

The 4.27 AMD implementation is esri/widgets/Directions; the 4.33 documentation is here, and although doesn't mention the AMD syntax, AMD is supported in 4.27 and should still be largely (if not completely) the same (that is, the properties and methods documented in 4.33 probably haven't changed much since 4.27).

Noah-Sager
Esri Regular Contributor

Hi @MirzaMuhammadAhsanAli, thanks for posting your question here.

Here is the 4.27 Directions widget sample for inspiration: https://codepen.io/noash/pen/vENWBvM?editors=1000

And here you can download the 4.27 version of the documentation (or other versions): https://developers.arcgis.com/javascript/latest/downloads/

 

0 Kudos