Hello everyone I'm trying to figure out how to use
portalItem.update()
Unfortunately I can't find any documentation on the structure on how a layer is required.
Currently I'm trying to add a layer, in particular this layer:
https://ngmmi.maps.arcgis.com/home/item.html?id=c91bdcb084374ae9851c5986dad6cda7
I'm fetching the layer information using PortalGroup
portalGroup.queryItems()
After this I'm adding the layer into the my current webmap and everything seems to work.
But after I'm saving the new webmap using the api below and passing the new operational layers with the newly added layer.
portalItem.update()
The layer is not appearing into the legend for some reason.
My main problem is the lack of documentation and structure with the portalItem.update() api
Here is the docs I've research into:
https://developers.arcgis.com/rest/users-groups-and-items/update-item.htm
Unfortunately "text" field has no documentation 😞