<?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: add stops programmatically Directions Widget 4.8 in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-stops-programmatically-directions-widget-4-8/m-p/749904#M69367</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I know, but when deleted and added again the widget won't make a new query with the same results.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Aug 2018 17:10:08 GMT</pubDate>
    <dc:creator>juanDavid</dc:creator>
    <dc:date>2018-08-16T17:10:08Z</dc:date>
    <item>
      <title>add stops programmatically Directions Widget 4.8</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-stops-programmatically-directions-widget-4-8/m-p/749902#M69365</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there a way to actually to that in its current state?&lt;/P&gt;&lt;P&gt;Add some stops and then query the route.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Aug 2018 16:54:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-stops-programmatically-directions-widget-4-8/m-p/749902#M69365</guid>
      <dc:creator>juanDavid</dc:creator>
      <dc:date>2018-08-16T16:54:30Z</dc:date>
    </item>
    <item>
      <title>Re: add stops programmatically Directions Widget 4.8</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-stops-programmatically-directions-widget-4-8/m-p/749903#M69366</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Juan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;The widgets stops collection property is part of the viewModel:&lt;/P&gt;&lt;P&gt;&lt;A class="link-bare" href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Directions-DirectionsViewModel.html#stops" title="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Directions-DirectionsViewModel.html#stops"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Directions-DirectionsViewModel.html#stops&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Aug 2018 17:05:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-stops-programmatically-directions-widget-4-8/m-p/749903#M69366</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2018-08-16T17:05:54Z</dc:date>
    </item>
    <item>
      <title>Re: add stops programmatically Directions Widget 4.8</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-stops-programmatically-directions-widget-4-8/m-p/749904#M69367</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I know, but when deleted and added again the widget won't make a new query with the same results.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Aug 2018 17:10:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-stops-programmatically-directions-widget-4-8/m-p/749904#M69367</guid>
      <dc:creator>juanDavid</dc:creator>
      <dc:date>2018-08-16T17:10:08Z</dc:date>
    </item>
    <item>
      <title>Re: add stops programmatically Directions Widget 4.8</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-stops-programmatically-directions-widget-4-8/m-p/749905#M69368</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We are working to add support for this in a future release. I don't currently have an ETA on when this functionality will be available.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Aug 2018 17:11:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-stops-programmatically-directions-widget-4-8/m-p/749905#M69368</guid>
      <dc:creator>KellyHutchins</dc:creator>
      <dc:date>2018-08-16T17:11:08Z</dc:date>
    </item>
    <item>
      <title>Re: add stops programmatically Directions Widget 4.8</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-stops-programmatically-directions-widget-4-8/m-p/749906#M69369</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am also looking for a 'proper' way to&amp;nbsp;programmatically add stops to the directions widget.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am successful at adding the geometries to the ViewModel, and can route successfully, however this leaves the widget in a semi-broken state, as the search inputs and the related Directions._stops &amp;amp;&amp;amp; Directions._stopsToSearches properties do not get populated, so if I change one of the stops manually in the widget (like changing the start location), ALL the &lt;SPAN&gt;programmatically&amp;nbsp;&lt;/SPAN&gt;entered stops get removed and only the manually entered stop is present.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for now, I am hooking into the 'after render' event with dojo's aspect.after method, and manually setting the input text value and disabling the input so the user is unable to change stops, BUT this is not going to work for my customer in the long run.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have no problem manually performing all the steps to add the 'stop' objects to keep the ViewModel and Widget in sync, but trying to look through the minified code to determine what steps I actually need to take hasn't gotten me anywhere, as it is near impossible to tell what the parameter types are, or even the correct order to do things. Is there an engineer that can help with the required steps? Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Dec 2018 22:09:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-stops-programmatically-directions-widget-4-8/m-p/749906#M69369</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2018-12-07T22:09:30Z</dc:date>
    </item>
    <item>
      <title>Re: add stops programmatically Directions Widget 4.8</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-stops-programmatically-directions-widget-4-8/m-p/749907#M69370</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Has there been any update on this? I'd like to use all of the nifty UI/UX interactions that come with the built-in widget, but without requiring manual input of start/end stops.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would very much appreciate an update.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 May 2019 21:47:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-stops-programmatically-directions-widget-4-8/m-p/749907#M69370</guid>
      <dc:creator>ChrisGuirguis</dc:creator>
      <dc:date>2019-05-14T21:47:56Z</dc:date>
    </item>
    <item>
      <title>Re: add stops programmatically Directions Widget 4.8</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-stops-programmatically-directions-widget-4-8/m-p/749908#M69371</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Robert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you actually validated that setting the stops&amp;nbsp;dynamically will solve the&amp;nbsp;route and display directions? I have tried this and it does not seem to be the case. Unless there is something else I need to do besides specifying viewModel stops.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would love your input!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 May 2019 21:51:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-stops-programmatically-directions-widget-4-8/m-p/749908#M69371</guid>
      <dc:creator>ChrisGuirguis</dc:creator>
      <dc:date>2019-05-14T21:51:17Z</dc:date>
    </item>
    <item>
      <title>Re: add stops programmatically Directions Widget 4.8</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-stops-programmatically-directions-widget-4-8/m-p/749909#M69372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Chris,&amp;nbsp; No I did not test this myself. It use to work in 3.x but 4.x Directions widget is still in Beta.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 May 2019 14:10:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-stops-programmatically-directions-widget-4-8/m-p/749909#M69372</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2019-05-15T14:10:42Z</dc:date>
    </item>
    <item>
      <title>Re: add stops programmatically Directions Widget 4.8</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-stops-programmatically-directions-widget-4-8/m-p/749910#M69373</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was exactly doing that today. The only way I found to do it is to hack a little bit the widget.&lt;/P&gt;&lt;P&gt;When you change the stops collection in view model it has absolutely no effect on SearchWidget view model that is embedded inside Directions widget... So, basically, you have to find SearchWidget, and run a search.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Here is a simple example using a feature geometry&amp;nbsp;:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV style="color: #d4d4d4; background-color: #1e1e1e;"&gt;&lt;DIV&gt;&lt;DIV style="background-color: #1e1e1e;"&gt;&lt;DIV&gt;&lt;SPAN style="color: #569cd6;"&gt;function&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #dcdcaa;"&gt;addFromToDirection2&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;directions&lt;/SPAN&gt;&lt;SPAN&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;feature&lt;/SPAN&gt;&lt;SPAN&gt;)&amp;nbsp;{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;nbsp;&lt;SPAN style="background-color: #1e1e1e;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #6a9955;"&gt;&lt;SPAN style="color: #d4d4d4; background-color: #1e1e1e;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;//&amp;nbsp;eslint-disable-next-line&amp;nbsp;no-underscore-dangle&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;const&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;searchWidget&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;directions&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;_stopsToSearches&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #dcdcaa;"&gt;values&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;().&lt;/SPAN&gt;&lt;SPAN style="color: #dcdcaa;"&gt;next&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;().&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;value&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;searchWidget&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;viewModel&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #dcdcaa;"&gt;search&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;feature&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;geometry&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV style="background-color: #1e1e1e;"&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can extend it by configuring SearchWidget view model to search inside Feature layers if needed&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This little hack works on 4.10-&amp;gt;4.12&lt;/P&gt;&lt;P&gt;Good luck with that until that will become a feature&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV style="color: #d4d4d4; background-color: #1e1e1e;"&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Sep 2019 14:36:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-stops-programmatically-directions-widget-4-8/m-p/749910#M69373</guid>
      <dc:creator>TonyGeorges1</dc:creator>
      <dc:date>2019-09-10T14:36:44Z</dc:date>
    </item>
    <item>
      <title>Re: add stops programmatically Directions Widget 4.8</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-stops-programmatically-directions-widget-4-8/m-p/749911#M69374</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Any news on this? Is it going to be included soon?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Sep 2019 14:04:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-stops-programmatically-directions-widget-4-8/m-p/749911#M69374</guid>
      <dc:creator>StratosKourtzanidis</dc:creator>
      <dc:date>2019-09-26T14:04:28Z</dc:date>
    </item>
    <item>
      <title>Re: add stops programmatically Directions Widget 4.8</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-stops-programmatically-directions-widget-4-8/m-p/749912#M69375</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the tip Tony. Have you found a way to preset more than two search widgets? I managed to trigger the add Stop button with the _handleAddStopFocus() method but the new search widget is not included in the _stopsToSearches collection so I can not add a third stop.&lt;/P&gt;&lt;DIV style="opacity: 0.95; display: block; width: 300px;"&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV style="opacity: 0.95; display: block; width: 300px;"&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV style="font-size: 100%;"&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV style="opacity: 0.95; display: block; width: 300px;"&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV style="font-size: 100%;"&gt;nly found th&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Sep 2019 14:08:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-stops-programmatically-directions-widget-4-8/m-p/749912#M69375</guid>
      <dc:creator>StratosKourtzanidis</dc:creator>
      <dc:date>2019-09-26T14:08:21Z</dc:date>
    </item>
  </channel>
</rss>

