<?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: Hiding 'groupness' of TileLayers inside Layerlist in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hiding-groupness-of-tilelayers-inside-layerlist/m-p/1253935#M80137</link>
    <description>&lt;P&gt;I case anyone needs this in the future. It works even better when using allLayers instead of layers:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const webmaps = webmapids.map((webmapid) =&amp;gt; {
    const webmap = new WebMap({
        portalItem: {
        id: webmapid
        }
    });
    // wait for the webmap to load
    webmap.when(() =&amp;gt; {
        webmap.allLayers.forEach( (layer) =&amp;gt; {
            if (layer.type === "tile") {
                layer.listMode = "hide-children"
            }
        })
    });
    return webmap;
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since that also fixes it for any tileLayers inside of groupLayers&lt;/P&gt;</description>
    <pubDate>Wed, 01 Feb 2023 16:50:14 GMT</pubDate>
    <dc:creator>LeidavanHees</dc:creator>
    <dc:date>2023-02-01T16:50:14Z</dc:date>
    <item>
      <title>Hiding 'groupness' of TileLayers inside Layerlist</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hiding-groupness-of-tilelayers-inside-layerlist/m-p/1253703#M80127</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a layerList with legend that works beautifully for normal layers and groups. But I'd like it to show tileLayers as normal layers instead of groups.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Currently it does this (only "Groen" is a group, the rest are tileLayers):&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LeidavanHees_0-1675242800974.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/61806i271F45A337FB882B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LeidavanHees_0-1675242800974.png" alt="LeidavanHees_0-1675242800974.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It looks the same if I open the map in the esri map viewer:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LeidavanHees_1-1675242881095.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/61807i88B3CE74CE064D2C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LeidavanHees_1-1675242881095.png" alt="LeidavanHees_1-1675242881095.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any way for me to change this so that the tileLayers do not have the arrow to open them? Or should I just not work with tileLayers?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be much appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Feb 2023 09:17:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hiding-groupness-of-tilelayers-inside-layerlist/m-p/1253703#M80127</guid>
      <dc:creator>LeidavanHees</dc:creator>
      <dc:date>2023-02-01T09:17:37Z</dc:date>
    </item>
    <item>
      <title>Re: Hiding 'groupness' of TileLayers inside Layerlist</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hiding-groupness-of-tilelayers-inside-layerlist/m-p/1253809#M80130</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/637211"&gt;@LeidavanHees&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;You can hide the sublayers with the listMode property set to "hide-children" on the layer.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const layer = new TileLayer({
    url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer",
    listMode: "hide-children"
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-TileLayer.html#listMode" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-TileLayer.html#listMode&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Feb 2023 14:18:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hiding-groupness-of-tilelayers-inside-layerlist/m-p/1253809#M80130</guid>
      <dc:creator>Sage_Wall</dc:creator>
      <dc:date>2023-02-01T14:18:07Z</dc:date>
    </item>
    <item>
      <title>Re: Hiding 'groupness' of TileLayers inside Layerlist</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hiding-groupness-of-tilelayers-inside-layerlist/m-p/1253852#M80131</link>
      <description>&lt;P&gt;Thanks for your response &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/507049"&gt;@Sage_Wall&lt;/a&gt;.&amp;nbsp;I think I'm missing something though.&lt;/P&gt;&lt;P&gt;I don't make any layers in my app, I just load a webmap that happens to have TileLayers in it:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;		const webmapids = [
			"146f547ab7654d71a38d3a55654d56c2",
			"a744f367411a43a9bb75072926d79e6f"
		];

		const webmaps = webmapids.map((webmapid) =&amp;gt; {
			return new WebMap({
				portalItem: {
					// autocasts as new PortalItem()
					id: webmapid
				}
			});
		});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to do this still?&lt;/P&gt;</description>
      <pubDate>Wed, 01 Feb 2023 15:14:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hiding-groupness-of-tilelayers-inside-layerlist/m-p/1253852#M80131</guid>
      <dc:creator>LeidavanHees</dc:creator>
      <dc:date>2023-02-01T15:14:14Z</dc:date>
    </item>
    <item>
      <title>Re: Hiding 'groupness' of TileLayers inside Layerlist</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hiding-groupness-of-tilelayers-inside-layerlist/m-p/1253873#M80134</link>
      <description>&lt;P&gt;I haven't tested the code below but I think something like this would work to loop through the webmap's layers and if the layer type is "tile" then set the listMode to "hide-children".&amp;nbsp; If I get a chance later today I'll try to work up a working example.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const webmaps = webmapids.map((webmapid) =&amp;gt; {
    const webmap = new WebMap({
        portalItem: {
        id: webmapid
        }
    });
    // wait for the webmap to load
    webmap.when(() =&amp;gt; {
        webmap.layers.forEach( (layer) =&amp;gt; {
            if (layer.type === "tile") {
                layer.listMode = "hide-children"
            }
        })
    });
    return webmap;
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Feb 2023 15:38:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hiding-groupness-of-tilelayers-inside-layerlist/m-p/1253873#M80134</guid>
      <dc:creator>Sage_Wall</dc:creator>
      <dc:date>2023-02-01T15:38:40Z</dc:date>
    </item>
    <item>
      <title>Re: Hiding 'groupness' of TileLayers inside Layerlist</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hiding-groupness-of-tilelayers-inside-layerlist/m-p/1253888#M80135</link>
      <description>&lt;P&gt;That works like an absolute charm, thank you very much!&lt;/P&gt;</description>
      <pubDate>Wed, 01 Feb 2023 16:01:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hiding-groupness-of-tilelayers-inside-layerlist/m-p/1253888#M80135</guid>
      <dc:creator>LeidavanHees</dc:creator>
      <dc:date>2023-02-01T16:01:53Z</dc:date>
    </item>
    <item>
      <title>Re: Hiding 'groupness' of TileLayers inside Layerlist</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hiding-groupness-of-tilelayers-inside-layerlist/m-p/1253935#M80137</link>
      <description>&lt;P&gt;I case anyone needs this in the future. It works even better when using allLayers instead of layers:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const webmaps = webmapids.map((webmapid) =&amp;gt; {
    const webmap = new WebMap({
        portalItem: {
        id: webmapid
        }
    });
    // wait for the webmap to load
    webmap.when(() =&amp;gt; {
        webmap.allLayers.forEach( (layer) =&amp;gt; {
            if (layer.type === "tile") {
                layer.listMode = "hide-children"
            }
        })
    });
    return webmap;
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since that also fixes it for any tileLayers inside of groupLayers&lt;/P&gt;</description>
      <pubDate>Wed, 01 Feb 2023 16:50:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hiding-groupness-of-tilelayers-inside-layerlist/m-p/1253935#M80137</guid>
      <dc:creator>LeidavanHees</dc:creator>
      <dc:date>2023-02-01T16:50:14Z</dc:date>
    </item>
  </channel>
</rss>

