<?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: Find a Route and how to clear route in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/find-a-route-and-how-to-clear-route/m-p/682626#M63562</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Worked perfect.&amp;nbsp; I had almost gotten it a few times !&amp;nbsp; Thanks !&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Feb 2014 12:48:14 GMT</pubDate>
    <dc:creator>GloriaForthun</dc:creator>
    <dc:date>2014-02-05T12:48:14Z</dc:date>
    <item>
      <title>Find a Route and how to clear route</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/find-a-route-and-how-to-clear-route/m-p/682623#M63559</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have used the Find a Route program and it works great.&amp;nbsp; But I want to have a clear button so that when you click on it the old stops and path are deleted.&amp;nbsp; I have used onclick = "map.graphics.clear();" and that does appear to remove the stops and path, however, after I clear the graphics, I click on a new stop and a path is drawn from the last stop from the "cleared" route to the new stop.&amp;nbsp; Apparently I am not clearing out (deleting) the last stop.&amp;nbsp; Can anyone tell me how to do this?&amp;nbsp; Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Feb 2014 13:34:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/find-a-route-and-how-to-clear-route/m-p/682623#M63559</guid>
      <dc:creator>GloriaForthun</dc:creator>
      <dc:date>2014-02-04T13:34:30Z</dc:date>
    </item>
    <item>
      <title>Re: Find a Route and how to clear route</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/find-a-route-and-how-to-clear-route/m-p/682624#M63560</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;hi Gloria.&amp;nbsp; welcome to our forum!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;im assuming you're talking about &lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/javascript/jssamples/routetask_find_route.html"&gt;this&lt;/A&gt;&lt;SPAN&gt; sample, correct?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;in addition to clearing the map.graphics, you also need to make sure the stops which were previously added to your RouteParameters objects are removed as well.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;routeParams.stops.features = [];&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;i first tried setting &lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/javascript/jsapi/routeparameters-amd.html#stops"&gt;routeParams.stops&lt;/A&gt;&lt;SPAN&gt; and routeParams.stops.features to 'null', but afterward, no additional route requests went out. this seemed a little counterintuitive at first, but the problem with that is that you've unset the object associated with that property completely.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Feb 2014 17:05:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/find-a-route-and-how-to-clear-route/m-p/682624#M63560</guid>
      <dc:creator>JohnGravois</dc:creator>
      <dc:date>2014-02-04T17:05:57Z</dc:date>
    </item>
    <item>
      <title>Re: Find a Route and how to clear route</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/find-a-route-and-how-to-clear-route/m-p/682625#M63561</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;just a reminder, the routing and geocoding services on tasks.arcgisonline.com will be retired any day now.&amp;nbsp; you can use &lt;/SPAN&gt;&lt;A href="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Network/USA/NAServer"&gt;sampleserver3&lt;/A&gt;&lt;SPAN&gt; (for prototyping only), but i would highly recommend migrating all code to utilize our new subscription &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Route_service/02r300000036000000/"&gt;route&lt;/A&gt;&lt;SPAN&gt; services if you aren't interested in maintaining your own service.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;here is a link to a &lt;/SPAN&gt;&lt;A href="http://jsfiddle.net/jagravois/9bZn4/"&gt;fiddle&lt;/A&gt;&lt;SPAN&gt; of the same sample converted to AMD and using route.arcgis.com.&amp;nbsp; it could be run with a proxy like our &lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/javascript/jssamples/widget_directions_basic.html"&gt;Directions&lt;/A&gt;&lt;SPAN&gt; widget sample if you don't want end users to provide the authentication, but from jsfiddle, its necessary to sign in with ArcGIS Organizational credentials to solve the route.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Feb 2014 17:13:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/find-a-route-and-how-to-clear-route/m-p/682625#M63561</guid>
      <dc:creator>JohnGravois</dc:creator>
      <dc:date>2014-02-04T17:13:40Z</dc:date>
    </item>
    <item>
      <title>Re: Find a Route and how to clear route</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/find-a-route-and-how-to-clear-route/m-p/682626#M63562</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Worked perfect.&amp;nbsp; I had almost gotten it a few times !&amp;nbsp; Thanks !&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Feb 2014 12:48:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/find-a-route-and-how-to-clear-route/m-p/682626#M63562</guid>
      <dc:creator>GloriaForthun</dc:creator>
      <dc:date>2014-02-05T12:48:14Z</dc:date>
    </item>
    <item>
      <title>Re: Find a Route and how to clear route</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/find-a-route-and-how-to-clear-route/m-p/682627#M63563</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;glad to hear you're sorted out.&amp;nbsp; please consider marking this thread as 'answered'.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Feb 2014 14:57:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/find-a-route-and-how-to-clear-route/m-p/682627#M63563</guid>
      <dc:creator>JohnGravois</dc:creator>
      <dc:date>2014-02-05T14:57:08Z</dc:date>
    </item>
  </channel>
</rss>

