sublayer visibility in layerlist widget not available !!!

281
0
11-25-2020 01:38 AM
cadgism
Occasional Contributor

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 togglelayerlist dont show sublayer visibilty toggle

 

0 Kudos
0 Replies