<?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 - Last Layer Dynamically Added is &amp;quot;Untitled layer&amp;quot; in Web AppBuilder Custom Widgets Questions</title>
    <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/layer-list-last-layer-dynamically-added-is-quot/m-p/788994#M3903</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yep. this.sceneView.map.add and .remove&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Sep 2018 18:00:28 GMT</pubDate>
    <dc:creator>RobertScheitlin__GISP</dc:creator>
    <dc:date>2018-09-04T18:00:28Z</dc:date>
    <item>
      <title>Layer List - Last Layer Dynamically Added is "Untitled layer"</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/layer-list-last-layer-dynamically-added-is-quot/m-p/788984#M3893</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Running on the WAB built into Portal 10.6 (think that is WAB 2.6) and have a Local Scene added to an app. Used the GUI to create the app and add the widgets. Built out most the custom widget but have a few issues, one of which is with the Layer List not updating properly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the custom widget is just adding in some new&amp;nbsp;FeatureLayers and setting their&amp;nbsp;definitionExpressions (example below). The Layer List seems to refresh fine for all the layers except for the last. I have tried a variable number of layers added and it is always only the last one. The last layer shows as "Untitled layer" in the list and the visibility toggle doesn't even work. The data from the layer shows up though. Any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example of adding a layer:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;layer = new FeatureLayer({&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;title: configLayer.title,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;url: configLayer.url,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;returnZ: true, //Need to manually set as it is not pulled in from the service&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; definitionExpression: "ID = 66544" //This is actually set in code just below&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;});&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;this.sceneView.map.add(layer);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Things I have tried:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;making sure the layers were loaded:&amp;nbsp;layer.load();&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word;"&gt;making sure the layers were refreshed:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word;"&gt;layer.refresh();&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;get an instance of the WidgetManager, find the LayerList and refresh()&lt;/LI&gt;&lt;LI&gt;this.sceneView.extent = this.sceneView.extent; (saw this potential trick in another post)&lt;/LI&gt;&lt;LI&gt;Add a dummy layer at the end and then remove after "layerview-create"&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FYI, the Ledged widget updates just fine with the layers title.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot for any ideas!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Aug 2018 00:44:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/layer-list-last-layer-dynamically-added-is-quot/m-p/788984#M3893</guid>
      <dc:creator>RyanCoodey</dc:creator>
      <dc:date>2018-08-31T00:44:18Z</dc:date>
    </item>
    <item>
      <title>Re: Layer List - Last Layer Dynamically Added is "Untitled layer"</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/layer-list-last-layer-dynamically-added-is-quot/m-p/788985#M3894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ryan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;Can I see the loop code that you are adding these layers in?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Aug 2018 12:48:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/layer-list-last-layer-dynamically-added-is-quot/m-p/788985#M3894</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2018-08-31T12:48:09Z</dc:date>
    </item>
    <item>
      <title>Re: Layer List - Last Layer Dynamically Added is "Untitled layer"</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/layer-list-last-layer-dynamically-added-is-quot/m-p/788986#M3895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.esri.com/migrated-users/3101"&gt;Robert Scheitlin, GISP&lt;/A&gt;‌, for sure, thanks a lot for the help. Here is the entire function (not fully tested or finished as trying to get past this issue):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;applyButtonClicked: function () {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;//Set expression on layers and add any missing layers&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;for(i in this.config.layers)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;configLayer = this.config.layers&lt;I&gt;;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//Get layer matching config layer&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;layer = null&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//Get layer if already exists in map&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for(j in this.sceneView.map.allLayers.items) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;currentLayer = this.sceneView.map.allLayers.items&lt;J&gt;;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(currentLayer.title == configLayer.title)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;layer = currentLayer;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//Create layer if it does not already exist&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(layer == null) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;layer = new FeatureLayer({&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;title: configLayer.title,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;url: configLayer.url,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;id: "TestLayer_" + i, //Doesn't seem to matter if this is set&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;returnZ: true //Need to manually set as it is not pulled in from the service&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;});&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//Add new layer to map&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;this.sceneView.map.add(layer);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//Clear any previous expressions&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;layer.definitionExpression = configLayer.query;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//Build expression&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//Set direct input values (currenlty must be filterType: = or like)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(configLayer.hasOwnProperty("inputIndexs")) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for(j in configLayer.inputIndexs)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;layer.definitionExpression = layer.definitionExpression.replace("{" + j + "}",&amp;nbsp; document.getElementById(configLayer.inputIndexs&lt;J&gt; + "TextBox").value);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//Set lookups from other layer values (currenlty must be filterType: in)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;else if(configLayer.hasOwnProperty("layerIndexs")) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for(j in configLayer.layerIndexs) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for(k in this.sceneView.map.allLayers.items) //Find the layer to query {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;currentLookupLayer = this.sceneView.map.allLayers.items&lt;K&gt;;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//currentLookupLayer.refresh();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(currentLookupLayer.title == this.config.layers[configLayer.layerIndexs&lt;J&gt;.index].title) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;query = currentLookupLayer.createQuery();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;query.outFields = [configLayer.layerIndexs&lt;J&gt;.field];&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;currentLookupLayer.queryFeatures(query).then(lang.hitch(layer, function(result) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;valueList = ""&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for(l in result.features) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(l &amp;gt; 0)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;valueList += ",";&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;valueList += result.features&lt;L&gt;.attributes[Object.keys(result.features&lt;L&gt;.attributes)[0]];&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;this.definitionExpression = this.definitionExpression.replace("{" + j + "}", valueList);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}));&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;break;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR /&gt;},&lt;/L&gt;&lt;/L&gt;&lt;/J&gt;&lt;/J&gt;&lt;/K&gt;&lt;/J&gt;&lt;/J&gt;&lt;/I&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 02 Sep 2018 16:40:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/layer-list-last-layer-dynamically-added-is-quot/m-p/788986#M3895</guid>
      <dc:creator>RyanCoodey</dc:creator>
      <dc:date>2018-09-02T16:40:05Z</dc:date>
    </item>
    <item>
      <title>Re: Layer List - Last Layer Dynamically Added is "Untitled layer"</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/layer-list-last-layer-dynamically-added-is-quot/m-p/788987#M3896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ryan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;When I add a new layer to the map I always use the "name" property and the private "_titleForLegend" property too.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 02 Sep 2018 20:50:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/layer-list-last-layer-dynamically-added-is-quot/m-p/788987#M3896</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2018-09-02T20:50:26Z</dc:date>
    </item>
    <item>
      <title>Re: Layer List - Last Layer Dynamically Added is "Untitled layer"</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/layer-list-last-layer-dynamically-added-is-quot/m-p/788988#M3897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tried setting both "name" and "_titleForLegend" but same issue unfortunately. Thanks so much for the idea though!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 02 Sep 2018 23:22:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/layer-list-last-layer-dynamically-added-is-quot/m-p/788988#M3897</guid>
      <dc:creator>RyanCoodey</dc:creator>
      <dc:date>2018-09-02T23:22:01Z</dc:date>
    </item>
    <item>
      <title>Re: Layer List - Last Layer Dynamically Added is "Untitled layer"</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/layer-list-last-layer-dynamically-added-is-quot/m-p/788989#M3898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ryan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;I don't work with 3D, but looking through some code I would try add this:&lt;/P&gt;&lt;P&gt;topic.publish('sceneViewChanged', &lt;SPAN style="background-color: #ffffff;"&gt;this.sceneView&lt;/SPAN&gt;); after adding new layers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Sep 2018 12:59:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/layer-list-last-layer-dynamically-added-is-quot/m-p/788989#M3898</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2018-09-03T12:59:00Z</dc:date>
    </item>
    <item>
      <title>Re: Layer List - Last Layer Dynamically Added is "Untitled layer"</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/layer-list-last-layer-dynamically-added-is-quot/m-p/788990#M3899</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tried adding that in a few different places, still no luck unfortunately &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/sad.png" /&gt;. Thanks for the idea though!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Sep 2018 15:54:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/layer-list-last-layer-dynamically-added-is-quot/m-p/788990#M3899</guid>
      <dc:creator>RyanCoodey</dc:creator>
      <dc:date>2018-09-04T15:54:14Z</dc:date>
    </item>
    <item>
      <title>Re: Layer List - Last Layer Dynamically Added is "Untitled layer"</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/layer-list-last-layer-dynamically-added-is-quot/m-p/788991#M3900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;After playing around with it some more I think it is a bug with the LayerList. I added a second button to the widget UI, and when that is clicked would remove the last layer from the map. After removing a layer, the next to last changes to "Untitled Layer". So its like the last is always going to be that. I'm thinking to open a support ticket with ESRI to confirm this is a bug. A workaround would still be nice though.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Sep 2018 17:13:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/layer-list-last-layer-dynamically-added-is-quot/m-p/788991#M3900</guid>
      <dc:creator>RyanCoodey</dc:creator>
      <dc:date>2018-09-04T17:13:43Z</dc:date>
    </item>
    <item>
      <title>Re: Layer List - Last Layer Dynamically Added is "Untitled layer"</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/layer-list-last-layer-dynamically-added-is-quot/m-p/788992#M3901</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ryan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;I just did some testing by adding a couple of layer from a widget end then removing one after 30 seconds and I did not see that behavior.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Sep 2018 17:52:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/layer-list-last-layer-dynamically-added-is-quot/m-p/788992#M3901</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2018-09-04T17:52:57Z</dc:date>
    </item>
    <item>
      <title>Re: Layer List - Last Layer Dynamically Added is "Untitled layer"</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/layer-list-last-layer-dynamically-added-is-quot/m-p/788993#M3902</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hmm, the plot thickens. And you did that via "&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: arial,helvetica,'helvetica neue',verdana,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;sceneView.map&lt;/SPAN&gt;"?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Sep 2018 17:59:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/layer-list-last-layer-dynamically-added-is-quot/m-p/788993#M3902</guid>
      <dc:creator>RyanCoodey</dc:creator>
      <dc:date>2018-09-04T17:59:00Z</dc:date>
    </item>
    <item>
      <title>Re: Layer List - Last Layer Dynamically Added is "Untitled layer"</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/layer-list-last-layer-dynamically-added-is-quot/m-p/788994#M3903</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yep. this.sceneView.map.add and .remove&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Sep 2018 18:00:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/layer-list-last-layer-dynamically-added-is-quot/m-p/788994#M3903</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2018-09-04T18:00:28Z</dc:date>
    </item>
    <item>
      <title>Re: Layer List - Last Layer Dynamically Added is "Untitled layer"</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/layer-list-last-layer-dynamically-added-is-quot/m-p/788995#M3904</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I removed all the code and left just two "add" layers both with hardcoded values (pasted below). Still having the problem. Tried the same code in the startup function too. Also created a new local scene in the Portal with no initial layers and set the web app to use that. I am using Portal 10.6, assuming you are using the stand alone WAB?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV&gt;applyButtonClicked: function () {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;layerOne = new FeatureLayer({&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;title: "one",&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;url: "&lt;A href="https://gisservices.aeraenergy.com/arcgis/rest/services/Global/Wellbore/FeatureServer"&gt;https://gisservices.domain.com/arcgis/rest/services/Global/Service1/FeatureServer&lt;/A&gt;", //Fudged the URL to hide&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;id: "one",&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;name: "one",&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;_titleForLegend: "one"&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;});&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;this.sceneView.map.add(layerOne);&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;layerTwo = new FeatureLayer({&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;title: "two",&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;url: "&lt;A href="https://gisservices.domain.com/arcgis/rest/services/Global/Service2/FeatureServer"&gt;https://gisservices.domain.com/arcgis/rest/services/Global/Service2/FeatureServer"&lt;/A&gt;,&amp;nbsp;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 25.95px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;//Fudged the URL to hide&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;id: "two",&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;name: "two",&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;_titleForLegend: "two"&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;});&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;this.sceneView.map.add(layerTwo);&lt;BR /&gt;},&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Thanks for working through this one with me!&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Sep 2018 19:15:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/layer-list-last-layer-dynamically-added-is-quot/m-p/788995#M3904</guid>
      <dc:creator>RyanCoodey</dc:creator>
      <dc:date>2018-09-04T19:15:22Z</dc:date>
    </item>
    <item>
      <title>Re: Layer List - Last Layer Dynamically Added is "Untitled layer"</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/layer-list-last-layer-dynamically-added-is-quot/m-p/788996#M3905</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ryan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Correct I am testing use WAB Developer 2.9.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Sep 2018 19:39:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/layer-list-last-layer-dynamically-added-is-quot/m-p/788996#M3905</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2018-09-04T19:39:42Z</dc:date>
    </item>
    <item>
      <title>Re: Layer List - Last Layer Dynamically Added is "Untitled layer"</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/layer-list-last-layer-dynamically-added-is-quot/m-p/788997#M3906</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So the good news is this is likely fixed in a later WAB, the bad is Portal will always be behind in releases to WAB. I believe Portal 10.6 is currently deployed with 2.6. Not sure how tightly coupled WAB is with Portal and the options to upgrade it on the side. I'll reach out to ESRI support and see what they say. Thanks for everything Robert!&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Sep 2018 19:50:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/layer-list-last-layer-dynamically-added-is-quot/m-p/788997#M3906</guid>
      <dc:creator>RyanCoodey</dc:creator>
      <dc:date>2018-09-04T19:50:58Z</dc:date>
    </item>
    <item>
      <title>Re: Layer List - Last Layer Dynamically Added is "Untitled layer"</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/layer-list-last-layer-dynamically-added-is-quot/m-p/788998#M3907</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ryan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; 10.6.1 is already out so that would move you to 2.7 at least, worth a try.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Sep 2018 19:53:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/layer-list-last-layer-dynamically-added-is-quot/m-p/788998#M3907</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2018-09-04T19:53:41Z</dc:date>
    </item>
  </channel>
</rss>

