Hi,
We configure multiple webmaps in portal, and we want to merge them into a new webmap that is the union of the individual maps. Customer have different teams managing the content of the different maps, which is why we are not working with a single large webmap.
We've had multiple issues related to merging the maps into one.
We've tried different solutions to merge:
- ToJson() for each map, and perform a JSON merge to create the JSON for a new Map.FromJson()
- For some reason we didn't get PopupDefinitions and some other properties using this technique, even when having performed map.LoadAsync() or LoadAsync for individual layers
- Iterate referenceLayers, OperationalLayers and BaseLayers and perform a Clone
- Most things work, but we frequently get error message similar to
- ArcGisMapImageLayer within a GroupLayer fail to reflect IsVisible, so the user is not able to show/hide that layer.
- Moving them outside of a group works, but that's not particularly functional for the structure presented to the user.
Is it possible that Clone clones some references to the original CoreArcGISMapImageLayer referencing the original Map that is no longer alive?
I've tried implementing my own Clone method to do similar things to the runtime Clone, but in some situations I need to Load the source layer, which gives me the No access to this resource (or something to that effect).
Any suggestion for the best way to merge multiple maps into one?