<?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 Search Component and includeDefaultSources in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-component-and-includedefaultsources/m-p/1640425#M87494</link>
    <description>&lt;P&gt;We're trying to remove the default ArcGIS World Geocoding Service from the Search Component, and replacing with our own layers and locators.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;1. Legacy documentation suggests passing an empty list of sources first; this does not work (and probably shouldn't).&amp;nbsp; &amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-hide-quot-esri-world-geocoder-quot-in-the/td-p/254412" target="_blank" rel="noopener"&gt;Solved: How to hide "Esri World Geocoder" in the search wi... - Esri Community&lt;/A&gt;&lt;/P&gt;&lt;P&gt;2. More contemporary discussion suggests setting the .includeDefaultSources property to 'false'.&amp;nbsp; The sample documentation illustrates this working by setting a property during a call to the widget's Constructor.&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-disable-the-arcgis-world-geocoding/td-p/1287780" target="_blank" rel="noopener"&gt;Solved: How do I disable the ArcGIS World Geocoding Servic... - Esri Community&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;3. Now with Components, we're able to follow this&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/search-component-multisource/" target="_blank" rel="noopener"&gt;Search component with multiple sources&lt;/A&gt;&amp;nbsp;to get our custom searches defined.&amp;nbsp; But, the Geocoding Service appears above any local results, and we'd like to remove results from halfway across the globe: from Console.log, we find the '.includeDefaultSources' property as&amp;nbsp;&lt;EM&gt;undefined&lt;/EM&gt;&amp;nbsp;and setting the property to&amp;nbsp;&lt;EM&gt;false&lt;/EM&gt; has no effect on the Search widget.&amp;nbsp; &amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;We could step back to using the Constructors over the Components, but it seems like there should be a better way forward?&lt;BR /&gt;&lt;BR /&gt;Any suggestions?&lt;/P&gt;</description>
    <pubDate>Fri, 08 Aug 2025 17:05:01 GMT</pubDate>
    <dc:creator>D_Atkins</dc:creator>
    <dc:date>2025-08-08T17:05:01Z</dc:date>
    <item>
      <title>Search Component and includeDefaultSources</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-component-and-includedefaultsources/m-p/1640425#M87494</link>
      <description>&lt;P&gt;We're trying to remove the default ArcGIS World Geocoding Service from the Search Component, and replacing with our own layers and locators.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;1. Legacy documentation suggests passing an empty list of sources first; this does not work (and probably shouldn't).&amp;nbsp; &amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-hide-quot-esri-world-geocoder-quot-in-the/td-p/254412" target="_blank" rel="noopener"&gt;Solved: How to hide "Esri World Geocoder" in the search wi... - Esri Community&lt;/A&gt;&lt;/P&gt;&lt;P&gt;2. More contemporary discussion suggests setting the .includeDefaultSources property to 'false'.&amp;nbsp; The sample documentation illustrates this working by setting a property during a call to the widget's Constructor.&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-disable-the-arcgis-world-geocoding/td-p/1287780" target="_blank" rel="noopener"&gt;Solved: How do I disable the ArcGIS World Geocoding Servic... - Esri Community&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;3. Now with Components, we're able to follow this&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/search-component-multisource/" target="_blank" rel="noopener"&gt;Search component with multiple sources&lt;/A&gt;&amp;nbsp;to get our custom searches defined.&amp;nbsp; But, the Geocoding Service appears above any local results, and we'd like to remove results from halfway across the globe: from Console.log, we find the '.includeDefaultSources' property as&amp;nbsp;&lt;EM&gt;undefined&lt;/EM&gt;&amp;nbsp;and setting the property to&amp;nbsp;&lt;EM&gt;false&lt;/EM&gt; has no effect on the Search widget.&amp;nbsp; &amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;We could step back to using the Constructors over the Components, but it seems like there should be a better way forward?&lt;BR /&gt;&lt;BR /&gt;Any suggestions?&lt;/P&gt;</description>
      <pubDate>Fri, 08 Aug 2025 17:05:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-component-and-includedefaultsources/m-p/1640425#M87494</guid>
      <dc:creator>D_Atkins</dc:creator>
      <dc:date>2025-08-08T17:05:01Z</dc:date>
    </item>
    <item>
      <title>Re: Search Component and includeDefaultSources</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-component-and-includedefaultsources/m-p/1640506#M87495</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/848899"&gt;@D_Atkins&lt;/a&gt;, I just went through this same issue recently. It sounds like you're looking for the Search component's 'includeDefaultSourcesDisabled' property, which has the corresponding 'include-default-sources-disabled' attribute. Here's the documentation link:&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-search/#includeDefaultSourcesDisabled" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-search/#includeDefaultSourcesDisabled&lt;/A&gt;&lt;/P&gt;&lt;P&gt;In your HTML, you can do this to remove the Esri geocoding service from the Search component:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;arcgis-search
    id="searchbar"
    include-default-sources-disabled
&amp;gt;&amp;lt;/arcgis-search&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you prefer to set it via JavaScript, I think (but do not know) that this would work:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const search = document.querySelector('#searchbar')
search.includeDefaultSourcesDisabled = true;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Aug 2025 19:22:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-component-and-includedefaultsources/m-p/1640506#M87495</guid>
      <dc:creator>fdeters</dc:creator>
      <dc:date>2025-08-11T19:22:49Z</dc:date>
    </item>
  </channel>
</rss>

