<?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 ESRI JavaScript API 4x - Layer List and Legend Working Together Bug/Issues in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esri-javascript-api-4x-layer-list-and-legend/m-p/1007676#M71050</link>
    <description>&lt;P&gt;Good morning.&amp;nbsp; Has anyone else noticed the buggy nature of the layer list widget and the legend when working with JavaScript API version 4x?&amp;nbsp; The issue has to do with the symbology changing in the legend when checking on the web service layer in the layer list.&amp;nbsp; When the map loads, the layer list looks good and the legend looks good.&amp;nbsp; If you click on any layers within the layer list, the symbology changes to the incorrect symbology in other map services.&amp;nbsp; I am using the basic out-of-the box JS API settings.&amp;nbsp; My base map layer does have a group layer.&lt;/P&gt;&lt;P&gt;I have logged in a bug with ESRI.&lt;/P&gt;&lt;P&gt;Here are some screenshot examples:&lt;/P&gt;&lt;P&gt;01. Layer List on Application Load&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LayerListOnLoad01.jpg" style="width: 325px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/1670i7AFA1DEA77A4A1AC/image-size/large?v=v2&amp;amp;px=999" role="button" title="LayerListOnLoad01.jpg" alt="LayerListOnLoad01.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Legend Onload:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GPSLayersOnLoad.jpg" style="width: 317px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/1677i5FB484D57CBF07DA/image-size/large?v=v2&amp;amp;px=999" role="button" title="GPSLayersOnLoad.jpg" alt="GPSLayersOnLoad.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LegendOnLoad01.jpg" style="width: 325px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/1672iDA9C974FFB871F5C/image-size/large?v=v2&amp;amp;px=999" role="button" title="LegendOnLoad01.jpg" alt="LegendOnLoad01.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now if I toggle back to the layer list, then turn off&amp;nbsp; both web services in the layer list, the symbology will change for the base map service when I toggle back to the legend.&amp;nbsp; ESRI has duplicated this behavior using their data.&amp;nbsp; The behavior is inconsistent.&amp;nbsp; Notice the incorrect symbology for the Base Map service shown below:&lt;/P&gt;&lt;P&gt;There are line and polygon features for the base map that show point features from the GPS layer.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LegendBug.jpg" style="width: 317px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/1676iF3507CF0EDA1D9F9/image-size/large?v=v2&amp;amp;px=999" role="button" title="LegendBug.jpg" alt="LegendBug.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The LayerList/Legend in JS API 3x has better functionality.&amp;nbsp; Hopefully, other people have encountered this issue.&amp;nbsp; This should be resolved, because having a functioning layer list with legend is crucial for our applications.&amp;nbsp; If the symbology changes, then end users will notice and the application is not functional.&lt;/P&gt;&lt;P&gt;Finally, here is the code I use for the layer list widget and legend in the 4x environment:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AppCodeSample.jpg" style="width: 659px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/1674iF244F849CDC3B2AF/image-size/large?v=v2&amp;amp;px=999" role="button" title="AppCodeSample.jpg" alt="AppCodeSample.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thank you for the review.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 09 Dec 2020 13:29:29 GMT</pubDate>
    <dc:creator>IanPeebles</dc:creator>
    <dc:date>2020-12-09T13:29:29Z</dc:date>
    <item>
      <title>ESRI JavaScript API 4x - Layer List and Legend Working Together Bug/Issues</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esri-javascript-api-4x-layer-list-and-legend/m-p/1007676#M71050</link>
      <description>&lt;P&gt;Good morning.&amp;nbsp; Has anyone else noticed the buggy nature of the layer list widget and the legend when working with JavaScript API version 4x?&amp;nbsp; The issue has to do with the symbology changing in the legend when checking on the web service layer in the layer list.&amp;nbsp; When the map loads, the layer list looks good and the legend looks good.&amp;nbsp; If you click on any layers within the layer list, the symbology changes to the incorrect symbology in other map services.&amp;nbsp; I am using the basic out-of-the box JS API settings.&amp;nbsp; My base map layer does have a group layer.&lt;/P&gt;&lt;P&gt;I have logged in a bug with ESRI.&lt;/P&gt;&lt;P&gt;Here are some screenshot examples:&lt;/P&gt;&lt;P&gt;01. Layer List on Application Load&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LayerListOnLoad01.jpg" style="width: 325px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/1670i7AFA1DEA77A4A1AC/image-size/large?v=v2&amp;amp;px=999" role="button" title="LayerListOnLoad01.jpg" alt="LayerListOnLoad01.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Legend Onload:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GPSLayersOnLoad.jpg" style="width: 317px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/1677i5FB484D57CBF07DA/image-size/large?v=v2&amp;amp;px=999" role="button" title="GPSLayersOnLoad.jpg" alt="GPSLayersOnLoad.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LegendOnLoad01.jpg" style="width: 325px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/1672iDA9C974FFB871F5C/image-size/large?v=v2&amp;amp;px=999" role="button" title="LegendOnLoad01.jpg" alt="LegendOnLoad01.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now if I toggle back to the layer list, then turn off&amp;nbsp; both web services in the layer list, the symbology will change for the base map service when I toggle back to the legend.&amp;nbsp; ESRI has duplicated this behavior using their data.&amp;nbsp; The behavior is inconsistent.&amp;nbsp; Notice the incorrect symbology for the Base Map service shown below:&lt;/P&gt;&lt;P&gt;There are line and polygon features for the base map that show point features from the GPS layer.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LegendBug.jpg" style="width: 317px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/1676iF3507CF0EDA1D9F9/image-size/large?v=v2&amp;amp;px=999" role="button" title="LegendBug.jpg" alt="LegendBug.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The LayerList/Legend in JS API 3x has better functionality.&amp;nbsp; Hopefully, other people have encountered this issue.&amp;nbsp; This should be resolved, because having a functioning layer list with legend is crucial for our applications.&amp;nbsp; If the symbology changes, then end users will notice and the application is not functional.&lt;/P&gt;&lt;P&gt;Finally, here is the code I use for the layer list widget and legend in the 4x environment:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AppCodeSample.jpg" style="width: 659px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/1674iF244F849CDC3B2AF/image-size/large?v=v2&amp;amp;px=999" role="button" title="AppCodeSample.jpg" alt="AppCodeSample.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thank you for the review.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Dec 2020 13:29:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esri-javascript-api-4x-layer-list-and-legend/m-p/1007676#M71050</guid>
      <dc:creator>IanPeebles</dc:creator>
      <dc:date>2020-12-09T13:29:29Z</dc:date>
    </item>
  </channel>
</rss>

