duplicate layer names in LayerList (Service and Sublayer)

431
1
08-20-2019 08:31 PM
by Anonymous User
Not applicable

Jianxia Song & WAB Team is there an elegant programmatic way, to hide the top-level name for a service in the WAB layer list?  So for example I won't have Schools - Schools, or Roads - Roads, and Parcels - Parcels.  I had done a proof of concept using only CSS a while back but it falls apart and gets ugly when Add Data or other widgets add layers.  

  

Basically I want to have each layer as its own service. Mostly to load balance between them. And because then LayerList allows for transparency, reordering and other controls (which are not available at sublayer, wish they were). 

But I don't want duplicate layer names. Is there a way to do this with JS, the API, or WAB? To remove the service name duplicate entry in LayerList, and also Legend and Print or perhaps even generally throughout WAB?  In LayerList I want to hide the name and also checkbox and arrow. 

I can't add each sublayer individually to the webmap as sublayers from one service to the webmap one by one because then it will be a feature layer, which I don't use because of performance. If they could simply fix that in the next-gen AGOL where adding a serviceurl.com/arcgis/rest/service/layername/0 or /1 and it would add as a agsdynamiclayer/map image layer that would be a good solution. But that will probably only arrive in next-gen AGOL (hopefully, that will be possible to re-group sublayers when Grouping of Layers as an Idea is implemented)   And I would still be think Server's load balancing could be an issue as I have reviewed the gis.com performance Wiki but still see services apparently get bogged down even before hitting max instances, and seem to do better when split out. 

Tags (1)
0 Kudos
1 Reply
Jianxia
Esri Regular Contributor

Kevin, thanks for the write-up. Unfortunately, I don't have a simple answer. Agree that the Layer List issue should be addressed systematically.