<?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: District SearchWidget with Enterprise Locator two specific countries in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/district-searchwidget-with-enterprise-locator-two/m-p/1685640#M88163</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/83360"&gt;@SebastianKrings&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Using the countryCode property is the correct equivalent you are looking for. You should be able to add multiple countries by separating them by commas for your string input, similar to how you have done it in Experience Builder.&lt;/P&gt;&lt;P&gt;Here is an example:&amp;nbsp;&lt;A href="https://codepen.io/woriginales/pen/KwMOZPP" target="_blank"&gt;https://codepen.io/woriginales/pen/KwMOZPP&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 20 Feb 2026 20:49:24 GMT</pubDate>
    <dc:creator>WesleyO</dc:creator>
    <dc:date>2026-02-20T20:49:24Z</dc:date>
    <item>
      <title>District SearchWidget with Enterprise Locator two specific countries</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/district-searchwidget-with-enterprise-locator-two/m-p/1685110#M88147</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;currently we are using the SearchWidget with defaultSources enabled.&lt;BR /&gt;In our EnterprisePortal we have our own LocatorService.&lt;/P&gt;&lt;P&gt;As far as I understood the portal one is taken over arcgis.com-WorldLocator by simply setting the portalUrl in JS:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;esriConfig.portalUrl = ...&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now we would like to district the search results to specific countries (DE + DK in my case).&lt;BR /&gt;I am not getting it to work.&lt;/P&gt;&lt;P&gt;Best guess I found is the LocatorSource to set the CountryCode.&lt;BR /&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LocatorSearchSource.html" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LocatorSearchSource.html&lt;/A&gt;&lt;BR /&gt;Unfortunately there is no sample.&lt;BR /&gt;&lt;BR /&gt;I tried to place it into the sources-array which also countains our Layers to search in.&lt;BR /&gt;Additionally I disabled to use defaultSearchSource.&lt;BR /&gt;&lt;BR /&gt;Here is my current code:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const sources = await this.getSearchSourcesAsync(handles);

const sourceDE = new LocatorSearchSource();
sourceDE.countryCode = 'DE';
sources.push(sourceDE);

