<?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 Legend dijit displaying entries not displayed on the map in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/legend-dijit-displaying-entries-not-displayed-on/m-p/601025#M56225</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;We have a service deployed at: &lt;/SPAN&gt;&lt;A href="http://www.agr.gc.ca/atlas/rest/services/mapservices/aafc_canada_land_parcels/MapServer" rel="nofollow noopener noreferrer" target="_blank"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;http://www.agr.gc.ca/atlas/rest/services/mapservices/aafc_canada_land_parcels/MapServer&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;. Using ESRI JSAPI 3.13 (but also seen in 3.9 so it's been like this for a while if not always), the Legend widget doesn`t appear to be handling this service properly. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;The first image below shows how the service is defined. Note that the "Manitoba Township Fabric" is toggled ON and is within visible range given the map at right, but because its "Manitoba" parent group is toggled OFF, that feature class doesn't appear in the map…which is as expected. The second image shows what the map looks like when the "Manitoba" group is toggled ON and the "Manitoba Township Fabric" feature class is displayed in the map.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;&lt;IMG alt="ArcMap - Group OFF.png" class="image-1 jive-image" src="/legacyfs/online/118083_ArcMap - Group OFF.png" style="width: 620px; height: 453px;" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;&lt;IMG alt="ArcMap - Group ON.png" class="image-2 jive-image" src="/legacyfs/online/118084_ArcMap - Group ON.png" style="width: 620px; height: 453px;" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;Now, with respect to the ESRI JSAPI, I pulled the sample below from &lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/javascript/jssamples/widget_legendvisible.html" rel="nofollow noopener noreferrer" target="_blank"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;https://developers.arcgis.com/javascript/jssamples/widget_legendvisible.html&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN style="font-size: 12.0pt;"&gt; and updated it to use the service in question. &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;lt;html&amp;gt;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp; &amp;lt;head&amp;gt;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&amp;gt;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;!--The viewport meta tag is used to improve the presentation and behavior of the samples&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; on iOS devices--&amp;gt;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"&amp;gt;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; &amp;lt;title&amp;gt;Updating the legend to display visible layers&amp;lt;/title&amp;gt;&lt;/SPAN&gt;

&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;link rel="stylesheet" href="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http://js.arcgis.com/3.13/dijit/themes/claro/claro.css" target="_blank"&gt;http://js.arcgis.com/3.13/dijit/themes/claro/claro.css&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;link rel="stylesheet" href="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http://js.arcgis.com/3.13/esri/css/esri.css" target="_blank"&gt;http://js.arcgis.com/3.13/esri/css/esri.css&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;lt;style&amp;gt;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; html, body {&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; height: 97%;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; width: 98%;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; margin: 1%;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;

&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #rightPane {&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; width: 20%;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;

&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; #legendPane {&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; border: solid #97DCF2 1px;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;lt;/style&amp;gt;&lt;/SPAN&gt;

&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;script src="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http://js.arcgis.com/3.13/" target="_blank"&gt;http://js.arcgis.com/3.13/&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;&amp;lt;/script&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;lt;script&amp;gt;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;var map;&lt;/SPAN&gt;

