<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Directions widget crash on reset() or removeStops() in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/directions-widget-crash-on-reset-or-removestops/m-p/233120#M21753</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ruben,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for reporting this issue. It has be reproduced and will be addressed in 3.22.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Dmitry&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 30 Aug 2017 19:36:00 GMT</pubDate>
    <dc:creator>DmitryKudinov</dc:creator>
    <dc:date>2017-08-30T19:36:00Z</dc:date>
    <item>
      <title>Directions widget crash on reset() or removeStops()</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/directions-widget-crash-on-reset-or-removestops/m-p/233119#M21752</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;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:&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/368440_pastedImage_2.png" style="width: 620px; height: 693px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here's the codepen with an array of stops to try it:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://codepen.io/rbuenon/pen/MvBoba" title="https://codepen.io/rbuenon/pen/MvBoba"&gt;https://codepen.io/rbuenon/pen/MvBoba&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As the screenshot shows, you can add the stops with '&lt;EM&gt;dirs.addStops(stops)'&lt;/EM&gt; and after it calculates the route, try removing all stops with&amp;nbsp;&lt;EM&gt;'dirs.removeStops()'&amp;nbsp;&lt;/EM&gt;or '&lt;EM&gt;dirs.reset()'.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;the error doesn't always happen on the first try.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Things I've tried:&lt;/P&gt;&lt;P&gt;- Add the stops as Points&lt;/P&gt;&lt;P&gt;- Add the stops as all Stops (no waypoints)&lt;/P&gt;&lt;P&gt;- Add the stops as Graphics&lt;/P&gt;&lt;P&gt;- Add the stops as an object with a graphic feature&lt;/P&gt;&lt;P&gt;- Add all stops, then all waypoints&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any pointers on how to solve this or work around it?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Aug 2017 17:49:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/directions-widget-crash-on-reset-or-removestops/m-p/233119#M21752</guid>
      <dc:creator>RubenBueno</dc:creator>
      <dc:date>2017-08-24T17:49:12Z</dc:date>
    </item>
    <item>
      <title>Re: Directions widget crash on reset() or removeStops()</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/directions-widget-crash-on-reset-or-removestops/m-p/233120#M21753</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ruben,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for reporting this issue. It has be reproduced and will be addressed in 3.22.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Dmitry&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Aug 2017 19:36:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/directions-widget-crash-on-reset-or-removestops/m-p/233120#M21753</guid>
      <dc:creator>DmitryKudinov</dc:creator>
      <dc:date>2017-08-30T19:36:00Z</dc:date>
    </item>
  </channel>
</rss>

