I have a MapImageLayer with 3 sublayers as fallows. But the sublayers are not available to toggle its visibilty in layerlist widget. Can some one help please:
ZoniningLayer = new MapImageLayer({
id:"ZoningLayer",
url: urlZoning,
sublayers: [{
title: "Commercial",
id: 2,
visible: true,
listMode: "show",
popupTemplate: {
title: "{PERMIT}",
content: "{COV}"
}
}, {
title: "Residential",
id: 1,
visible: true,
listMode: "show",
popupTemplate: {
title: "{DES}",
content: "{MAX}"
}
}, {
title: "Streets",
id: 0,
visible: true,
listMode: "show",
popupTemplate: {
title: "{PERMIT}",
content: "{COV}"
}
}
]
});
var layerList = new LayerList({
view: app.view
});
app.view.ui.add(layerList, {
position: "top-right"
});
layerlist dont show sublayer visibilty toggle