Get Layer using layer groups.
I'm using GXW to call a Geocortex Workflow (also 5 series). The first activity the workflow does is GetLayer (with activity ID maplayer) with layer id: map service name and sub layer id: the layer of the layer within the map service's REST endpoint. As a check it was then using a Log activity to ouput: ="$maplayer.sublayer=" + $mapLayer.sublayer
This was working with map viewer classic in ArcGIS Enterprise and displaying the sublayer. We've now changed to the new map viewer and introduced layer groups into the web map and this no longer works. It now says: $maplayer.sublayer=undefined
I've tried using the layer group name for GetLayer's layer id but that didn't work.
I've tried using the layer name instead of the layer id for GetLayer's sub layer id but that didn't work.
Any ideas?
-
Mark,
What I do is use AGOL Assistant of Item Manager to get the ID of the layer and use that in Get Layer =>LayerId. One other approach could be Get Map en loop trough all the layers and find the LayerID based on LayerName
0 -
Using AGO Assistant is overly complicated in my opinion and we shouldn't have to do that. In any case, I've managed to use it to get the id of the layer, which I use as the Layer Id in my Get Layer activity, mapLayer, which now returns the URL of the map service. However it still doesn't have a value for $mapLayer.sublayer.id and I need this for the Show Results and Set Layer Visibility activities.
0 -
Mark,
I agree with you but this are the only 2 ways how I see it. One other approach could be using parameters. But when you work wit Set Layer Visibility this would probaly mean a lot of parameters...
If you find a better way please let us know.
Erik
0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
3 kommentarer