<?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: SearchWidget with view:no-layerview-for-layer issue in 4.27.x version in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/searchwidget-with-view-no-layerview-for-layer/m-p/1334434#M82376</link>
    <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I’m encountering an issue when using "new Search" with the “new FeatureLayer” in the ReactJS library. Can anyone confirm if this bug has been resolved? Any help would be greatly appreciated. Thanks!&lt;/P&gt;</description>
    <pubDate>Tue, 03 Oct 2023 07:20:00 GMT</pubDate>
    <dc:creator>MichaelS1</dc:creator>
    <dc:date>2023-10-03T07:20:00Z</dc:date>
    <item>
      <title>SearchWidget with view:no-layerview-for-layer issue in 4.27.x version</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/searchwidget-with-view-no-layerview-for-layer/m-p/1308187#M81693</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have encountered a peculiar issue while working on the SearchWidget. I used the following code to create the widget, and on the surface, it seems to be functioning properly - it zooms into the searched area with graphic and popup.&lt;/P&gt;&lt;P&gt;However, an error message appears in the console stating, 'view:no-layerview-for-layer No layerview has been found for the layer.' It seems that the issue relates to the feature layer in the search source.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I'm not sure if it's a bug or not.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance for your assistance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mukecz1_0-1689335678537.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/75408i17FDC1FFE5919891/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mukecz1_0-1689335678537.png" alt="mukecz1_0-1689335678537.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;  await mapView.when(async () =&amp;gt; {
