Popup is not displayed correctly with command “map.add-layers”
Hello,
We have a workflow that inserts content from the portal using the “map.add-layers” command. However, the popups that were configured in ArcGIS Pro are not displayed here, but only a default field list is displayed as a popup.
If the same service is used in Vertigis Studio Web via the function “Add layers from an ESRI portal” (“portal.choose-layers”,“map.add-layers"), then the popups that are configured in ArcGIS Pro are displayed.
We have the Studio Web version 5.33 and the current Workflow version 5.43.
Does anyone know what to set in the workflow so that the popups appear as defined in ArcGIS Pro?
Best regards
Franco
-
Please add this as an idea, I'll vote for it :) I've been running into the same issue, which made it hard for me to decide which route to pick (the command through a Workflow, or the “Add from Portal”-function). I preferred the Workflow-flexibility.
Luckily I found a work around. With the command mapp.add-layers you can also add a layerDefinition (see here). The trick is to go into AGO-assistant, find the json of the service, within that JSON find the layerDefinition, and then copy it and add it to the command parameter in your Workflow. The argument should then look something like this:
={ "layers": [ { "layerType": "ArcGISFeatureLayer", "url": "https://xxx/MapServer/0", "title": "LayerName 2025", "opacity": 0.5, "layerDefinition": {....} } ] }This also gives you the flexibility to change the symbology and the maptips on the fly, even if you don't host the service yourself. When using it this way (with external services) my advice is to add them to a WebMap, configure the symbology and maptips as you like, and then get the layerDefinition from the JSON of the WebMap through AGO-assistant (instead of the service itself).
Anyway, this is a cumbersom workaround, and I think it would be a great idea if the standard would be that the command applies the layerDefinition of the service.
Good luck! Yannick
0 -
Hello Yannick,
thank you very much for the idea. I will definitely give it a try.
We have hosted our services ourselves, so we can access them easily.It is a possibility but the original problem remains. Something must be different in the workflow command “maps.add-layers” than in Studio Web, although it is the identical command. The popups just get lost, the rest is there.
Thanks again for aour help and idea
0 -
Hello everyone,
we have now found a solution.
In Vertigis Studio Workflow there is an activity pack “ArcGIS Maps SDK for Javascript”. Here there is an activity “Create layer from Portal Item”. If this activity is used first and then the activity “add layer to map”, the popups are also displayed correctly.At first we used the command “maps.add-layers”, which did not work.
I hope this helps anyone who has a similar problem.
Best regards
Franco
0 -
Hi Franco,
I tried your suggestion and it works pretty well, but one thing I noticed is that the ‘Remove Layer’ command is not present in the context menu for the newly added layer. Therefore, users don't have an ability to remove the layer if they choose. That differs from the behavior when using the command to add a layer.
Should see it like this but that option is missing

Are you seeing this behavior also?
0 -
Hello Zorba,
Yes, I am experiencing the same “error”. The button to remove the layers is missing. I haven't even noticed that yet. Unfortunately, I don't know how to activate it.
best regards
Franco
0
Vous devez vous connecter pour laisser un commentaire.
Commentaires
5 commentaires