const searchWidget = new Search({
	view: mapView,
	includeDefaultSources: false,
	locationEnabled: false,
	sources,
	container: this.elementRefSearch!.nativeElement
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the ExperienceBuilder its pretty easy to district on specific countries. It offers an option for that:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SebastianKrings_0-1771495147363.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/148575i5B70B62CE516FA30/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SebastianKrings_0-1771495147363.png" alt="SebastianKrings_0-1771495147363.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The LocatorSearchSource however only accepts a single country at once.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I hope there is an equivalent easy way to district the countries for the JS SearchWidget.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Feb 2026 10:09:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/district-searchwidget-with-enterprise-locator-two/m-p/1685110#M88147</guid>
      <dc:creator>SebastianKrings</dc:creator>
      <dc:date>2026-02-19T10:09:09Z</dc:date>
    </item>
    <item>
      <title>Re: District SearchWidget with Enterprise Locator two specific countries</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/district-searchwidget-with-enterprise-locator-two/m-p/1685640#M88163</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/83360"&gt;@SebastianKrings&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Using the countryCode property is the correct equivalent you are looking for. You should be able to add multiple countries by separating them by commas for your string input, similar to how you have done it in Experience Builder.&lt;/P&gt;&lt;P&gt;Here is an example:&amp;nbsp;&lt;A href="https://codepen.io/woriginales/pen/KwMOZPP" target="_blank"&gt;https://codepen.io/woriginales/pen/KwMOZPP&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Feb 2026 20:49:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/district-searchwidget-with-enterprise-locator-two/m-p/1685640#M88163</guid>
      <dc:creator>WesleyO</dc:creator>
      <dc:date>2026-02-20T20:49:24Z</dc:date>
    </item>
    <item>
      <title>Re: District SearchWidget with Enterprise Locator two specific countries</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/district-searchwidget-with-enterprise-locator-two/m-p/1685830#M88174</link>
      <description>&lt;P&gt;Hey thanks.&lt;/P&gt;&lt;P&gt;Is it somehow possible to omit url like using the default-sources where I do not need to put the geocode url?&lt;BR /&gt;I would prefer not to have const urls in my app.&lt;/P&gt;&lt;P&gt;Nevertheless, the documentation should be updated here as well.&lt;BR /&gt;For LocatorSearchSource for property countryCode it says:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;Constricts search results to a specified country code. For example,&amp;nbsp;&lt;/SPAN&gt;US&lt;SPAN&gt;&amp;nbsp;for United States or&amp;nbsp;&lt;/SPAN&gt;SE&lt;SPAN&gt;&amp;nbsp;for Sweden.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LocatorSearchSource.html#countryCode" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LocatorSearchSource.html#countryCode&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Feb 2026 08:27:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/district-searchwidget-with-enterprise-locator-two/m-p/1685830#M88174</guid>
      <dc:creator>SebastianKrings</dc:creator>
      <dc:date>2026-02-23T08:27:20Z</dc:date>
    </item>
    <item>
      <title>Re: District SearchWidget with Enterprise Locator two specific countries</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/district-searchwidget-with-enterprise-locator-two/m-p/1686748#M88195</link>
      <description>&lt;P&gt;Unfortunately, if you modify the sources, you'll need the geocoding url as well. I think some devs put constants in a separate file if that helps.&lt;/P&gt;&lt;P&gt;The doc for countryCode looks right to me. Both "US" and "SE" seem to work fine. Can you explain what you think should be updated?&lt;/P&gt;</description>
      <pubDate>Wed, 25 Feb 2026 20:28:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/district-searchwidget-with-enterprise-locator-two/m-p/1686748#M88195</guid>
      <dc:creator>Noah-Sager</dc:creator>
      <dc:date>2026-02-25T20:28:41Z</dc:date>
    </item>
    <item>
      <title>Re: District SearchWidget with Enterprise Locator two specific countries</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/district-searchwidget-with-enterprise-locator-two/m-p/1686779#M88197</link>
      <description>&lt;P&gt;The doc says no word about using multiple codes comma separated is a valid option.&lt;BR /&gt;For me it sounds that you just can enter exactly one code.&lt;BR /&gt;E.g.:&lt;BR /&gt;Instead of current:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;Constricts search results to a specified country code. For example,&amp;nbsp;&lt;/SPAN&gt;US&lt;SPAN&gt;&amp;nbsp;for United States or&amp;nbsp;&lt;/SPAN&gt;SE&lt;SPAN&gt;&amp;nbsp;for Sweden.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;It could be:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;Constricts search results to&amp;nbsp;&lt;STRONG&gt;one or more&lt;/STRONG&gt; specified country &lt;STRONG&gt;codes.&lt;/STRONG&gt; For example,&amp;nbsp;&lt;/SPAN&gt;US&lt;SPAN&gt;&amp;nbsp;for United States or&amp;nbsp;&lt;/SPAN&gt;SE&lt;SPAN&gt;&amp;nbsp;for Sweden &lt;STRONG&gt;or "'US', 'SE'" for both&lt;/STRONG&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Wed, 25 Feb 2026 22:50:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/district-searchwidget-with-enterprise-locator-two/m-p/1686779#M88197</guid>
      <dc:creator>SebastianKrings</dc:creator>
      <dc:date>2026-02-25T22:50:06Z</dc:date>
    </item>
    <item>
      <title>Re: District SearchWidget with Enterprise Locator two specific countries</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/district-searchwidget-with-enterprise-locator-two/m-p/1686931#M88200</link>
      <description>&lt;P&gt;Ah, that's a good call. Thanks for pointing that out&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/83360"&gt;@SebastianKrings&lt;/a&gt;,&amp;nbsp;we'll improve the doc there.&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Thu, 26 Feb 2026 15:52:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/district-searchwidget-with-enterprise-locator-two/m-p/1686931#M88200</guid>
      <dc:creator>Noah-Sager</dc:creator>
      <dc:date>2026-02-26T15:52:18Z</dc:date>
    </item>
  </channel>
</rss>

