I saw a portal item https://www.arcgis.com/home/item.html?id=690d7aecc9d643b2825e75587992040e and want to add it to my map (arcgis javascript API 4.11) using the following codes but it failed:
Layer.fromPortalItem({ portalItem: item }).then(function(layer) { webmap.add(layer);
});I think this is due to the portal item has layer index in the URL and the Javascript API Layer.fromPortalItem function cannot handle this. The portal item display fine in arcgis online map viewer.
Can anyone help with this?