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-
But other invisible sublayers won't be listed in the LayerList widget. Is there any workaround?
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.