<?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 JS API 4.9 : cannot remove Esri World Geocoder from Directions widget in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-api-4-9-cannot-remove-esri-world-geocoder-from/m-p/511930#M47709</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Directions.html"&gt;directions widget &lt;/A&gt;of 4.9 is still in beta but I think it would be interesting to be able to remove the default ESRI world geocoder from the search sources&amp;nbsp;of the widget just like what we can do currently with the property &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html#includeDefaultSources"&gt;includeDefaultSources&lt;/A&gt; of the search.&lt;/P&gt;&lt;P&gt;Currently, defining the sources of the search in the &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Directions.html#searchProperties"&gt;searchProperties&lt;/A&gt; property do not overwrite the default ESRI world geocoder but append it and I was not able to find an easy way to remove it as the searches are not "accessible" as a property of the widget.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to set&amp;nbsp;my&amp;nbsp;source as default with the&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Directions.html#SearchProperties"&gt;activeSourceIndex&lt;/A&gt;&amp;nbsp;property, but it seems like it is not taken into account.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the meantime, if you have any idea for a workaround, that would be great !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;DIV style="color: #d4d4d4; background-color: #1e1e1e; font-weight: normal; font-size: 12px;"&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 27 Nov 2018 19:21:02 GMT</pubDate>
    <dc:creator>NicolasGIS</dc:creator>
    <dc:date>2018-11-27T19:21:02Z</dc:date>
    <item>
      <title>JS API 4.9 : cannot remove Esri World Geocoder from Directions widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-api-4-9-cannot-remove-esri-world-geocoder-from/m-p/511930#M47709</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Directions.html"&gt;directions widget &lt;/A&gt;of 4.9 is still in beta but I think it would be interesting to be able to remove the default ESRI world geocoder from the search sources&amp;nbsp;of the widget just like what we can do currently with the property &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html#includeDefaultSources"&gt;includeDefaultSources&lt;/A&gt; of the search.&lt;/P&gt;&lt;P&gt;Currently, defining the sources of the search in the &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Directions.html#searchProperties"&gt;searchProperties&lt;/A&gt; property do not overwrite the default ESRI world geocoder but append it and I was not able to find an easy way to remove it as the searches are not "accessible" as a property of the widget.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to set&amp;nbsp;my&amp;nbsp;source as default with the&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Directions.html#SearchProperties"&gt;activeSourceIndex&lt;/A&gt;&amp;nbsp;property, but it seems like it is not taken into account.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the meantime, if you have any idea for a workaround, that would be great !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;DIV style="color: #d4d4d4; background-color: #1e1e1e; font-weight: normal; font-size: 12px;"&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Nov 2018 19:21:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-api-4-9-cannot-remove-esri-world-geocoder-from/m-p/511930#M47709</guid>
      <dc:creator>NicolasGIS</dc:creator>
      <dc:date>2018-11-27T19:21:02Z</dc:date>
    </item>
    <item>
      <title>Re: JS API 4.9 : cannot remove Esri World Geocoder from Directions widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-api-4-9-cannot-remove-esri-world-geocoder-from/m-p/511931#M47710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you find a solution to this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Sep 2019 14:31:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-api-4-9-cannot-remove-esri-world-geocoder-from/m-p/511931#M47710</guid>
      <dc:creator>JoshWerts</dc:creator>
      <dc:date>2019-09-06T14:31:37Z</dc:date>
    </item>
    <item>
      <title>Re: JS API 4.9 : cannot remove Esri World Geocoder from Directions widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-api-4-9-cannot-remove-esri-world-geocoder-from/m-p/511932#M47711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oups, apologize for my late reply, I missed that question.&lt;/P&gt;&lt;P&gt;I did find a workaround. The idea is to push your locator in the &lt;SPAN style="color: #000000; background-color: #fffffe;"&gt;directionSources property, disable searchAll setting in the Directions widget by setting "&lt;SPAN&gt;searchAllEnabled" property to false and by specifying that the source "activeSourceIndex" is&amp;nbsp;0.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a snippet:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV style="color: #000000; background-color: #fffffe;"&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #008000;"&gt;/* Directions configuration */&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;const&lt;/SPAN&gt;&lt;SPAN&gt; directionSources = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;new&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #008080;"&gt;Collection&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #008080;"&gt;LocatorSearchSource&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;();&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt; directionSources.add(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;new&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #008080;"&gt;LocatorSearchSource&lt;/SPAN&gt;&lt;SPAN&gt;({&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt; locator: &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;new&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #008080;"&gt;Locator&lt;/SPAN&gt;&lt;SPAN&gt;({&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt; url:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #a31515;"&gt;"https://company.com/arcgis/rest/services/Adresses/GeocodeServer"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt; }),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt; singleLineFieldName: &lt;/SPAN&gt;&lt;SPAN style="color: #a31515;"&gt;"ZIPCode"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt; placeholder: &lt;/SPAN&gt;&lt;SPAN style="color: #a31515;"&gt;"33 ESRI Road"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt; outFields: [&lt;/SPAN&gt;&lt;SPAN style="color: #a31515;"&gt;"Addr_type"&lt;/SPAN&gt;&lt;SPAN&gt;],&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt; name: &lt;/SPAN&gt;&lt;SPAN style="color: #a31515;"&gt;"CustomLocator"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt; })&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt; );&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;this&lt;/SPAN&gt;&lt;SPAN&gt;.directionsWidget = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;new&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #008080;"&gt;Directions&lt;/SPAN&gt;&lt;SPAN&gt;({&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt; view,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt; routeServiceUrl:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #a31515;"&gt;"https://&lt;SPAN style="background-color: #fffffe;"&gt;company.com&lt;/SPAN&gt;/arcgis/rest/services/Network/NAServer/Route"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt; searchProperties: {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt; sources: directionSources,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt; searchAllEnabled: &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;false&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt; activeSourceIndex: &lt;/SPAN&gt;&lt;SPAN style="color: #09885a;"&gt;0&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt; });&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;Hope that help&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Oct 2019 17:04:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-api-4-9-cannot-remove-esri-world-geocoder-from/m-p/511932#M47711</guid>
      <dc:creator>NicolasGIS</dc:creator>
      <dc:date>2019-10-01T17:04:58Z</dc:date>
    </item>
  </channel>
</rss>

