When defining the sublayer collection of a MapImageLayer using a MapService in which sublayer default visibility is false, the MapImageLayer ignores the visible parameter defined in the constructuror.
Example: all layers in the MapService have a default visibility of false. MapImageLayer defined with two sublayers set to visible:true. SubLayer visible param is ignored. Uncomment the zoningLayer.when() function, which explicitly sets sublayer visibility, layer draws.
Example two: Again, MapImageLayer with two sublayers. One sublayer with default visibility false in the MapService, the other with default visibility true in the map service. One sublayer draws, the other does not.
Is this the expected behaviour? Seems to me that if visibility is defined as true in the constructor, the sublayer should render on load without the extra step of setting visibility on load. Otherwise, why define visibility in the constructor?