MapImageLayer does not honor default visibility of sublayers defined in a map service using ArcGIS API for JavaScript 4.4.

828
1
07-19-2017 08:06 AM
mattprice
New Contributor II

I have submitted the following bug for this issue: [BUG-000106674: MapImageLayer does not honor default visibility of sublayers defined in a map service using ArcGIS API for JavaScript 4.4.] The workaround is to programmatically set the sublayer's visibility as follows:     var layer = new MapImageLayer({                 url: "http://",                 sublayers: [{                     id: 30,                     visible: true                 }]             }); You will be able to track the status of this bug via MyEsri https://my.esri.com. Thank you for bringing this issue to our attention. 

FYI-

Tags (1)
1 Reply
YueZhou1
New Contributor

But other invisible sublayers won't be listed in the LayerList widget. Is there any workaround?

0 Kudos