<?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 ArcGIS Experience Builder 1.17 – Map Components Sample (use-map-components2) Not Displaying Legend or Layer List in ArcGIS Experience Builder Questions</title>
    <link>https://community.esri.com/t5/arcgis-experience-builder-questions/arcgis-experience-builder-1-17-map-components/m-p/1619159#M19129</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am using ArcGIS Experience Builder version 1.17 and trying to integrate the sample widget &lt;STRONG&gt;&lt;A href="https://github.com/Esri/arcgis-experience-builder-sdk-resources/tree/master/widgets/use-map-components2" target="_self"&gt;use-map-components2&lt;/A&gt;&amp;nbsp;&lt;/STRONG&gt;from the official Esri GitHub repository.&lt;/P&gt;&lt;P&gt;When I add the sample widget to my Experience Builder app, the widget renders, but neither the Legend nor the Layer List is displayed. Instead, I see messages like “No legend” or “No items to display,” even though the standard Experience Builder Legend widget displays the map legend correctly for the same map.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="arcgis-components-not-working.PNG" style="width: 527px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/133416i4915E271D4BDBF5F/image-size/large?v=v2&amp;amp;px=999" role="button" title="arcgis-components-not-working.PNG" alt="arcgis-components-not-working.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Environment&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;ArcGIS Experience Builder: v1.17&lt;/LI&gt;&lt;LI&gt;Web Browser: Chrome&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;Steps to Reproduce&lt;/STRONG&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Download or clone the &lt;A href="https://github.com/Esri/arcgis-experience-builder-sdk-resources" target="_self"&gt;arcgis-experience-builder-sdk-resources&lt;/A&gt;repository.&lt;/LI&gt;&lt;LI&gt;Copy the &lt;STRONG&gt;use-map-components2&lt;/STRONG&gt; widget folder into &lt;STRONG&gt;client/your-extensions/widgets&lt;/STRONG&gt;&amp;nbsp;in your Experience Builder installation (v1.17).&lt;/LI&gt;&lt;LI&gt;Register the widget and add it to an Experience with a web map.&lt;/LI&gt;&lt;LI&gt;Select a map widget in the widget settings.&lt;/LI&gt;&lt;LI&gt;Observe that the widget renders, but the &lt;STRONG&gt;ArcgisLegend&lt;/STRONG&gt; and &lt;STRONG&gt;ArcgisLayerList&lt;/STRONG&gt; web components do not display any content, even though the map has layers and the standard Legend widget works.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;STRONG&gt;Additional notes&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The widget uses the recommended pattern: it gets the MapView from `JimuMapViewComponent` and assigns it to the web components via `ref`.&lt;/LI&gt;&lt;LI&gt;No errors are shown in the browser console, except for a TypeScript error about missing type declarations for `arcgis-map-components` (which I assume is expected).&lt;/LI&gt;&lt;LI&gt;The CSS for ArcGIS JS API is loaded, and the rest of the Experience Builder app displays correctly.&lt;/LI&gt;&lt;LI&gt;I have tried both `@arcgis/map-components-react` and `arcgis-map-components` imports as shown in the sample.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;Expected behavior&lt;/STRONG&gt;&lt;BR /&gt;The Legend and Layer List web components should display the legend and layers of the selected map, just like the standard Experience Builder widgets.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Actual behavior&lt;/STRONG&gt;&lt;BR /&gt;The web components render, but show “No legend” or “No items to display,” even though the map has visible layers and the standard widgets work.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Question&lt;/STRONG&gt;&lt;BR /&gt;Is there an additional configuration or step required to get the ArcgisLegend and ArcgisLayerList web components working in Experience Builder 1.17?&lt;BR /&gt;Is this a known limitation or bug with the current version?&lt;/P&gt;&lt;P&gt;Thank you for your help!&lt;/P&gt;</description>
    <pubDate>Thu, 29 May 2025 01:21:21 GMT</pubDate>
    <dc:creator>othke</dc:creator>
    <dc:date>2025-05-29T01:21:21Z</dc:date>
    <item>
      <title>ArcGIS Experience Builder 1.17 – Map Components Sample (use-map-components2) Not Displaying Legend or Layer List</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/arcgis-experience-builder-1-17-map-components/m-p/1619159#M19129</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am using ArcGIS Experience Builder version 1.17 and trying to integrate the sample widget &lt;STRONG&gt;&lt;A href="https://github.com/Esri/arcgis-experience-builder-sdk-resources/tree/master/widgets/use-map-components2" target="_self"&gt;use-map-components2&lt;/A&gt;&amp;nbsp;&lt;/STRONG&gt;from the official Esri GitHub repository.&lt;/P&gt;&lt;P&gt;When I add the sample widget to my Experience Builder app, the widget renders, but neither the Legend nor the Layer List is displayed. Instead, I see messages like “No legend” or “No items to display,” even though the standard Experience Builder Legend widget displays the map legend correctly for the same map.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="arcgis-components-not-working.PNG" style="width: 527px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/133416i4915E271D4BDBF5F/image-size/large?v=v2&amp;amp;px=999" role="button" title="arcgis-components-not-working.PNG" alt="arcgis-components-not-working.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Environment&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;ArcGIS Experience Builder: v1.17&lt;/LI&gt;&lt;LI&gt;Web Browser: Chrome&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;Steps to Reproduce&lt;/STRONG&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Download or clone the &lt;A href="https://github.com/Esri/arcgis-experience-builder-sdk-resources" target="_self"&gt;arcgis-experience-builder-sdk-resources&lt;/A&gt;repository.&lt;/LI&gt;&lt;LI&gt;Copy the &lt;STRONG&gt;use-map-components2&lt;/STRONG&gt; widget folder into &lt;STRONG&gt;client/your-extensions/widgets&lt;/STRONG&gt;&amp;nbsp;in your Experience Builder installation (v1.17).&lt;/LI&gt;&lt;LI&gt;Register the widget and add it to an Experience with a web map.&lt;/LI&gt;&lt;LI&gt;Select a map widget in the widget settings.&lt;/LI&gt;&lt;LI&gt;Observe that the widget renders, but the &lt;STRONG&gt;ArcgisLegend&lt;/STRONG&gt; and &lt;STRONG&gt;ArcgisLayerList&lt;/STRONG&gt; web components do not display any content, even though the map has layers and the standard Legend widget works.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;STRONG&gt;Additional notes&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The widget uses the recommended pattern: it gets the MapView from `JimuMapViewComponent` and assigns it to the web components via `ref`.&lt;/LI&gt;&lt;LI&gt;No errors are shown in the browser console, except for a TypeScript error about missing type declarations for `arcgis-map-components` (which I assume is expected).&lt;/LI&gt;&lt;LI&gt;The CSS for ArcGIS JS API is loaded, and the rest of the Experience Builder app displays correctly.&lt;/LI&gt;&lt;LI&gt;I have tried both `@arcgis/map-components-react` and `arcgis-map-components` imports as shown in the sample.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;Expected behavior&lt;/STRONG&gt;&lt;BR /&gt;The Legend and Layer List web components should display the legend and layers of the selected map, just like the standard Experience Builder widgets.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Actual behavior&lt;/STRONG&gt;&lt;BR /&gt;The web components render, but show “No legend” or “No items to display,” even though the map has visible layers and the standard widgets work.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Question&lt;/STRONG&gt;&lt;BR /&gt;Is there an additional configuration or step required to get the ArcgisLegend and ArcgisLayerList web components working in Experience Builder 1.17?&lt;BR /&gt;Is this a known limitation or bug with the current version?&lt;/P&gt;&lt;P&gt;Thank you for your help!&lt;/P&gt;</description>
      <pubDate>Thu, 29 May 2025 01:21:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/arcgis-experience-builder-1-17-map-components/m-p/1619159#M19129</guid>
      <dc:creator>othke</dc:creator>
      <dc:date>2025-05-29T01:21:21Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Experience Builder 1.17 – Map Components Sample (use-map-components2) Not Displaying Legend or Layer List</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/arcgis-experience-builder-1-17-map-components/m-p/1619551#M19138</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/784999"&gt;@othke&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;&lt;P&gt;The sample widget has a logic flaw.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The initialization of JimuMapViewComponent and ArcgisLegend/ArcgisLayerList is not synchronized.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If ArcgisLegend or ArcgisLayerList initializes more slowly, when the onActiveViewChange event is triggered, legendRef.current and layerListRef.current may still be null, so the view cannot be assigned to these two components.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;A better approach is to use the onArcgisReady event of ArcgisLegend and ArcgisLayerList to assign the currently active view within the event.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This double assurance ensures that both components can reliably update their view in response.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Allen_Zhang_1-1748598033110.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/133497i4FA9BB2039A16E42/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Allen_Zhang_1-1748598033110.png" alt="Allen_Zhang_1-1748598033110.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 May 2025 09:41:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/arcgis-experience-builder-1-17-map-components/m-p/1619551#M19138</guid>
      <dc:creator>Allen_Zhang</dc:creator>
      <dc:date>2025-05-30T09:41:01Z</dc:date>
    </item>
  </channel>
</rss>

