Playing with the following sample, loading a webMap from a PortalItem id:
I noticed that a WebMap containing a MapService with custom layers visibility defined in AGOL (overwriting thus the default ones from the service) are not respected using arcgis js api 4.7. Layers visibility configuration is the one of the service and not the one of webmap.
I know WebMap is partially supported:
but even with a map service that has dynamic layers enabled, it is still not respected.
Is it a temporary limitation ? Maybe linked to AGOL ?