&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;require([&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; "esri/map",&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; "esri/arcgis/utils",&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; "esri/dijit/Legend",&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; "esri/layers/ArcGISDynamicMapServiceLayer",&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; "dojo/dom",&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; "dojo/dom-construct",&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; "dojo/parser",&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; "dojo/_base/array",&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; "dijit/form/CheckBox",&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; "dijit/layout/AccordionContainer",&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; "dijit/layout/BorderContainer",&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; "dijit/layout/ContentPane",&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; "dojo/domReady!"&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ],&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; function (&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; Map, utils, Legend, ArcGISDynamicMapServiceLayer, dom, domConstruct,&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; parser, arrayUtils, CheckBox&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ) {&lt;/SPAN&gt;

&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; parser.parse();&lt;/SPAN&gt;

&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; var legendLayers = [];&lt;/SPAN&gt;

&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; map = new Map("map", {&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN lang="FR" style="font-size: 8.0pt; font-family: 'Courier New';"&gt;basemap: "topo",&lt;/SPAN&gt;
&lt;SPAN lang="FR" style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; center: [-97, 50],&lt;/SPAN&gt;
&lt;SPAN lang="FR" style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; zoom: 8&lt;/SPAN&gt;
&lt;SPAN lang="FR" style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/SPAN&gt;

&lt;SPAN lang="FR" style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var lyrParcels = new ArcGISDynamicMapServiceLayer("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http://www.agr.gc.ca/atlas/rest/services/mapservices/aafc_canada_land_parcels/MapServer" target="_blank"&gt;http://www.agr.gc.ca/atlas/rest/services/mapservices/aafc_canada_land_parcels/MapServer&lt;/A&gt;&lt;SPAN&gt;", {&lt;/SPAN&gt;&lt;/SPAN&gt;
 &lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;id: 'landparcels'&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; });&lt;/SPAN&gt;

&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; legendLayers.push({ layer: lyrParcels, title: 'Land parcels' });&lt;/SPAN&gt;

&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; map.on('layers-add-result', function () {&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var legend = new Legend({&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; map: map,&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; layerInfos: legendLayers&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; }, "legendDiv");&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; legend.startup();&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; });&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; map.addLayers([ lyrParcels ]);&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;lt;/script&amp;gt;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; &amp;lt;/head&amp;gt;&lt;/SPAN&gt;

&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp; &amp;lt;body class="claro"&amp;gt;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;!--[if IE 7]&amp;gt;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; &amp;lt;style&amp;gt;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; html, body {&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; margin: 0;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; &amp;lt;/style&amp;gt;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; &amp;lt;![endif]--&amp;gt;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;div id="content" data-dojo-type="dijit/layout/BorderContainer"&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; data-dojo-props="design:'headline', gutters:true"&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; style="width: 100%; height: 100%; margin: 0;"&amp;gt;&lt;/SPAN&gt;

&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;div id="rightPane"&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; data-dojo-type="dijit/layout/ContentPane"&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; data-dojo-props="region:'right'"&amp;gt;&lt;/SPAN&gt;

&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; &amp;lt;div data-dojo-type="dijit/layout/AccordionContainer"&amp;gt;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; &amp;lt;div data-dojo-type="dijit/layout/ContentPane" id="legendPane"&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; data-dojo-props="title:'Legend', selected:true"&amp;gt;&lt;/SPAN&gt;

&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; &amp;lt;div id="legendDiv"&amp;gt;&amp;lt;/div&amp;gt;&lt;/SPAN&gt;

&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; &amp;lt;/div&amp;gt;&lt;/SPAN&gt;

&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; &amp;lt;div data-dojo-type="dijit/layout/ContentPane"&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; data-dojo-props="title:'Natural Disasters'"&amp;gt;&lt;/SPAN&gt;

&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; &amp;lt;span style="padding:10px 0;"&amp;gt;Click to toggle the visibility of the various natural disasters&amp;lt;/span&amp;gt;&lt;/SPAN&gt;

&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; &amp;lt;div id="toggle" style="padding: 2px 2px;"&amp;gt;&amp;lt;/div&amp;gt;&lt;/SPAN&gt;

&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; &amp;lt;/div&amp;gt;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/div&amp;gt;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; &amp;lt;/div&amp;gt;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;div id="map"&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; data-dojo-type="dijit/layout/ContentPane"&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; data-dojo-props="region:'center'"&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; style="overflow:hidden;"&amp;gt;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; &amp;lt;/div&amp;gt;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; &amp;lt;/div&amp;gt;&lt;/SPAN&gt;

&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; &amp;lt;/body&amp;gt;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;lt;/html&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;When the page is loaded in a browser it appears as you see below. The "Manitoba Township Fabric" (among others) appears in the Legend even though it is, correctly, not shown in the map. The Legend digit doesn't appear to be taking into consideration the fact that a group containing a "visibleLayer" may be toggled OFF and, therefore, not actually in the map and probably shouldn't be in the Legend either.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;&lt;IMG alt="Browser - Group OFF.png" class="image-3 jive-image" src="/legacyfs/online/118196_Browser - Group OFF.png" style="width: 620px; height: 492px;" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone tell me if this is by design? And, if so, what the logic behind showing these items in the Legend dijit is when, given the default visibility flag of their parent, there's no way they could actually appear in the map above?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have worked around this problem in my own web mapping application by changing the visibleLayers array when the service is added to its map and removing those layers that have a parent that is toggled OFF somewhere up the chain but I thought I'd bring this up in case it is not "by design" and, instead, an oversight in the Legend dijit functionality.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 16px;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 01:46:18 GMT</pubDate>
    <dc:creator>JoanneMcGraw</dc:creator>
    <dc:date>2021-12-12T01:46:18Z</dc:date>
    <item>
      <title>Legend dijit displaying entries not displayed on the map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/legend-dijit-displaying-entries-not-displayed-on/m-p/601025#M56225</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;We have a service deployed at: &lt;/SPAN&gt;&lt;A href="http://www.agr.gc.ca/atlas/rest/services/mapservices/aafc_canada_land_parcels/MapServer" rel="nofollow noopener noreferrer" target="_blank"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;http://www.agr.gc.ca/atlas/rest/services/mapservices/aafc_canada_land_parcels/MapServer&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;. Using ESRI JSAPI 3.13 (but also seen in 3.9 so it's been like this for a while if not always), the Legend widget doesn`t appear to be handling this service properly. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;The first image below shows how the service is defined. Note that the "Manitoba Township Fabric" is toggled ON and is within visible range given the map at right, but because its "Manitoba" parent group is toggled OFF, that feature class doesn't appear in the map…which is as expected. The second image shows what the map looks like when the "Manitoba" group is toggled ON and the "Manitoba Township Fabric" feature class is displayed in the map.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;&lt;IMG alt="ArcMap - Group OFF.png" class="image-1 jive-image" src="/legacyfs/online/118083_ArcMap - Group OFF.png" style="width: 620px; height: 453px;" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;&lt;IMG alt="ArcMap - Group ON.png" class="image-2 jive-image" src="/legacyfs/online/118084_ArcMap - Group ON.png" style="width: 620px; height: 453px;" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;Now, with respect to the ESRI JSAPI, I pulled the sample below from &lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/javascript/jssamples/widget_legendvisible.html" rel="nofollow noopener noreferrer" target="_blank"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;https://developers.arcgis.com/javascript/jssamples/widget_legendvisible.html&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN style="font-size: 12.0pt;"&gt; and updated it to use the service in question. &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;lt;html&amp;gt;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp; &amp;lt;head&amp;gt;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&amp;gt;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;!--The viewport meta tag is used to improve the presentation and behavior of the samples&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; on iOS devices--&amp;gt;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"&amp;gt;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; &amp;lt;title&amp;gt;Updating the legend to display visible layers&amp;lt;/title&amp;gt;&lt;/SPAN&gt;

&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;link rel="stylesheet" href="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http://js.arcgis.com/3.13/dijit/themes/claro/claro.css" target="_blank"&gt;http://js.arcgis.com/3.13/dijit/themes/claro/claro.css&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;link rel="stylesheet" href="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http://js.arcgis.com/3.13/esri/css/esri.css" target="_blank"&gt;http://js.arcgis.com/3.13/esri/css/esri.css&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;lt;style&amp;gt;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; html, body {&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; height: 97%;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; width: 98%;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; margin: 1%;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;

&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #rightPane {&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; width: 20%;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;

&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; #legendPane {&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; border: solid #97DCF2 1px;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;lt;/style&amp;gt;&lt;/SPAN&gt;

&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;script src="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http://js.arcgis.com/3.13/" target="_blank"&gt;http://js.arcgis.com/3.13/&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;&amp;lt;/script&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;lt;script&amp;gt;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;var map;&lt;/SPAN&gt;

&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;require([&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; "esri/map",&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; "esri/arcgis/utils",&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; "esri/dijit/Legend",&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; "esri/layers/ArcGISDynamicMapServiceLayer",&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; "dojo/dom",&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; "dojo/dom-construct",&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; "dojo/parser",&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; "dojo/_base/array",&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; "dijit/form/CheckBox",&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; "dijit/layout/AccordionContainer",&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; "dijit/layout/BorderContainer",&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; "dijit/layout/ContentPane",&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; "dojo/domReady!"&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ],&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; function (&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; Map, utils, Legend, ArcGISDynamicMapServiceLayer, dom, domConstruct,&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; parser, arrayUtils, CheckBox&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ) {&lt;/SPAN&gt;

&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; parser.parse();&lt;/SPAN&gt;

&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; var legendLayers = [];&lt;/SPAN&gt;

&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; map = new Map("map", {&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN lang="FR" style="font-size: 8.0pt; font-family: 'Courier New';"&gt;basemap: "topo",&lt;/SPAN&gt;
&lt;SPAN lang="FR" style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; center: [-97, 50],&lt;/SPAN&gt;
&lt;SPAN lang="FR" style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; zoom: 8&lt;/SPAN&gt;
&lt;SPAN lang="FR" style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/SPAN&gt;

&lt;SPAN lang="FR" style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var lyrParcels = new ArcGISDynamicMapServiceLayer("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http://www.agr.gc.ca/atlas/rest/services/mapservices/aafc_canada_land_parcels/MapServer" target="_blank"&gt;http://www.agr.gc.ca/atlas/rest/services/mapservices/aafc_canada_land_parcels/MapServer&lt;/A&gt;&lt;SPAN&gt;", {&lt;/SPAN&gt;&lt;/SPAN&gt;
 &lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;id: 'landparcels'&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; });&lt;/SPAN&gt;

&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; legendLayers.push({ layer: lyrParcels, title: 'Land parcels' });&lt;/SPAN&gt;

&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; map.on('layers-add-result', function () {&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var legend = new Legend({&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; map: map,&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; layerInfos: legendLayers&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; }, "legendDiv");&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; legend.startup();&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; });&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; map.addLayers([ lyrParcels ]);&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;lt;/script&amp;gt;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; &amp;lt;/head&amp;gt;&lt;/SPAN&gt;

&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp; &amp;lt;body class="claro"&amp;gt;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;!--[if IE 7]&amp;gt;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; &amp;lt;style&amp;gt;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; html, body {&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; margin: 0;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; &amp;lt;/style&amp;gt;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; &amp;lt;![endif]--&amp;gt;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;div id="content" data-dojo-type="dijit/layout/BorderContainer"&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; data-dojo-props="design:'headline', gutters:true"&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; style="width: 100%; height: 100%; margin: 0;"&amp;gt;&lt;/SPAN&gt;

&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;div id="rightPane"&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; data-dojo-type="dijit/layout/ContentPane"&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; data-dojo-props="region:'right'"&amp;gt;&lt;/SPAN&gt;

&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; &amp;lt;div data-dojo-type="dijit/layout/AccordionContainer"&amp;gt;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; &amp;lt;div data-dojo-type="dijit/layout/ContentPane" id="legendPane"&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; data-dojo-props="title:'Legend', selected:true"&amp;gt;&lt;/SPAN&gt;

&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; &amp;lt;div id="legendDiv"&amp;gt;&amp;lt;/div&amp;gt;&lt;/SPAN&gt;

&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; &amp;lt;/div&amp;gt;&lt;/SPAN&gt;

&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; &amp;lt;div data-dojo-type="dijit/layout/ContentPane"&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; data-dojo-props="title:'Natural Disasters'"&amp;gt;&lt;/SPAN&gt;

&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; &amp;lt;span style="padding:10px 0;"&amp;gt;Click to toggle the visibility of the various natural disasters&amp;lt;/span&amp;gt;&lt;/SPAN&gt;

&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; &amp;lt;div id="toggle" style="padding: 2px 2px;"&amp;gt;&amp;lt;/div&amp;gt;&lt;/SPAN&gt;

&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; &amp;lt;/div&amp;gt;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/div&amp;gt;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; &amp;lt;/div&amp;gt;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;div id="map"&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; data-dojo-type="dijit/layout/ContentPane"&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; data-dojo-props="region:'center'"&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; style="overflow:hidden;"&amp;gt;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; &amp;lt;/div&amp;gt;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; &amp;lt;/div&amp;gt;&lt;/SPAN&gt;

&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; &amp;lt;/body&amp;gt;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;lt;/html&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;When the page is loaded in a browser it appears as you see below. The "Manitoba Township Fabric" (among others) appears in the Legend even though it is, correctly, not shown in the map. The Legend digit doesn't appear to be taking into consideration the fact that a group containing a "visibleLayer" may be toggled OFF and, therefore, not actually in the map and probably shouldn't be in the Legend either.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;&lt;IMG alt="Browser - Group OFF.png" class="image-3 jive-image" src="/legacyfs/online/118196_Browser - Group OFF.png" style="width: 620px; height: 492px;" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone tell me if this is by design? And, if so, what the logic behind showing these items in the Legend dijit is when, given the default visibility flag of their parent, there's no way they could actually appear in the map above?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have worked around this problem in my own web mapping application by changing the visibleLayers array when the service is added to its map and removing those layers that have a parent that is toggled OFF somewhere up the chain but I thought I'd bring this up in case it is not "by design" and, instead, an oversight in the Legend dijit functionality.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 16px;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 01:46:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/legend-dijit-displaying-entries-not-displayed-on/m-p/601025#M56225</guid>
      <dc:creator>JoanneMcGraw</dc:creator>
      <dc:date>2021-12-12T01:46:18Z</dc:date>
    </item>
    <item>
      <title>Re: Legend dijit displaying entries not displayed on the map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/legend-dijit-displaying-entries-not-displayed-on/m-p/601026#M56226</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure why, by the page code I included above got changed to "&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Click to toggle the visibility of the various natural disasters&lt;/SPAN&gt;"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway, without adding it at HTML, here's the page mentioned above&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;lt;html&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp; &amp;lt;head&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;!--The viewport meta tag is used to improve the presentation and behavior of the samples&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; on iOS devices--&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; &amp;lt;title&amp;gt;Updating the legend to display visible layers&amp;lt;/title&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;link rel="stylesheet" href="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http://js.arcgis.com/3.13/dijit/themes/claro/claro.css" rel="nofollow" target="_blank"&gt;http://js.arcgis.com/3.13/dijit/themes/claro/claro.css&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;link rel="stylesheet" href="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http://js.arcgis.com/3.13/esri/css/esri.css" rel="nofollow" target="_blank"&gt;http://js.arcgis.com/3.13/esri/css/esri.css&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;lt;style&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; html, body {&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; height: 97%;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; width: 98%;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; margin: 1%;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #rightPane {&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; width: 20%;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; #legendPane {&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; border: solid #97DCF2 1px;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;lt;/style&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;script src="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http://js.arcgis.com/3.13/" rel="nofollow" target="_blank"&gt;http://js.arcgis.com/3.13/&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;&amp;lt;/script&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;lt;script&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;var map;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;require([&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; "esri/map",&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; "esri/arcgis/utils",&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; "esri/dijit/Legend",&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; "esri/layers/ArcGISDynamicMapServiceLayer",&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; "dojo/dom",&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; "dojo/dom-construct",&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; "dojo/parser",&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; "dojo/_base/array",&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; "dijit/form/CheckBox",&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; "dijit/layout/AccordionContainer",&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; "dijit/layout/BorderContainer",&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; "dijit/layout/ContentPane",&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; "dojo/domReady!"&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; ],&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; function (&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; Map, utils, Legend, ArcGISDynamicMapServiceLayer, dom, domConstruct,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; parser, arrayUtils, CheckBox&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; ) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; parser.parse();&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; var legendLayers = [];&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; map = new Map("map", {&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt; &lt;SPAN lang="FR" style="font-size: 8.0pt; font-family: 'Courier New';"&gt;basemap: "topo",&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN lang="FR" style="font-size: 8.0pt; font-family: 'Courier New';"&gt; center: [-97, 50],&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN lang="FR" style="font-size: 8.0pt; font-family: 'Courier New';"&gt; zoom: 8&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN lang="FR" style="font-size: 8.0pt; font-family: 'Courier New';"&gt; });&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN lang="FR" style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&lt;SPAN&gt; var lyrParcels = new ArcGISDynamicMapServiceLayer("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http://www.agr.gc.ca/atlas/rest/services/mapservices/aafc_canada_land_parcels/MapServer" rel="nofollow" target="_blank"&gt;http://www.agr.gc.ca/atlas/rest/services/mapservices/aafc_canada_land_parcels/MapServer&lt;/A&gt;&lt;SPAN&gt;", {&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt; &lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;id: 'landparcels'&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; });&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; legendLayers.push({ layer: lyrParcels, title: 'Land parcels' });&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; map.on('layers-add-result', function () {&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; var legend = new Legend({&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; map: map,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; layerInfos: legendLayers&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; }, "legendDiv");&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; legend.startup();&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; });&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; map.addLayers([ lyrParcels ]);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; });&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;lt;/script&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; &amp;lt;/head&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp; &amp;lt;body class="claro"&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;!--[if IE 7]&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; &amp;lt;style&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; html, body {&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; margin: 0;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; &amp;lt;/style&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; &amp;lt;![endif]--&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;div id="content" data-dojo-type="dijit/layout/BorderContainer"&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; data-dojo-props="design:'headline', gutters:true"&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; style="width: 100%; height: 100%; margin: 0;"&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; &amp;lt;div id="rightPane"&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; data-dojo-type="dijit/layout/ContentPane"&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; data-dojo-props="region:'right'"&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; &amp;lt;div data-dojo-type="dijit/layout/AccordionContainer"&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; &amp;lt;div data-dojo-type="dijit/layout/ContentPane" id="legendPane"&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; data-dojo-props="title:'Legend', selected:true"&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; &amp;lt;div id="legendDiv"&amp;gt;&amp;lt;/div&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; &amp;lt;/div&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; &amp;lt;div data-dojo-type="dijit/layout/ContentPane"&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; data-dojo-props="title:'Natural Disasters'"&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; &amp;lt;span style="padding:10px 0;"&amp;gt;Click to toggle the visibility of the various natural disasters&amp;lt;/span&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; &amp;lt;div id="toggle" style="padding: 2px 2px;"&amp;gt;&amp;lt;/div&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; &amp;lt;/div&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; &amp;lt;/div&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; &amp;lt;/div&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; &amp;lt;div id="map"&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; data-dojo-type="dijit/layout/ContentPane"&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; data-dojo-props="region:'center'"&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; style="overflow:hidden;"&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; &amp;lt;/div&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; &amp;lt;/div&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt; &amp;lt;/body&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New';"&gt;&amp;lt;/html&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jul 2015 14:41:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/legend-dijit-displaying-entries-not-displayed-on/m-p/601026#M56226</guid>
      <dc:creator>JoanneMcGraw</dc:creator>
      <dc:date>2015-07-20T14:41:34Z</dc:date>
    </item>
    <item>
      <title>Re: Legend dijit displaying entries not displayed on the map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/legend-dijit-displaying-entries-not-displayed-on/m-p/601027#M56227</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Can no one comment on whether the behaviour I noted in this thread is by design? And, if so, what the logic behind showing these items in the Legend dijit is when, given the default visibility flag of their parent, there's no way they could actually appear in the map above?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;I ask because that is what I am being told by ESRI Support and I'm afraid I can't understand the reasoning behind the "design"...perhaps someone else can?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Cheers,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;jtm&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jul 2015 14:22:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/legend-dijit-displaying-entries-not-displayed-on/m-p/601027#M56227</guid>
      <dc:creator>JoanneMcGraw</dc:creator>
      <dc:date>2015-07-27T14:22:03Z</dc:date>
    </item>
    <item>
      <title>Re: Legend dijit displaying entries not displayed on the map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/legend-dijit-displaying-entries-not-displayed-on/m-p/601028#M56228</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Joanne,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is a weird case and one would expect anything that is not seen in the map shouldn't be in the legend dijit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jul 2015 14:45:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/legend-dijit-displaying-entries-not-displayed-on/m-p/601028#M56228</guid>
      <dc:creator>TimWitt2</dc:creator>
      <dc:date>2015-07-27T14:45:37Z</dc:date>
    </item>
    <item>
      <title>Re: Legend dijit displaying entries not displayed on the map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/legend-dijit-displaying-entries-not-displayed-on/m-p/601029#M56229</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I appreciate your taking the time to respond, Tim.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was hoping for a response from ESRI Redlands...? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this behaviour "by design" as I am being told by ESRI Canada? And, if so, what is the reasoning behind it? I've never gotten an answer to that from anyone.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jul 2015 16:37:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/legend-dijit-displaying-entries-not-displayed-on/m-p/601029#M56229</guid>
      <dc:creator>JoanneMcGraw</dc:creator>
      <dc:date>2015-07-28T16:37:15Z</dc:date>
    </item>
    <item>
      <title>Re: Legend dijit displaying entries not displayed on the map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/legend-dijit-displaying-entries-not-displayed-on/m-p/601030#M56230</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe &lt;A href="https://community.esri.com/migrated-users/2525"&gt;Kelly Hutchins&lt;/A&gt;​ or &lt;A href="https://community.esri.com/migrated-users/2906"&gt;Bjorn Svensson&lt;/A&gt;​ could shed some light?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jul 2015 12:06:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/legend-dijit-displaying-entries-not-displayed-on/m-p/601030#M56230</guid>
      <dc:creator>TimWitt2</dc:creator>
      <dc:date>2015-07-29T12:06:04Z</dc:date>
    </item>
    <item>
      <title>Re: Legend dijit displaying entries not displayed on the map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/legend-dijit-displaying-entries-not-displayed-on/m-p/601031#M56231</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This looks like a bug in the legend widget to me. I created a simple test app that uses your service and can reproduce the issue with the layers displaying in the legend when they should not be.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd suggest contacting Esri support again to ask for more details on why they consider this a known issue.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jul 2015 18:12:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/legend-dijit-displaying-entries-not-displayed-on/m-p/601031#M56231</guid>
      <dc:creator>KellyHutchins</dc:creator>
      <dc:date>2015-07-30T18:12:21Z</dc:date>
    </item>
    <item>
      <title>Re: Legend dijit displaying entries not displayed on the map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/legend-dijit-displaying-entries-not-displayed-on/m-p/601032#M56232</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ArcGIS Online currently have the same behavior. I can report it as a bug but it will affect AGOL at the same time.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Aug 2015 11:54:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/legend-dijit-displaying-entries-not-displayed-on/m-p/601032#M56232</guid>
      <dc:creator>ÉricGosselin</dc:creator>
      <dc:date>2015-08-03T11:54:42Z</dc:date>
    </item>
    <item>
      <title>Re: Legend dijit displaying entries not displayed on the map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/legend-dijit-displaying-entries-not-displayed-on/m-p/601033#M56233</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/12416"&gt;Éric Gosselin&lt;/A&gt;‌ I can see&amp;nbsp;this problem until nowadays (ArcGIS 10.4)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Dec 2016 13:28:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/legend-dijit-displaying-entries-not-displayed-on/m-p/601033#M56233</guid>
      <dc:creator>deleted-user-0W0-oLHxDjCX</dc:creator>
      <dc:date>2016-12-02T13:28:37Z</dc:date>
    </item>
  </channel>
</rss>

