Unique Layer IDs in ArcGIS Server REST Service

Blog Post created by gisMelissa on Jan 18, 2018

Attending conferences can often be stressful to the introvert in me, however the knowledge gained is astronomical and incomparable to staying home and reading help files and free trainings. At times, you attend a session where the speaker seems to be preaching to the choir. Then suddenly, she says something that triggers that light bulb placed over your head to spark on and surely blind everyone in the room. I had one of these moments recently at the GIS-Pro Conference in Jacksonville. You see, I spent days in GIS Leadership sessions and frankly needed a breather from all the strategic planning talk. So, I headed over to a session that was sure to be techy.

In this session, I gained knowledge of what may merely look like a small check box to many, but to me it was a game-changer!


What?! You can do this?! And then I find out that this has been there since 10.3.

Details, details, details.

Now that I have implemented this in all my ArcGIS Server Services, I will share the knowledge with the world. Or just basically document it for my own memory lapses in the future.

In ArcMap (Now, I’m not too sure how/where/if this is handled in ArcGIS Pro), double-click your “Layers” (c’mon, like you really renamed it) heading to get to the Data Frame Properties. Right there in the first tab (“General”), all the way to the bottom, it has been staring at you for years and you’ve been ignoring this extremely powerful and necessary option. You check this on – that’s it. Well, sort of.


Now if your service is already in production you’ll want to go grab a screenshot of the REST URL page to take note of the current index numbers.



Sometimes, and I’m not sure of the reasons, it will then change all of the indices. To control the index number of each layer you go to each Layer’s Properties and you will now see a box for LayerID assignment that you can type into. (No, this hasn’t been staring at you all along, it only turned on with the “Allow assignment of unique numeric IDs for map service publishing” option.) Once you are happy with your settings, you can republish your service.

This allows you to move layers around, add layers or even retire layers from your map/service without having to worry about people that are pointing to a particular layer (by index number) in their own maps and apps. Brilliant!


Kudos to Anna Verrill for enlightening me!