Select to view content in your preferred language

Directions widget crash on reset() or removeStops()

623
1
08-24-2017 10:49 AM
RubenBueno
New Contributor

I've ran into an issue when managing stops through javascript, where removing all stops by either using reset() or removeStops results in an error that renders the widget unusable and leaves orphaned layers on the map:

here's the codepen with an array of stops to try it:

https://codepen.io/rbuenon/pen/MvBoba 

As the screenshot shows, you can add the stops with 'dirs.addStops(stops)' and after it calculates the route, try removing all stops with 'dirs.removeStops()' or 'dirs.reset()'.

the error doesn't always happen on the first try.

Things I've tried:

- Add the stops as Points

- Add the stops as all Stops (no waypoints)

- Add the stops as Graphics

- Add the stops as an object with a graphic feature

- Add all stops, then all waypoints

Any pointers on how to solve this or work around it? 

Thanks in advance.

0 Kudos
1 Reply
DmitryKudinov
Regular Contributor

Ruben,

Thank you for reporting this issue. It has be reproduced and will be addressed in 3.22.

Regards,

Dmitry

0 Kudos