<?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: Search Widget set searchExtent in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-widget-set-searchextent/m-p/451624#M41740</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, Kelly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 11 May 2015 13:28:15 GMT</pubDate>
    <dc:creator>JeffMitzelfelt</dc:creator>
    <dc:date>2015-05-11T13:28:15Z</dc:date>
    <item>
      <title>Search Widget set searchExtent</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-widget-set-searchextent/m-p/451622#M41738</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would like to set the searchExtent for the default Locator&amp;nbsp; for the search widget, but I don't see an obvious way to do that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have successfully limited the search using the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;var searchExtent = new Extent({
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmin: -91.5,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ymin: 37,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmax: -87.5,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ymax: 42.5,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; spatialReference: {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; wkid: 4326
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
});

var search = new Search({map: map}, "searchDiv");

search.sources[0].searchExtent = searchExtent;
search.startup()
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Am I missing something?&lt;/P&gt;&lt;P&gt;Has anyone seen a better way to do this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:09:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-widget-set-searchextent/m-p/451622#M41738</guid>
      <dc:creator>JeffMitzelfelt</dc:creator>
      <dc:date>2021-12-11T20:09:12Z</dc:date>
    </item>
    <item>
      <title>Re: Search Widget set searchExtent</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-widget-set-searchextent/m-p/451623#M41739</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The approach you are currently using is a valid approach for setting the search extent for the default locator.&amp;nbsp; You could check the name of the locator before setting the search extent to ensure its the Esri World Locator but if you haven't modified the widget's sources the first one in the sources array will be the default (Esri World Locator). &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 May 2015 19:22:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-widget-set-searchextent/m-p/451623#M41739</guid>
      <dc:creator>KellyHutchins</dc:creator>
      <dc:date>2015-05-08T19:22:24Z</dc:date>
    </item>
    <item>
      <title>Re: Search Widget set searchExtent</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-widget-set-searchextent/m-p/451624#M41740</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, Kelly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 May 2015 13:28:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-widget-set-searchextent/m-p/451624#M41740</guid>
      <dc:creator>JeffMitzelfelt</dc:creator>
      <dc:date>2015-05-11T13:28:15Z</dc:date>
    </item>
    <item>
      <title>Re: Search Widget set searchExtent</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-widget-set-searchextent/m-p/451625#M41741</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'm coming from Silverlight land and am behind the learning curve again (rebuilding our current application).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've been using the Web AppBuilder and examining the downloaded code to add such customizations as above, but I'm getting quite lost. Could you let me know where to put the code above. I though maybe in the Direction's Widget.js around the SearchOptions, Line 192 but it is breaking the widget.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any help you can give.&lt;/P&gt;&lt;P&gt;Dave&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Sep 2015 22:28:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-widget-set-searchextent/m-p/451625#M41741</guid>
      <dc:creator>DaveOrlando</dc:creator>
      <dc:date>2015-09-22T22:28:32Z</dc:date>
    </item>
    <item>
      <title>Re: Search Widget set searchExtent</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-widget-set-searchextent/m-p/451626#M41742</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dave,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; When you have questions about WAB then you would be better off posting those in the &lt;A href="https://community.esri.com/space/2150" target="_blank"&gt;Web AppBuilder for ArcGIS&lt;/A&gt;​ space. But to answer your question the adding the searchExtent to a source in the Search Widget (not directions widget as you were looking at) is as simple as adding the extent json to the[install dir]\server\apps\[app#]\configs\Search\config_Search.json&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is an example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "layerId": null,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "url": "your url",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "name": "Owner Parcels",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "placeholder": "Calhoun Parcels",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "searchFields": [
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "PPIN"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ],
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "searchExtent": {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "xmin": -9589751.5926,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "ymin": 3969370.735299997,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "xmax": -9521083.0409,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "ymax": 4024577.6668,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "spatialReference": {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "wkid": 102100
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; },
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "displayField": "NAME",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "exactMatch": true,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "maxResults": 6,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "type": "query"
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:09:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-widget-set-searchextent/m-p/451626#M41742</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-11T20:09:14Z</dc:date>
    </item>
  </channel>
</rss>

