<?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 How to filter Search widget results by State? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-filter-search-widget-results-by-state/m-p/100375#M9201</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm wondering how I can filter the results of the search widget to only give me results in a certain state (say Washington for example). I've been able to filter by country, and by location type by&amp;nbsp;modifying the "categories" and "countryCode" properties of the default Locator. I also found&amp;nbsp;&lt;A href="https://developers.arcgis.com/rest/geocode/api-reference/geocoding-find-address-candidates.htm"&gt;this&lt;/A&gt;&amp;nbsp;website which seems like it is allowing me to filter by state by specifying the url:&amp;nbsp;&lt;A class="link-titled" href="http://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer?f=pjson&amp;amp;region=Washington" title="http://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer?f=pjson&amp;amp;region=Washington"&gt;http://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer?f=pjson&amp;amp;region=Washington&lt;/A&gt;. Navigating here with my browser works fine, however, when I use this as the URL for a locator, it&amp;nbsp;doesn't filter anything out. I've tried several variations of this URL to no avail. This seems like something that should be possible so I figure I must be doing something wrong and was hoping somebody on here might be able to help me. Here's the full source code that initializes my search bar (sorry for lack of formatting - I don't see anything for inserting code snippets):&amp;nbsp;&lt;/P&gt;&lt;P&gt;var source ={&lt;BR /&gt;&lt;SPAN&gt; locator: new Locator("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fgeocode.arcgis.com%2Farcgis%2Frest%2Fservices%2FWorld%2FGeocodeServer%2FfindAddressCandidates%3Fregion%3DVirginia%26f%3Djson" rel="nofollow" target="_blank"&gt;http://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?region=Virginia&amp;amp;f=json&lt;/A&gt;&lt;SPAN&gt;"),&lt;/SPAN&gt;&lt;BR /&gt; singleLineFieldName: "SingleLine",&lt;BR /&gt; outFields: ["*"],&lt;BR /&gt; name: "",&lt;BR /&gt; localSearchOptions: {&lt;BR /&gt; minScale: 300000,&lt;BR /&gt; distance: 50000&lt;BR /&gt; },&lt;BR /&gt; placeholder: "",&lt;BR /&gt; highlightSymbol: new PictureMarkerSymbol(this.basePath + "/images/search-pointer.png", 36, 36).setOffset(9, 18)&lt;BR /&gt; }&lt;BR /&gt; var srcs = search.get("sources");&lt;BR /&gt; srcs[0] = source;&lt;BR /&gt;&lt;SPAN&gt; //srcs[0].locator.url = "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fgeocode.arcgis.com%2Farcgis%2Frest%2Fservices%2FWorld%2FGeocodeServer%3Ff%3Dpjson%26region%3DWashington" rel="nofollow" target="_blank"&gt;http://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer?f=pjson&amp;amp;region=Washington&lt;/A&gt;&lt;SPAN&gt;";&lt;/SPAN&gt;&lt;BR /&gt; //Restrict Search Results to US&lt;BR /&gt; srcs[0].countryCode = "US";&lt;BR /&gt; //Restrict Search Results to Locations in inital map display &lt;BR /&gt; srcs[0].searchExtent = extentInitial;&lt;BR /&gt; //Placeholder Text&lt;BR /&gt; srcs[0].placeholder = "Search for an area";&lt;BR /&gt; //Restricts searches to Neighborhood, City, Subregion, Region, Country, and Zone&lt;BR /&gt; //srcs[0].categories = ["Populated Place"];&lt;/P&gt;&lt;P&gt;search.set("sources", srcs);&lt;BR /&gt; search.startup();&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 10 Dec 2017 23:19:36 GMT</pubDate>
    <dc:creator>WilliamWill</dc:creator>
    <dc:date>2017-12-10T23:19:36Z</dc:date>
    <item>
      <title>How to filter Search widget results by State?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-filter-search-widget-results-by-state/m-p/100375#M9201</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm wondering how I can filter the results of the search widget to only give me results in a certain state (say Washington for example). I've been able to filter by country, and by location type by&amp;nbsp;modifying the "categories" and "countryCode" properties of the default Locator. I also found&amp;nbsp;&lt;A href="https://developers.arcgis.com/rest/geocode/api-reference/geocoding-find-address-candidates.htm"&gt;this&lt;/A&gt;&amp;nbsp;website which seems like it is allowing me to filter by state by specifying the url:&amp;nbsp;&lt;A class="link-titled" href="http://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer?f=pjson&amp;amp;region=Washington" title="http://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer?f=pjson&amp;amp;region=Washington"&gt;http://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer?f=pjson&amp;amp;region=Washington&lt;/A&gt;. Navigating here with my browser works fine, however, when I use this as the URL for a locator, it&amp;nbsp;doesn't filter anything out. I've tried several variations of this URL to no avail. This seems like something that should be possible so I figure I must be doing something wrong and was hoping somebody on here might be able to help me. Here's the full source code that initializes my search bar (sorry for lack of formatting - I don't see anything for inserting code snippets):&amp;nbsp;&lt;/P&gt;&lt;P&gt;var source ={&lt;BR /&gt;&lt;SPAN&gt; locator: new Locator("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fgeocode.arcgis.com%2Farcgis%2Frest%2Fservices%2FWorld%2FGeocodeServer%2FfindAddressCandidates%3Fregion%3DVirginia%26f%3Djson" rel="nofollow" target="_blank"&gt;http://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?region=Virginia&amp;amp;f=json&lt;/A&gt;&lt;SPAN&gt;"),&lt;/SPAN&gt;&lt;BR /&gt; singleLineFieldName: "SingleLine",&lt;BR /&gt; outFields: ["*"],&lt;BR /&gt; name: "",&lt;BR /&gt; localSearchOptions: {&lt;BR /&gt; minScale: 300000,&lt;BR /&gt; distance: 50000&lt;BR /&gt; },&lt;BR /&gt; placeholder: "",&lt;BR /&gt; highlightSymbol: new PictureMarkerSymbol(this.basePath + "/images/search-pointer.png", 36, 36).setOffset(9, 18)&lt;BR /&gt; }&lt;BR /&gt; var srcs = search.get("sources");&lt;BR /&gt; srcs[0] = source;&lt;BR /&gt;&lt;SPAN&gt; //srcs[0].locator.url = "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fgeocode.arcgis.com%2Farcgis%2Frest%2Fservices%2FWorld%2FGeocodeServer%3Ff%3Dpjson%26region%3DWashington" rel="nofollow" target="_blank"&gt;http://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer?f=pjson&amp;amp;region=Washington&lt;/A&gt;&lt;SPAN&gt;";&lt;/SPAN&gt;&lt;BR /&gt; //Restrict Search Results to US&lt;BR /&gt; srcs[0].countryCode = "US";&lt;BR /&gt; //Restrict Search Results to Locations in inital map display &lt;BR /&gt; srcs[0].searchExtent = extentInitial;&lt;BR /&gt; //Placeholder Text&lt;BR /&gt; srcs[0].placeholder = "Search for an area";&lt;BR /&gt; //Restricts searches to Neighborhood, City, Subregion, Region, Country, and Zone&lt;BR /&gt; //srcs[0].categories = ["Populated Place"];&lt;/P&gt;&lt;P&gt;search.set("sources", srcs);&lt;BR /&gt; search.startup();&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 10 Dec 2017 23:19:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-filter-search-widget-results-by-state/m-p/100375#M9201</guid>
      <dc:creator>WilliamWill</dc:creator>
      <dc:date>2017-12-10T23:19:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter Search widget results by State?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-filter-search-widget-results-by-state/m-p/100376#M9202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;William,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;I have never found a way to do this. The best I have ever come up with is to use a searchExtent for the locator to the the bounding box (extent) of the state I am interested in.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Dec 2017 17:19:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-filter-search-widget-results-by-state/m-p/100376#M9202</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2017-12-11T17:19:17Z</dc:date>
    </item>
  </channel>
</rss>

