Skip to main content

Duplicate IDs are not allowed

Comments

3 comments

  • Drew Millen
    Is "25" the name of two or more layers belonging your site?  The error message seems to indicate that there is a conflict with an existing ID, and not a conflict with a layer name but I want to be sure.

     

    Geocortex Essentials REST Elements does prevent you from adding 2 or more layers, at the exact same level, with the exact same name to a site.  If this is a layer name conflict, can you rename the conflicting layers within the map service, or add one of the conflicting layers to the map service at a different level? Note, when I say "at the same level", I'm referring to the organization of layers within group layers... in other words, I can not have 2 layrs named "Streets" as root layers within the map service; however, I can have a "Streets" layer as a root layer, and another "Streets" layer as a sublayer without conflict.   Any more insight you can provide regarding source of the conflict would be helpful (i.e., any more information you can provide as to where the number "25" came from).   Thank you.   Drew.

     

    0
  • Permanently deleted user
    I also encountered that same problem. I thought it was because I had two "Roads" layers in my msd. I removed one of the layers and attempted to add the msd to my site and it worked. One "Roads" layer was a selection of features from the original "Roads" layer. My guess is the REST manager does not like having two layers with the same name originating from the same root feature class. I am curious to know if just changing the name of one the layers would work or would I have to create a new feature class.

     

    0
  • Drew Millen
    REST Manager currently doesn't work with map services which have layers with duplicate names.  It doesn't matter which feature class they layers are generated from.   The reason for this restriction is that REST Manager references layers by their names, not their IDs (which are unique).  This is in response to issues that can arise when referencing layers by their IDs... specifically, if you reference the layers by their IDs, and then add a new layer to the map service, all layers underneath that layer will be assigned new IDs causing broken references.  This is a huge maintenance problem.  I think we've chosen the "best of two evils".   I should also mention that we are currently working on providing a better solution to the duplicate names problem.  When adding a map service, if REST Manager detects a duplicate layer it will display a message to the user and continue, skipping the duplicate layer.   I hope this provides further clarity to the issue you seem to be encountering.   Drew.

     

    0

Please sign in to leave a comment.