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.
So the custom widget is just adding in some new FeatureLayers and setting their 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?
Example of adding a layer:
layer = new FeatureLayer({
title: configLayer.title,
url: configLayer.url,
returnZ: true, //Need to manually set as it is not pulled in from the service
definitionExpression: "ID = 66544" //This is actually set in code just below
});
this.sceneView.map.add(layer);
Things I have tried:
FYI, the Ledged widget updates just fine with the layers title.
Thanks a lot for any ideas!
Yep. this.sceneView.map.add and .remove
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?
Ryan,
Correct I am testing use WAB Developer 2.9.
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!
Ryan,
10.6.1 is already out so that would move you to 2.7 at least, worth a try.