Directions Widget - Travel Modes

2380
2
Jump to solution
09-22-2016 02:44 PM
TonyZhang1
New Contributor II

Problem:

In ArcGIS Web Appbuilder Developer Edition, the Travel Modes options within the Directions widget does not show up when using a custom network analysis service. However the same Directions widget in ArcGIS Portal do not have this problem

Background:

Initially I was creating a web map using Web Appbuilder in Portal. The web map used the Directions widget on a custom Network Analysis Service that contains different travel mode options. In Web Appbuilder for Portal everything works fine. I only had to put in the Network Analysis Service link in the Route URL box while leaving the Travel Modes URL blank, and the Travel Mode options automatically appear on the Directions widget.

Directions Widget with travel modes.

In Web Appbuilder Developer Edition, I chose Import -> Import from my account to load up the same web map I was working on in Portal. But in this case the Travel Modes options do not show up on the Directions widget, despite making no changes to the web map or widget settings. What's causing the Travel Modes to disappear? Are the Developer Edition widgets a different version from Portal? Any help is appreciated.

Same options, but Travel Mode box doesn't show up.

0 Kudos
1 Solution

Accepted Solutions
TonyZhang1
New Contributor II

I contacted Esri support and came up with this solution to the missing Travel Modes for the Direction Widget in Developer Edition when using a custom network analysis service.

- Find the folder of the Directions widget on the server, it should be under <WAB Install Folder>\server\apps\<App ID>\widgets\Directions
- Make a copy of widget.js for backup.
- Open widget.js, and find the line (should be 181) that says: options.doNotFetchTravelModesFromOwningSystem = true;
- Switch the value to false
- Reload the app, now you should see the travel modes.
This is based on this forum thread.

View solution in original post

2 Replies
TonyZhang1
New Contributor II

I contacted Esri support and came up with this solution to the missing Travel Modes for the Direction Widget in Developer Edition when using a custom network analysis service.

- Find the folder of the Directions widget on the server, it should be under <WAB Install Folder>\server\apps\<App ID>\widgets\Directions
- Make a copy of widget.js for backup.
- Open widget.js, and find the line (should be 181) that says: options.doNotFetchTravelModesFromOwningSystem = true;
- Switch the value to false
- Reload the app, now you should see the travel modes.
This is based on this forum thread.

Suedietrich
New Contributor III

Hi, How can I add bicycling distance and time to the directions widget?

Thanks!