We have the following situation:
In GeoWeb old (Geocortex Manager) it was possible to copy a map service with configurations on map layers (popups, fields) from one website to another.
That was really practical because there are map services with many map layers and extensive configuration.
Question: The layout and configuration of a map service for a VertiGIS Studio website takes place in a WebMap in AG Portal.
Is it possible in AG Portal to copy a map service from a WebMap one-to-one?
In other words, a copy with full configuration like popups, fields, etc.
The question is not about copying a WebMap as a whole!
Note: We haven’t found a way to do this in AG Portal in a WebMap yet.
It seems like in AG Portal 11.5 the configuration must be completely rebuilt.
We see this as a step back compared to the map in the old Geocortex Manager, where a map service with configuration could be imported with one click.
With kind regards,
Antoon and John
city of Eindhoven, Netherlands
Today i've been looking further into this issue. I've found that for feature layers it is possible to save and re-use them in other webmaps (with configuration). The thing is that within the city of Eindhoven we mostly make use of mapservices, rather then feature services. These mapservices can have many layers with extensive configuration and therefore it takes much effort to 'copy' this into another webmap. The few feature layers we have are hardly ever copied to other webmaps.
You can accomplish this on the Portal server itself:
Now it is a simple matter of copy/pasting the correct sections.
Use this now and then for the same reason; ran into a limitation when adding a wms to Portal:
OGC WMS group layers are not supported.
Which I didn't know of until I had already created a wms (in a different application) with some 150 layers in group and subgroup layers. With a few sample layers in the webmap and pretty print the structure was quite obvious. So edit, save and refresh the browser and the change is effective.
Note that there are layerid tags with (pseudo)random alphanumeric strings. Don't know whether they have to be unique, but just to be sure I do a +1 in the number part of the layerid when duplicating sections.
I think AGOL Assistant (https://ago-assistant.esri.com) might help with this. You can copy the full map service entry (including all sublayer popup/field/symbology configs) from the operationalLayers array in one WebMap and paste it into another.
Thank you for the quick responses!
I looked into both suggestions, but I am not yet convinced of their practicality.
The first idea, opening and editing the JSON file directly on the Portal server, turned out to be unworkable for me. Currently, there is no suitable text editor such as Notepad++ available on the Portal server that allows the JSON file to be viewed and edited in a clear and structured way.
The second suggestion, using the AGOL Assistant, works much better for me. This is because the JSON file of the web map is presented in a much more readable and organized format. However, I still see some risks when using the AGOL Assistant:
On the other hand, I have noticed that a syntax check is performed on the JSON file and that suggestions are provided when potential errors are detected. Do others recognize these risks, or are there additional risks associated with updating item JSON files through the AGOL Assistant?
Personally, I think the AGOL Assistant can be a useful workaround, provided that backups of the JSON files are created beforehand. This would make it possible to quickly recover from any mistakes. However, I do not consider it a true replacement for the workflow that existed in the old Geocortex Manager, where you could directly import a map service and its configuration from another map within the application itself.
On the following page: https://enterprise.arcgis.com/en/portal/11.5/use/duplicate-save-layers.htm I found that it is possible to save and duplicate layers. However, this only applies to hosted feature layers and not to standard map services. The documentation states that a future version of Map Viewer will support saving and duplicating additional layer types. However, I found the same statement in the 12.1 documentation, which means this functionality is still not available for standard map services.
I hope this capability will be added soon, so that a faster and less error-prone method becomes available for copying map services between web maps. As i said before: in the old Geocortex Manager, this was a simple operation!
With kind regards, Antoon
city of Eindhoven, Netherlands
Hi Antoon,
I understand your concerns, but I think the workflow is simpler than it appears. Let me break it down.
The safe approach - work on copies first:
Before touching your production WebMaps, use "Save As" in Map Viewer to create copies of both the source and target WebMaps. Do all your work on those copies first.
The cleanest workflow:
Rather than manually worrying about unique IDs, here's the trick:
What about itemId and url?
The itemId is the Portal item ID of the map service - the same one you see in the URL bar when you open the service item in Portal (portal/home/item.html?id=7bb5f22e...). If you're copying the same service between WebMaps (same Portal, same service), then:
If however you're pointing to a different service in a different environment, then you'd update the url and itemId. Also, AGOL Assistant has a built-in "Update the URLs of Services in a Web Map" you need to update the URL there too.
I've done similar migrations with Dashboards and Experience Builder and would be happy to connect and walk through this together if you'd like. Feel free to reach out!
Kind regards,
Ola
Hi Ola,
Thank you for your very detailed description of the steps on how this can best be approached via the AGO Assistant. I had already thought of part of it myself, but adding the map service beforehand to create a unique ID and opening the AGO Assistant twice definitely improves the procedure.
At the same time, they also show how complicated it has already become for users compared to the old Geocortex Manager, where all of this could be done with a single simple button. That's why this remains a workaround for me and not a solution.
I also especially want to thank you for your offer to go through this together. But for now, I don't think that's necessary. It's not an action we do weekly, but something that comes up only occasionally. For now, I think I have enough information to be able to do this myself.
Kind regards, Antoon
city of Eindhoven, Netherlands
Hi Antoon,
I completely agree; compared to Geocortex Manager's one-click import, the current workflow through AGOL Assistant is more of a workaround than a complete solution.
That got me thinking, so I put together an ArcGIS Pro Notebook to automate the process and reduce the amount of manual JSON editing required.
The notebook is divided into four steps so you can validate everything before any changes are written back to Portal:
The notebook handles both standalone layers and sublayers within map services or group layers, preserving the layer configuration such as pop-ups, field visibility, labels, renderer, and other Web Map settings.
As with AGOL Assistant, I'd still recommend testing against copies of your Web Maps first. Creating copies with Save As gives you a safe rollback point before updating production items.
I've tested the notebook successfully against Portal 11.5 in my environment. If you decide to try it, I'd be interested to hear how it works in your environment as well.
I hope it helps.
Kind regards,
Ola