<?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: Layer List Widget nodes not synchronizing for dynamic layer in Web AppBuilder Custom Widgets Questions</title>
    <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/layer-list-widget-nodes-not-synchronizing-for/m-p/770616#M1627</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The issue is resolved by using below code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// To get the layerInfosObj from&amp;nbsp;&lt;/P&gt;&lt;P&gt;LayerInfos.getInstance(this.map, this.map.itemInfo).then(function (layerInfosObj) {&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;layerInfosObj.traversal(lang.hitch(this, function (layerInfo) {&lt;/P&gt;&lt;P&gt;if (arrayUtils.indexOf(&lt;SPAN style="background-color: #ffffff;"&gt;dynamicLayer&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;.visibleLayers, &lt;SPAN&gt;layerInfo&lt;/SPAN&gt;.id) &amp;gt; -1) {&lt;BR /&gt;layerInfo.&lt;STRONG&gt;_setTopLayerVisible&lt;/STRONG&gt;(true);&lt;BR /&gt;} else {&lt;BR /&gt;layerInfo.&lt;STRONG&gt;_setTopLayerVisible&lt;/STRONG&gt;(false);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Dec 2018 17:45:33 GMT</pubDate>
    <dc:creator>arunepuri1</dc:creator>
    <dc:date>2018-12-04T17:45:33Z</dc:date>
    <item>
      <title>Layer List Widget nodes not synchronizing for dynamic layer</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/layer-list-widget-nodes-not-synchronizing-for/m-p/770615#M1626</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I&amp;nbsp;am using&amp;nbsp;WAB 2.8 default Layer List widget.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I add any dynamic layer to the map through another custom widget as per below code.&lt;/P&gt;&lt;P&gt;the map is showing properly with the visible&amp;nbsp;layers which are provided with a SetVisibleLayers option. But the same is not reflecting in LayerList widget and default it is considering map service Default Visibility property and showing all nodes as checked even though on the map that layers are not visible.&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #000000; background-color: #ffffff; font-size: 14.4px;"&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;P&gt;I added a sample water network map service&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://sampleserver5.arcgisonline.com/arcgis/rest/services/Water_Network/MapServer" title="http://sampleserver5.arcgisonline.com/arcgis/rest/services/Water_Network/MapServer"&gt;Water_Network (MapServer)&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;var dynamicLayer = new ArcGISDynamicMapServiceLayer(url, {&lt;BR /&gt;'visible': dynamicData[key].visible,&lt;BR /&gt;'opacity': dynamicData[key].opacity &lt;BR /&gt;});&lt;BR /&gt;dynamicLayer.setVisibleLayers([-1,-1,20,21,23]);&lt;/P&gt;&lt;P&gt;map.addLayer(&lt;SPAN&gt;dynamicLayer&lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please suggest, if I am missing any code/ property which needs to set.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Arun E&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Nov 2018 21:33:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/layer-list-widget-nodes-not-synchronizing-for/m-p/770615#M1626</guid>
      <dc:creator>arunepuri1</dc:creator>
      <dc:date>2018-11-30T21:33:32Z</dc:date>
    </item>
    <item>
      <title>Re: Layer List Widget nodes not synchronizing for dynamic layer</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/layer-list-widget-nodes-not-synchronizing-for/m-p/770616#M1627</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The issue is resolved by using below code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// To get the layerInfosObj from&amp;nbsp;&lt;/P&gt;&lt;P&gt;LayerInfos.getInstance(this.map, this.map.itemInfo).then(function (layerInfosObj) {&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;layerInfosObj.traversal(lang.hitch(this, function (layerInfo) {&lt;/P&gt;&lt;P&gt;if (arrayUtils.indexOf(&lt;SPAN style="background-color: #ffffff;"&gt;dynamicLayer&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;.visibleLayers, &lt;SPAN&gt;layerInfo&lt;/SPAN&gt;.id) &amp;gt; -1) {&lt;BR /&gt;layerInfo.&lt;STRONG&gt;_setTopLayerVisible&lt;/STRONG&gt;(true);&lt;BR /&gt;} else {&lt;BR /&gt;layerInfo.&lt;STRONG&gt;_setTopLayerVisible&lt;/STRONG&gt;(false);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Dec 2018 17:45:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/layer-list-widget-nodes-not-synchronizing-for/m-p/770616#M1627</guid>
      <dc:creator>arunepuri1</dc:creator>
      <dc:date>2018-12-04T17:45:33Z</dc:date>
    </item>
  </channel>
</rss>

