Adding a new Map Service without changing the service Id of existing services

446
1
02-05-2013 01:01 PM
FarhadNavaei
New Contributor III
Hi there,
I'm trying to add a new service to a group of existing services in ArcGIS Server 10.0. Since the new service is going to be added in a Group Layer in the middle of existing services, it changes the id of the existing services. If I want to do that, I have to change a lot of places in my code to replace the old Ids with the new ones. I was wondering if there is any way that I can create a new service withough needing to change the id of other services. Is that possible?

Thank you
0 Kudos
1 Reply
RichardWatson
Frequent Contributor
I think that the IDs are simply consecutive integers which represent the draw order in the map document.

What I do is to provide an abstraction above this.  For example, the code might need to find the layer associated with Vegetation so it looks that up and uses it rather then hard coding the number 1 everywhere.

Designing solutions around numbers which can change seem fragile.
0 Kudos