As it has been mentioned many times, grouping is not a option with feature layers.
I have noticed grouping works if you publish with map image layer type. Can anyone tell me the main difference and if i was to publish all my layers as map image instead of feature layers, what issues could occur?
The map service sends an image that is rendered on ArcGIS Server to the client and the feature service sends the raw data for the client to render. You typically get better speed and can use more advanced symbology with a map service, at the cost of client customization and lack of offline use. The feature service allows for more customization on the client side and offline caching if needed, at the cost of speed and limited symbology on the web. Also, feature services always provide a better looking map export because you are using the vector data instead of a image from the map service. The pixelation of map services on map exports is even more noticable to me when using a vector basemap as the background.
One issue that I have come across with map services is if the visibility range is set at the time of publishing then the client cannot change the visibility range of the map service. At least that is what happens at ArcGIS Enterprise 10.8.1.
The great new is that the next version of the Map Viewer will support grouping feature services together in the web map. I hope this helps.
Map services are good for displaying spatial data over the web. Feature service extends the capabilities of a map service by enabling feature access. This allows feature services to be edited after they are published, as well as allowing users to change the symbology of the features on the server side, rather than in the source data.
A map image layer is simple a layer present in a map service, so I am using the more broad term here.
For more information, you can check out the documentation pages:
Hope this helps!
Thanks guys really appreciate it.
There will be no requirements for editing for these layers or changing the symbology. Do you think publishing as a map service will help as a workaround to the grouping issue?
Grouping is such a major issue, I am trying to figure out the best alternative to resolve this issue.
Based on your workflow requirements, it looks like a map service would be the way to go. You can have multiple layers in your ArcMap Document/ArcGIS Pro project, and publish the entire map as a map service to ArcGIS Server, with all the layers included. During publishing, you can either set the map service to draw dynamically from the data, or from a cache of pre-generated tiles. The tiles take up a good deal of space in your arcgiscache directory, but allow for faster rendering if demand for the service is high.
I would recommend you take a look at the following documentation:
Currently, publishing as a map service is the only way to have grouped layers in a web map in ArcGIS Online or ArcGIS Enterprise. I must use map services for all of my organizations utilities layers so my users can turn off entire groups of utilities with one click. The problem with that is I have wound up having to use map services for all the other layers in the web maps with the utilities so that I could order the layers the way I needed them to be. The current Map Viewer puts all feature services on top of the map services. So if you have another layer in your web map that needs to be below your grouped map service it must be a map service as well.
You can absolutely take map services offline. The export operation on the map service allows users to create offline packages containing the cached service, so long as the necessary properties are set. For more information on this process, see: https://enterprise.arcgis.com/en/portal/latest/use/take-maps-offline.htm