Map Service Publishing: Automatic Unique Layer ID's

1999
4
04-04-2016 02:04 PM
Status: Open
Labels (1)
SteveMiller1
New Contributor III

When, in a Data Frame Properties General tab, you check the box "Allow assignement of unique numeric IDs for map service publishing", the software could assign unique numbers to any layer that doesn't already have one, rather than assigning a -1 to everything. It requires a lot of manual tedium to go in and assign those numbers to every layer and group sublayer.  This is even more cumbersom when annotation layers are involved, and ArcMap treats every annotation value as its own layer!!

Since these numbers now don't have to change in the REST endpoint whenever the layer order is changed, or a new layer inserted, who cares what the numbers actually are, so long as they are unique.  (Think object.id's for feature classes.)

4 Comments
MichaelVolz

What version of ArcGIS are you running on?

KubaSzostak1

ArcMap 10.5.1 actualy does automatic numbering of 'Layer ID' in Layer Properties - General tab (there is nowhere -1 value). But for a complex services, wit a lot of layers, it would be great to have a tool to set 'Layer ID' for every layer in one place (I care what the numbers actually are).

MatthewRyan2

We found the automatic numbering works well except for when you have group layers. There is a bug where it will assign the same ID twice to an outer layer and inner group layer. This only happens when converting and already established MXD to "Custom Static Specified IDs" since if that is the  setting from the start when ArcMap seems to know how to roll.

KoryKramer

I'm wondering if this idea was actually a bug at the time that has since been resolved.  See https://support.esri.com/en/bugs/nimbus/QlVHLTAwMDA5MjUwNA==

KoryKramer_0-1623763963453.png

Though it sounds like there could be some cases where annotation and group layers are involved that may not work optimally.  If you're seeing specific issue in ArcMap 10.8.1 or ArcGIS Pro 2.8 could you please comment below?  Thanks