searchStores.value.forEach((s) =&amp;gt; {
      searchSources.push({
        layer: new FeatureLayer({
          url: s.url,
          popupTemplate: {
            title: s.title,
            overwriteActions: true,
          },
        }),
        suggestionTemplate: s.suggestionTemplate,
        searchFields: s.searchFields,
        displayField: s.displayField,
        maxSuggestions: s.maxSuggestions,
        maxResults: s.maxResults,
        exactMatch: s.exactMatch,
        outFields: s.outFields,
        name: s.name,
        placeholder: s.placeholder
      });
    });

    const searchWidget = new Search({
      view: mapView,
      allPlaceholder: "Searching",
      includeDefaultSources: false,
      sources: searchSources
    });
    mapView.ui.add(searchWidget, "top-right");
})&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jul 2023 23:52:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/searchwidget-with-view-no-layerview-for-layer/m-p/1308187#M81693</guid>
      <dc:creator>mukecz1</dc:creator>
      <dc:date>2023-07-14T23:52:38Z</dc:date>
    </item>
    <item>
      <title>Re: SearchWidget with view:no-layerview-for-layer issue</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/searchwidget-with-view-no-layerview-for-layer/m-p/1308220#M81694</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/552520"&gt;@mukecz1&lt;/a&gt;,&amp;nbsp;thanks for posting your question here. I think the issue is related to the featureLayer being created on the fly. I see that the error is thrown in the console, but the Search widget seems to work fine. Can you try creating the layer in a separate function, and then pushing each layer source?&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jul 2023 14:30:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/searchwidget-with-view-no-layerview-for-layer/m-p/1308220#M81694</guid>
      <dc:creator>Noah-Sager</dc:creator>
      <dc:date>2023-07-14T14:30:58Z</dc:date>
    </item>
    <item>
      <title>Re: SearchWidget with view:no-layerview-for-layer issue</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/searchwidget-with-view-no-layerview-for-layer/m-p/1308387#M81697</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/169842"&gt;@Noah-Sager&lt;/a&gt;&amp;nbsp;, thanks for advice,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I did try something like this, but the error still displays in the console.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I can confirm it happens since v4.27.0, I don't have this issue in v4.26.x.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;From the error in the console, it seems to be from the PopupViewModel. Could this be related to the popup changes in v4.27?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;   let l =  new FeatureLayer({
      url: URL,
      popupTemplate: {
        title:"Coupe {PROVCOUPE}",
        overwriteActions: true,
      },
    });
    searchSources.push({
      layer:l,
      suggestionTemplate: "{PROVCOUPE}",
      searchFields:["PROVCOUPE"],
      displayField: "PROVCOUPE",
      maxSuggestions: 6,
      maxResults: 6,
      exactMatch: false,
      outFields: ["PROVCOUPE"],
      name:"Provcoupe",
      placeholder:"example:XXX"
    });
    const searchWidget = new Search({
      view: mapView,
      allPlaceholder: "Searching",
      includeDefaultSources: false,
      sources: searchSources
    });
    mapView.ui.add(searchWidget, "top-right");&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 16 Jul 2023 22:54:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/searchwidget-with-view-no-layerview-for-layer/m-p/1308387#M81697</guid>
      <dc:creator>mukecz1</dc:creator>
      <dc:date>2023-07-16T22:54:55Z</dc:date>
    </item>
    <item>
      <title>Re: SearchWidget with view:no-layerview-for-layer issue</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/searchwidget-with-view-no-layerview-for-layer/m-p/1309703#M81734</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/552520"&gt;@mukecz1&lt;/a&gt;,&amp;nbsp;that's good sleuthing. The popup is indeed related. Looks like a legit bug. We'll get to work on it, and I'll update this post when we have an update to share.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jul 2023 18:49:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/searchwidget-with-view-no-layerview-for-layer/m-p/1309703#M81734</guid>
      <dc:creator>Noah-Sager</dc:creator>
      <dc:date>2023-07-19T18:49:15Z</dc:date>
    </item>
    <item>
      <title>Re: SearchWidget with view:no-layerview-for-layer issue in 4.27.x version</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/searchwidget-with-view-no-layerview-for-layer/m-p/1309768#M81738</link>
      <description>&lt;P&gt;The &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup-PopupViewModel.html" target="_self"&gt;PopupViewModel&lt;/A&gt; is attempting to highlight the feature on the map, but since the layer isn't added to the map, the process fails.&amp;nbsp; If you set the &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#highlightEnabled" target="_self"&gt;highlightEnabled&lt;/A&gt; property on the &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html" target="_self"&gt;Popup&lt;/A&gt; to false, you'll likely notice the error doesn't happen.&amp;nbsp; However, the Popup will then not highlight features on any layer.&lt;/P&gt;&lt;P&gt;I don't know if this meets the technical definition for a bug, but it could perhaps be handled more gracefully.&amp;nbsp; After all, in looking at the documentation for the &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html" target="_self"&gt;Search&lt;/A&gt; widget's &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html#resultGraphic" target="_self"&gt;resultGraphic&lt;/A&gt; property, it seems the intent is to still enable highlighting for all results.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jul 2023 20:36:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/searchwidget-with-view-no-layerview-for-layer/m-p/1309768#M81738</guid>
      <dc:creator>JoelBennett</dc:creator>
      <dc:date>2023-07-19T20:36:54Z</dc:date>
    </item>
    <item>
      <title>Re: SearchWidget with view:no-layerview-for-layer issue in 4.27.x version</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/searchwidget-with-view-no-layerview-for-layer/m-p/1334434#M82376</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I’m encountering an issue when using "new Search" with the “new FeatureLayer” in the ReactJS library. Can anyone confirm if this bug has been resolved? Any help would be greatly appreciated. Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2023 07:20:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/searchwidget-with-view-no-layerview-for-layer/m-p/1334434#M82376</guid>
      <dc:creator>MichaelS1</dc:creator>
      <dc:date>2023-10-03T07:20:00Z</dc:date>
    </item>
    <item>
      <title>Re: SearchWidget with view:no-layerview-for-layer issue in 4.27.x version</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/searchwidget-with-view-no-layerview-for-layer/m-p/1334584#M82383</link>
      <description>&lt;P&gt;According to &lt;A href="https://github.com/Esri/feedback-js-api-next/blob/main/CHANGELOG.md" target="_self"&gt;this page&lt;/A&gt;, this is resolved in the upcoming 4.28 release; search (Ctrl-F) for&amp;nbsp;"Esri Community - 1308220".&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2023 16:13:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/searchwidget-with-view-no-layerview-for-layer/m-p/1334584#M82383</guid>
      <dc:creator>JoelBennett</dc:creator>
      <dc:date>2023-10-03T16:13:45Z</dc:date>
    </item>
  </channel>
</rss>

