How does the command AddCatlaogLayer work? Can it be used programmatically?
I have a site setup to use a layer catalog site. I've setup some "I want to" menu options to test out the various catalog layer commands. The two commands that work are ShowLayerCatalog and ClearLayerCatalogLayers.
The commands that do not work are AddCatalogLayers and RemoveLayerCatalogIds. I get the following error:
The following Layer Catalog items failed to initialize. They may have been renamed or you no longer have sufficient permissions to access these items: 1, 2
The command parameter states that it takes a comma delimited string of layer IDs. May question is what layer ID? If I use a layer ID from a service in the catalog wouldn't there be possible to have duplicate layer IDs? Is there a specific catalog layer ID somewhere that I haven't found?
I was just testing these commands from the menu. In the end I would like to call them from a workflow and/or a module in the future.
-
Hello Tyson,
The "layer ID" to use with this command should have the following format:
SiteID.MapServiceID.DisplayName
We have noted that our documentation for this command is lacking and have it filed in our bug tracker to fix in the future.
Hope that helps,
Amanda0 -
Just posted another example of solution on this post https://support.geocortex.com/essentialsGSCForumDetail?id=0D5f200006aOf9HCAS&main-nav=essentials&sub-nav=forum
Specifically, if layer catalog's site ID is "MyLayerCat", and map service ID is "0", and I'm adding a layer named "Boundaries" and another layer named "Towns" then the value in the Command Parameter should be...
"MyLayerCat.0.Boundaries,MyLayerCat.0.Towns".0
Please sign in to leave a comment.
Comments
2 comments