JS 4.11
I am looking for a way to loop through the layers before they get added to my LayerList object and hide some layers.
I can use listItemCreatedFunction: function (event) { } to access the layers and sublayers, but setting layer items visible to false does not work.
I tried using LayerListViewModel but I could not find documentation on the class, and it just blows up on function not found.
const layerListViewModel = new LayerListViewModel()({
view: view
});
layerListViewModel.listItemCreatedFunction = function (event) {
}
https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-LayerListViewMo...