<?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 widget+4.11 in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-widget-4-11/m-p/128549#M11863</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I migrated from arcgis java script 4.9&amp;nbsp; to 4.11, after migration the "Search Widget" don't work!!&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 13 Apr 2019 15:52:10 GMT</pubDate>
    <dc:creator>anjelinaponkerat</dc:creator>
    <dc:date>2019-04-13T15:52:10Z</dc:date>
    <item>
      <title>Search widget+4.11</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-widget-4-11/m-p/128549#M11863</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I migrated from arcgis java script 4.9&amp;nbsp; to 4.11, after migration the "Search Widget" don't work!!&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Apr 2019 15:52:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-widget-4-11/m-p/128549#M11863</guid>
      <dc:creator>anjelinaponkerat</dc:creator>
      <dc:date>2019-04-13T15:52:10Z</dc:date>
    </item>
    <item>
      <title>Re: Search widget+4.11</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-widget-4-11/m-p/128550#M11864</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.esri.com/migrated-users/41122"&gt;anjelina ponkerat&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your issue is most probably caused by differences between the two versions of the ArcGIS API for JavaScript, version 4.9 and 4.11. So, just migrating to the new version apparently is not enough - because this breaks your application.&lt;/P&gt;&lt;P&gt;The best way forward is to keep the 4.9 app in production until you have rewritten and fully tested the new 4.11 app.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here you can find a 4.11 sample for the &lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/sample-code/widgets-search-3d/index.html" title="https://developers.arcgis.com/javascript/latest/sample-code/widgets-search-3d/index.html"&gt;Search Widget | ArcGIS API for JavaScript 4.11&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Egge-Jan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Apr 2019 16:36:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-widget-4-11/m-p/128550#M11864</guid>
      <dc:creator>Egge-Jan_Pollé</dc:creator>
      <dc:date>2019-04-13T16:36:13Z</dc:date>
    </item>
    <item>
      <title>Re: Search widget+4.11</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-widget-4-11/m-p/128551#M11865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But what's the reason of&amp;nbsp;this problem? I searched release note of 4.11 and didn't find any changes in new version(4.11)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Apr 2019 18:57:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-widget-4-11/m-p/128551#M11865</guid>
      <dc:creator>anjelinaponkerat</dc:creator>
      <dc:date>2019-04-13T18:57:11Z</dc:date>
    </item>
    <item>
      <title>Re: Search widget+4.11</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-widget-4-11/m-p/128552#M11866</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Anjelina,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;There have been several changes to the search widget and new classes added that the widget now uses. So it is hard to say without seeing your code what the issue is. If you go to the release notes&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/guide/release-notes/"&gt;https://developers.arcgis.com/javascript/latest/guide/release-notes/&lt;/A&gt;&amp;nbsp;and search for the word "search" you will find that there are new classes and new methods added in 4.11 and other change in 4.10.&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/guide/4.10/index.html"&gt;https://developers.arcgis.com/javascript/latest/guide/4.10/index.html&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 14 Apr 2019 14:37:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-widget-4-11/m-p/128552#M11866</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2019-04-14T14:37:49Z</dc:date>
    </item>
    <item>
      <title>Re: Search widget+4.11</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-widget-4-11/m-p/128553#M11867</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;var searchWidget = new Search({&lt;/P&gt;&lt;P&gt;view: view,&lt;/P&gt;&lt;P&gt;allPlaceholder: "search...",&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; sources: [{&lt;BR /&gt; featureLayer: {&lt;BR /&gt; url: "localhost:6080/arcgis/rest/services/city/FeatureServer/0",&lt;BR /&gt; popupTemplate: { // autocasts as new PopupTemplate()&lt;BR /&gt; title: "name: {name2} &amp;lt;/br&amp;gt;{name_new}",&lt;BR /&gt; overwriteActions: true&lt;BR /&gt; }&lt;BR /&gt; },&lt;BR /&gt; searchFields: ["name2"],&lt;BR /&gt; displayField: "name2",&lt;BR /&gt; exactMatch: false,&lt;BR /&gt; outFields: ["name2", "name2"],&lt;BR /&gt; name: "name2",&lt;BR /&gt; placeholder: "name2",&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; maxResults:10,&lt;BR /&gt; maxSuggestions:50,&lt;BR /&gt; autoNavigate: true,&lt;BR /&gt; enableSuggestions: true&lt;BR /&gt; }, {&lt;BR /&gt; featureLayer: {&lt;BR /&gt; url: "localhost:6080/arcgis/rest/services/city/FeatureServer/1",&lt;BR /&gt; popupTemplate: { // autocasts as new PopupTemplate()&lt;BR /&gt; title: "name: {cc} &amp;lt;/br&amp;gt;{c1cc}",&lt;BR /&gt; overwriteActions: true&lt;BR /&gt; }&lt;BR /&gt; },&lt;BR /&gt; searchFields: ["cc"],&lt;BR /&gt; displayField: "cc",&lt;BR /&gt; exactMatch: false,&lt;BR /&gt; outFields: ["cc", "c1cc"],&lt;BR /&gt; name: "search1",&lt;BR /&gt; placeholder: "search1",&lt;BR /&gt; exactMatch: true,&lt;BR /&gt; zoomScale:13000,&lt;BR /&gt; maxResults:10,&lt;BR /&gt; maxSuggestions:50,&lt;BR /&gt; autoNavigate: true,&lt;BR /&gt; enableSuggestions: true&lt;BR /&gt; }]&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; view.ui.add(searchWidget, {&lt;BR /&gt; position: "top-left",&lt;BR /&gt; index: 2&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 14 Apr 2019 19:16:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-widget-4-11/m-p/128553#M11867</guid>
      <dc:creator>anjelinaponkerat</dc:creator>
      <dc:date>2019-04-14T19:16:44Z</dc:date>
    </item>
    <item>
      <title>Re: Search widget+4.11</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-widget-4-11/m-p/128554#M11868</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Anjelina,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;In 4.11 the search widgets layer property takes a Layer class and not specifically a FeatureLayer class so you can not autocast as FeatureLayer as you use to in 4.9 when it was Only expecting a FeatureLayer. So your code would need to look like:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; searchWidget &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;Search&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
  view&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; view&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
  allPlaceholder&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"search..."&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
  sources&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
    layer&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;FeatureLayer&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;//Notice the property is called layer Not featureLayer&lt;/SPAN&gt;
      url&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"localhost:6080/arcgis/rest/services/city/FeatureServer/0"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
      popupTemplate&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;// autocasts as new PopupTemplate()&lt;/SPAN&gt;
        title&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"name: {name2} &amp;lt;/br&amp;gt;{name_new}"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
        overwriteActions&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;true&lt;/SPAN&gt;
      &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
    &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
    searchFields&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"name2"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
    displayField&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"name2"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
    exactMatch&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;false&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
    outFields&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"name2"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"name2"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
    name&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"name2"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
    placeholder&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"name2"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
    maxResults&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;10&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
    maxSuggestions&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;50&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
    autoNavigate&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;true&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
    &lt;SPAN class="comment token"&gt;//enableSuggestions: true //This is not a property of a layerSearchSource&lt;/SPAN&gt;
  &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:15:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-widget-4-11/m-p/128554#M11868</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-11T07:15:52Z</dc:date>
    </item>
  </channel>
</rss>

