<?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: Display layer legend symbol even if the layer is not visible on the map in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/display-layer-legend-symbol-even-if-the-layer-is/m-p/1548451#M85884</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/822510"&gt;@LakshanRasingolla&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;You can use the &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html#respectLayerVisibility" target="_self"&gt;respectLayerVisibility&lt;/A&gt; property on the Legend, and you can add a "legend" icon or any of the other &lt;A href="https://developers.arcgis.com/calcite-design-system/icons/" target="_self"&gt;calcite icons&lt;/A&gt; the question mark would be replaced.&amp;nbsp; The panel in an interactive element and the button is there to allow the user to expand and collapse the panel.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://codepen.io/sagewall/pen/wvVJdOR" target="_blank"&gt;https://codepen.io/sagewall/pen/wvVJdOR&lt;/A&gt;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;            new Legend({
              view: view,
              container: legendContainer,
              layerInfos: [{ layer: item.layer }],
              respectLayerVisibility: false,
            });

            item.panel = {
              content: legendContainer,
              icon: "legend",
              open: true,
            };&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 14 Oct 2024 16:40:14 GMT</pubDate>
    <dc:creator>Sage_Wall</dc:creator>
    <dc:date>2024-10-14T16:40:14Z</dc:date>
    <item>
      <title>Display layer legend symbol even if the layer is not visible on the map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/display-layer-legend-symbol-even-if-the-layer-is/m-p/1548425#M85881</link>
      <description>&lt;P&gt;The following image shows the layer list implementation of my ArcGIS map. There is a layer list option called 'Legend' which shows the legend of that respective layer within the item panel.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-10-14 192526.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/117174i650023818E39BB19/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2024-10-14 192526.png" alt="Screenshot 2024-10-14 192526.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="Screenshot 2024-10-14 192616.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/117175iFE75A1C62979B9DD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2024-10-14 192616.png" alt="Screenshot 2024-10-14 192616.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;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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, the respective layer must be visible on the map to show the legend. But I need to show each layer's legend when clicking on the legend option regardless of its visibility on the map.&lt;/P&gt;&lt;P&gt;(&lt;EM&gt;&lt;STRONG&gt;current code is attached below&lt;/STRONG&gt;&lt;/EM&gt;)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1) Is there a way to do the above implementation?&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Further once item panel make visible it shows a question mark symbol on the layer list item (Image below).&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2) Is there a way to remove this?&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="Screenshot 2024-10-14 200328.png" style="width: 285px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/117176i81BCE5C53902386B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2024-10-14 200328.png" alt="Screenshot 2024-10-14 200328.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Oct 2024 14:40:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/display-layer-legend-symbol-even-if-the-layer-is/m-p/1548425#M85881</guid>
      <dc:creator>LakshanRasingolla</dc:creator>
      <dc:date>2024-10-14T14:40:08Z</dc:date>
    </item>
    <item>
      <title>Re: Display layer legend symbol even if the layer is not visible on the map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/display-layer-legend-symbol-even-if-the-layer-is/m-p/1548451#M85884</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/822510"&gt;@LakshanRasingolla&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;You can use the &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html#respectLayerVisibility" target="_self"&gt;respectLayerVisibility&lt;/A&gt; property on the Legend, and you can add a "legend" icon or any of the other &lt;A href="https://developers.arcgis.com/calcite-design-system/icons/" target="_self"&gt;calcite icons&lt;/A&gt; the question mark would be replaced.&amp;nbsp; The panel in an interactive element and the button is there to allow the user to expand and collapse the panel.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://codepen.io/sagewall/pen/wvVJdOR" target="_blank"&gt;https://codepen.io/sagewall/pen/wvVJdOR&lt;/A&gt;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;            new Legend({
              view: view,
              container: legendContainer,
              layerInfos: [{ layer: item.layer }],
              respectLayerVisibility: false,
            });

            item.panel = {
              content: legendContainer,
              icon: "legend",
              open: true,
            };&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Oct 2024 16:40:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/display-layer-legend-symbol-even-if-the-layer-is/m-p/1548451#M85884</guid>
      <dc:creator>Sage_Wall</dc:creator>
      <dc:date>2024-10-14T16:40:14Z</dc:date>
    </item>
    <item>
      <title>Re: Display layer legend symbol even if the layer is not visible on the map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/display-layer-legend-symbol-even-if-the-layer-is/m-p/1548909#M85901</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/507049"&gt;@Sage_Wall&lt;/a&gt;&amp;nbsp; This worked. Thanks !&lt;/P&gt;</description>
      <pubDate>Wed, 16 Oct 2024 09:10:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/display-layer-legend-symbol-even-if-the-layer-is/m-p/1548909#M85901</guid>
      <dc:creator>LakshanRasingolla</dc:creator>
      <dc:date>2024-10-16T09:10:54Z</dc:date>
    </item>
  </channel>
</rss>

