Is there a way to add stops programatically to the latest Directions widget, or must I use the widget GUI? (I see that it is still 'beta')

Version 3 of the JS API has this function: Version 3 add stops


The Directions Widget is still in a beta state, so probably some methods are still not available (visible).

You can find a stops property in the DirectionsViewModel, which provides the communication and data manipulation logic for the Directions widget.

var directions = new Directions({
  viewModel: { // autocasts as new DirectionsViewModel
    stops: //attribute name used to specify stops

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.