Good Morning, Has anyone had success expanding the Layer List Widget by 1 Level so the sublayers of a map service are only showing?
Good Morning, Has anyone had success expanding the Layer List Widget by 1 Level so the sublayers of a map service are only showing?
John,
Here is the solution:
open the LayerListView.js and find the layerTitleTdNode click event (@ line 272) and add these lines after it @ line 279
If you want to change this for all apps you produce in the future then change this file: client\stemapp\widgets\LayerList\LayerListView.js
If you want to change on specific app then change this file:server\apps\[app#]\widgets\LayerList\LayerListView.js
Lines 10 - 17
//bind event this.own(on(layerTitleTdNode, 'click', lang.hitch(this, this._onRowTrClick, layerInfo, imageShowLegendNode, layerTrNode, tableNode))); if(level === 0){ setTimeout(lang.hitch(this, this._onRowTrClick, layerInfo, imageShowLegendNode, layerTrNode, tableNode), 300); }
Hi Robert,
I'm using WABDE 2.6. I tried to insert the code you suggested (line 213 instead of 279) but am seeing the Layer List widget now completely blank/empty. Any suggestion you can provide would be greatly appreciated. Below is screenshot of the code in my LayerListView.js. My goal is to expand only the first/initial level of the map service and not the subsequent/all groupings.
Thanks,
Andrew
John,
Here is the solution:
open the LayerListView.js and find the layerTitleTdNode click event (@ line 272) and add these lines after it @ line 279
If you want to change this for all apps you produce in the future then change this file: client\stemapp\widgets\LayerList\LayerListView.js
If you want to change on specific app then change this file:server\apps\[app#]\widgets\LayerList\LayerListView.js
Lines 10 - 17