I need to publish like 40 layers as feature services to use as on ArcGIS online. Yet I am not sure which of the following is the best practice to publish feature service :
Hope someone has experience
Marwa,
It depends on how you are going to consume the services in the application. If the same situation would arise in ArcGIS Server where I would need to consume 40 layers, I would simply add them to a single map document and publish it as a single service. It is easier to manage one single service instead of multiple services.
If you use a single map document and publish the service there is an option which will allow you to preserve the layer indexes for the service.
Refer Map authoring considerations—Documentation | ArcGIS Enterprise
However, that is my point of view and like I said it is depends how you are going to consume the services.
I hope this helps!
-Shan
If you use a single map document and publish the service there is an option which will allow you to preserve the layer indexes for the service.
Refer Map authoring considerations—Documentation | ArcGIS Enterprise
I was interested in you comment about preserving layer indexes, so thanks for posting that Shan. However I don't think this work on ArcGIS Online. Publishing from ArcMap 10.5 fails if I alter the layer indexes away from 1, 2, 3... whilst Pro 2.0 only works with 1, 2, 3... or 0, 1, 2... (i.e. always have to start index numbers from 1 or 0, and have to be sequential). I was publishing new services. Anyone know if there's a way to deal with this on ArcGIS Online?
I have multi-layer feature services on ArcGIS Online, which I'm coming to regret due to, amongst other things, the layer index numbers getting changed (in a way that I don't understand yet) when I try to update data from ArcMap/Pro. This means that I then have to fix any maps and apps that are consuming the data.
Cheers,
Andy.