Hello there
I want to load all layers of a Hosted Feature service using the JS Api 4. It is possible to add a single layer to the map like this:
layer = new FeatureLayer({
portalItem: {
id: portalItemId
}
layerId: 0
});
map.add(layer);
Is there a way to list, or count all layers within a Hosted Feature Service (using JS API 4), so each of them could be added using new FeatureLayer?
Or is there a direct way to add all layers of a Hosted Feature Service to the map?
Kind Regards
Lukas