In my simple JSBin example, why aren't all layers from my arcgis rest endpoint being shown?
According to the documentation, when adding a MapImageLayer to the map:
A Collection of Sublayer objects that allow you to alter the properties of one or more sublayers of the MapImageLayer. If this property is not specified, all the sublayers from the service are displayed as defined in the service. If an empty array is passed to this property then none of the sublayers from the service are displayed in the layer.
In my example, I am not specifying the sublayers property. So why aren't all of my layers being included?
I noticed that if you change the ESRI JS API version back to 4.4, it works as expected:
I also inspected the network requests and compared the 4.4 api version to the 4.8 version:
For some reason, the "Layers" parameter doesn't seem to be correctly populated in the 4.5-4.8 version of the JS api.
This breaking change in the api wasn't listed in the release notes for js version 4.5.
Thanks for any help debugging / finding a workaround for this issue.