AnsweredAssumed Answered

Directions widget "getDirections()" method does not route

Question asked by shoe788 on Mar 21, 2014
Latest reply on Mar 24, 2014 by shoe788
When my map loads I want to have the route automatically calculated and displayed without clicking the "Get Directions" button.

on is lists the method getDirections() that says will automatically route and display the inputs.
directions = new Directions({                     map: map,                     stops: ["Knoxville ", "Chattanouga"], },"directionsDiv"); directions.startup(); directions.getDirections();

I load the inputs using "stops" parameter and call getDirections() but it does not display or route anything and instead gives me "Enter an origin and a destination." despite both inputs being correctly filled. If I click the button with the same inputs it will give me the correct route.