<?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 Can you remove a search source from a web map that has search enabled? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-you-remove-a-search-source-from-a-web-map-that/m-p/1674794#M88014</link>
    <description>&lt;P&gt;If a web map has search enabled in the application settings, is it possible to remove those sources in the map component?&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like the search source to only be a default one created from AGOL world geocoding. I figured out how to add the AGOL LocatorSearchSource to the search component, and I can make it the first option with the&amp;nbsp;&lt;SPAN&gt;active-source-index property. However, the other options from the web map remain. This is an issue as one of the locators will prompt public users for credentials if selected&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I feel like I'm missing something simple that would allow for only the default source to be used for searching.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-search/#activeMenu" target="_blank"&gt;Search | ArcGIS Maps SDK for JavaScript&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 23 Dec 2025 22:14:33 GMT</pubDate>
    <dc:creator>MBocek</dc:creator>
    <dc:date>2025-12-23T22:14:33Z</dc:date>
    <item>
      <title>Can you remove a search source from a web map that has search enabled?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-you-remove-a-search-source-from-a-web-map-that/m-p/1674794#M88014</link>
      <description>&lt;P&gt;If a web map has search enabled in the application settings, is it possible to remove those sources in the map component?&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like the search source to only be a default one created from AGOL world geocoding. I figured out how to add the AGOL LocatorSearchSource to the search component, and I can make it the first option with the&amp;nbsp;&lt;SPAN&gt;active-source-index property. However, the other options from the web map remain. This is an issue as one of the locators will prompt public users for credentials if selected&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I feel like I'm missing something simple that would allow for only the default source to be used for searching.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-search/#activeMenu" target="_blank"&gt;Search | ArcGIS Maps SDK for JavaScript&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Dec 2025 22:14:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-you-remove-a-search-source-from-a-web-map-that/m-p/1674794#M88014</guid>
      <dc:creator>MBocek</dc:creator>
      <dc:date>2025-12-23T22:14:33Z</dc:date>
    </item>
    <item>
      <title>Re: Can you remove a search source from a web map that has search enabled?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-you-remove-a-search-source-from-a-web-map-that/m-p/1674899#M88015</link>
      <description>&lt;P&gt;Yes — you can. In the Search map component, the web map’s configured search sources are used unless you override them.&lt;/P&gt;&lt;P&gt;To force only the World Geocoder (and prevent the web map sources from showing up), do two things:&lt;/P&gt;&lt;P&gt;Disable default/webmap sources in the UI&lt;BR /&gt;Use include-default-sources-disabled="true" (this stops defaultSources from being included).&lt;BR /&gt;Esri Developer&lt;/P&gt;&lt;P&gt;Explicitly set sources to only your locator&lt;BR /&gt;Once sources is set, the component won’t fall back to allSources from the web map.&lt;BR /&gt;Esri Developer&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;arcgis-search
  include-default-sources-disabled="true"
  active-source-index="0"&amp;gt;
&amp;lt;/arcgis-search&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;import LocatorSearchSource from "@arcgis/core/widgets/Search/LocatorSearchSource.js";

const search = document.querySelector("arcgis-search");

search.sources = [
  new LocatorSearchSource({
    url: "https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer",
    name: "World Geocoder"
  })
];&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you still see the secured locator after this, it usually means sources wasn’t actually being set (or it’s being appended elsewhere). But the supported approach is: disable default sources + set sources explicitly.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Dec 2025 19:25:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-you-remove-a-search-source-from-a-web-map-that/m-p/1674899#M88015</guid>
      <dc:creator>VenkataKondepati</dc:creator>
      <dc:date>2025-12-25T19:25:08Z</dc:date>
    </item>
    <item>
      <title>Re: Can you remove a search source from a web map that has search enabled?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-you-remove-a-search-source-from-a-web-map-that/m-p/1675006#M88017</link>
      <description>&lt;P&gt;Just adding the&amp;nbsp;&lt;STRONG&gt;include-default-sources-disabled="true"&lt;/STRONG&gt; seemed to do the trick. I got confused on the definition of default sources. Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 26 Dec 2025 17:52:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-you-remove-a-search-source-from-a-web-map-that/m-p/1675006#M88017</guid>
      <dc:creator>MBocek</dc:creator>
      <dc:date>2025-12-26T17:52:14Z</dc:date>
    </item>
  </channel>
</rss>

