<?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: Map Layers Custom Widget Bugs/Enhancements in Experience Builder Custom Widgets</title>
    <link>https://community.esri.com/t5/experience-builder-custom-widgets/map-layers-custom-widget-bugs-enhancements/m-p/1540635#M386</link>
    <description>&lt;P&gt;In order to get to any arbitrary level, you will need to build a recursive widget. Here is an example.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/experience-builder-custom-widgets/popup-identify-controller/ta-p/1495619" target="_blank"&gt;https://community.esri.com/t5/experience-builder-custom-widgets/popup-identify-controller/ta-p/1495619&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 19 Sep 2024 20:14:08 GMT</pubDate>
    <dc:creator>JeffreyThompson2</dc:creator>
    <dc:date>2024-09-19T20:14:08Z</dc:date>
    <item>
      <title>Map Layers Custom Widget Bugs/Enhancements</title>
      <link>https://community.esri.com/t5/experience-builder-custom-widgets/map-layers-custom-widget-bugs-enhancements/m-p/1540621#M385</link>
      <description>&lt;P&gt;I am working on a few enhancements to the Map Layers widget, which include having certain layers be expanded by default &lt;A href="https://community.esri.com/t5/arcgis-experience-builder-ideas/expand-grouped-layers-by-default/idi-p/1310073" target="_self"&gt;(referenced in this Community post)&lt;/A&gt;&amp;nbsp;and having&amp;nbsp;the layers collapse/expand when the tick box is checked or unchecked. Below, I have a few bugs and enhancements that have hit some roadblocks if anyone has any tips? I will include the ZIP of my current widget so far.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;BUGS:&lt;/STRONG&gt; I have run into a snag where the legend of layers nested in group layers 3 levels or lower is not displaying (they are visible at the range shown in all images below). The legend icon stays greyed out.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Brian_McLeer_0-1726774266289.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/115490i1A8390B22E1C4C56/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Brian_McLeer_0-1726774266289.png" alt="Brian_McLeer_0-1726774266289.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;They are displayed in the legend of the group container at the top, however.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Brian_McLeer_1-1726774343472.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/115491i66A10925AB7A64B3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Brian_McLeer_1-1726774343472.png" alt="Brian_McLeer_1-1726774343472.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I added the code from lines 19 - 24 (snippet below is from lines 369-392 in the widget.tsx file) to allow map layers to display the legend that is not in a 2nd level or beyond group layer which started displaying the legend based on the &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html" target="_self"&gt;API documentation.&lt;/A&gt;&amp;nbsp;My roadblock is finding the part that lets me have the legend show for all map layers, regardless of how far down they are nested in sublayers.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="java"&gt;        let actionGroups = {};
        listItem.actionsSections = [];

        this.trackLayerVisibility(listItem);

        if (!listItem.parent) {
            listItem.open = true;
        } else {
            listItem.open = false;
        }

        if (listItem.layer.sublayers) {
            listItem.panel = {
                content: 'legend',
                open: false // Set to true to expand legends by default
            };
        }

        if (listItem.layer.layer) {
            listItem.panel = {
                content: 'legend',
                open: false // Set to true to expand legends by default
            };
        }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The other issue I am encountering is that the legends are staying on when checking the radio button to off for Show legend in the configuration settings.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Brian_McLeer_2-1726774412895.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/115492iF56C269EA9EF6BCE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Brian_McLeer_2-1726774412895.png" alt="Brian_McLeer_2-1726774412895.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ENHANCEMENT:&lt;/STRONG&gt; I would like to add hint text to the layers search that says "Filter Map Layers" and change the magnifying icon to a filter icon.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Brian_McLeer_3-1726775035867.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/115493i1A744C575C3AFB82/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Brian_McLeer_3-1726775035867.png" alt="Brian_McLeer_3-1726775035867.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Sep 2024 19:57:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/experience-builder-custom-widgets/map-layers-custom-widget-bugs-enhancements/m-p/1540621#M385</guid>
      <dc:creator>Brian_McLeer</dc:creator>
      <dc:date>2024-09-19T19:57:24Z</dc:date>
    </item>
    <item>
      <title>Re: Map Layers Custom Widget Bugs/Enhancements</title>
      <link>https://community.esri.com/t5/experience-builder-custom-widgets/map-layers-custom-widget-bugs-enhancements/m-p/1540635#M386</link>
      <description>&lt;P&gt;In order to get to any arbitrary level, you will need to build a recursive widget. Here is an example.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/experience-builder-custom-widgets/popup-identify-controller/ta-p/1495619" target="_blank"&gt;https://community.esri.com/t5/experience-builder-custom-widgets/popup-identify-controller/ta-p/1495619&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Sep 2024 20:14:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/experience-builder-custom-widgets/map-layers-custom-widget-bugs-enhancements/m-p/1540635#M386</guid>
      <dc:creator>JeffreyThompson2</dc:creator>
      <dc:date>2024-09-19T20:14:08Z</dc:date>
    </item>
  </channel>
</rss>

