AnsweredAssumed Answered

Get Styles for Feature Layer in Feature Collection, Customize Layer List

Question asked by jugalpatel803 on Apr 1, 2016
Latest reply on Mar 21, 2017 by lieberg5@uwm.edu

Hey everyone, so I'm using the JavaScript API to customize an ArcGIS web app and I need to take feature layers and group them in the layer list widget. Here's the code I have that does that: Customize Layer List Widget for ArcGIS Web App Builder · GitHub

 

I can do this through the addFeatureCollection method, but when I create new groups, the feature layers in the groups don't pull in their styles and symbology. Another issue is that when I take my original feature layers and then group them into feature collections, the layer list widget shows both the grouped feature collections, and the original feature layers. Here's what my app is looking like with the code as is.

 

Here's an ungrouped feature layer that's pulling in styles correctly: Feature layers with styles.png

And here's a grouped feature collection layer that isn't pulling in it's styles:

Feature collection without styles.png

 

Does anyone know how I can get the styles for my feature layers and have the layer list widget not display the individual, ungrouped feature layers, but only the feature collections?

Outcomes