Playing with the following sample, loading a webMap from a PortalItem id:
Load a basic WebMap | ArcGIS API for JavaScript 4.7
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:
WebMap | API Reference | ArcGIS API for JavaScript 4.7
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 ?
Cheers
Nicolas
Seems like it is still not fixed in 4.11... Too bad, 4.X is great.
Should an official bug be logged or reported to ESRI support ? I thought Geonet was enough for bug report.
To me MapImageLayer is a primary component and we cannot work with ArcGIS plateform because of this making the webmap concept useless:
Working with the ArcGIS Platform | ArcGIS API for JavaScript 4.10
Am I missing anything ? Should we open an idea ?
Thanks
Should an official bug be logged or reported to ESRI support ? I thought Geonet was enough for bug report.
Yes you should call esri tech support. No GeoNet is not enough to report a bug.
OK, thanks. Will do that then.
Cheers
Hey Bjorn,
I also having the same issue. So, I am directly dealing with the Feature layers or WFS using ArcGIS API for JS rather than struggling with Web Map. FYI shared webmap is also having the same limitation.
I just noticed exact same thing. visibility property on a service seems to be respected but not visibleLayers array, which is what ended up in the webmap JSON for me when I checked a few on and saved the webmap
https://pdx.maps.arcgis.com/home/webmap/viewer.html?webmap=5082731585b14a00b4e69a5c4ad1ffcd
https://www.arcgis.com/sharing/rest/content/items/5082731585b14a00b4e69a5c4ad1ffcd/data?f=json
Update: we should have this fixed for the next release (4.15), and this will be available to test on js-next sometime next week.
feedback-js-api-next/CHANGELOG.md at master · Esri/feedback-js-api-next · GitHub
Finally ! This is great news
Thanks for the follow up. Will test that on next.