How do I hide the visibility of related tables in the LayerList?

3895
2
08-28-2015 01:56 PM
EmOh
by
New Contributor

I'd like to clean up my Layer List to hide the visibility of several related tables published in a map image layer service.  Does anyone know how to do this? If I'm unable to hide the visibility of these tables, is there a way to group the related tables so the layer list isn't quite so long?

0 Kudos
2 Replies
JunshanLiu
Occasional Contributor III

Sorry, the layer list widget doesn't have this feature for now.

0 Kudos
DanNorman
Occasional Contributor

Do you mean there is also no programmatic solution or just not an out of the box user interface solution? for instance we can hide regular spatial layers like what is pasted below from thread Re: Can I remove layers from my LayerList in a WAB created map?

We have not been able to get this to work for tables though

pasted frinm

In your app, you have the widgets folder, and inside that you find the LayerList folder. In there, there's a config.json. For now it should look like :

"showLegend": true 

}

Supposing you want to hide the "zoom in" layers, change it into :

"showLegend": true

"hide" : ["IOT_1553_8354", "IOT_1318_5629"

}

Then you open LayerListView.js. Line 50 looks like :

drawListNode: function(layerInfo, level, toTableNode) {

Change it into :

drawListNode: function(layerInfo, level, toTableNode) { 

if(this.config.hide && this.config.hide.indexOf(layerInfo.id) >= 0) { 

return;