AnsweredAssumed Answered

QT Runtime Sublayers List?

Question asked by jr9128 on Jun 5, 2018
Latest reply on Jun 6, 2018 by LDanzinger-esristaff

Hello.  I have made use of the ArcGISMapImageSublayer QML type to display a list of available layers that can be turned on and off.  This at a high level works fine.  What I am wondering is, how does one build that layer list if your map service has additional levels of sublayers?  For example, I have a feature layer defined as "Central Offices".  Then this layer has two sublayers called "Company Central Offices" and "Nationwide Central Offices".  Whenever I set the ArcGISMapImageSublayer as my datamodel, all that gets returned is the parent "Central Offices".  What I'd like is to have in my layer list a parent check box with "Central Offices" that turns them all off or on, and two nested checkboxes underneath that turns only "Company Central Offices" or "Nationwide Central Offices" off or on.

Has anyone done this?  Is there a way in QML to define the datamodel and delegate to do this?