It is possible to modify the parameters passed to the solve call within the Directions widget?

01-11-2022 10:29 AM
New Contributor


I want to add the possibility to users to get directions for searching with local grid system. Basically, when user types in a grid following a standard, the widget recognizes it, determines the cendroid of it and sets the X,Y coordinates for the origin and the destination.

To do so, Ive been modifiyng the code in the Directions widget.

I'm able to get user values from the DOM using esri_dijit_Search_1_input and esri_dijit_Search_2_input, query a service, make some calculations and get the X, Y coordinates of the origin and the destination. I've added this code in the _onDirectionsStart function.

Now the challenge is to pass these coordinates to the solve call. It look likes the solve call is not exposed in the Direction class documentations: getDirections() call to the directionsDijit

I know I can define parameters using the routeParameters task which the Directions dijit references but this routeParameters doesn't have any methods which would make this call itself.

It should be in the this._dijitDirections object but I can't find the exact method to use and this seems to be undocumented

Hope someone else in the community has ever tried to achieve that.

web appbuilder version: 2.16

0 Kudos
0 Replies