Copy Pop-up Between Web Map Layers

2153
4
06-28-2021 01:07 AM
UriGilad_EsriAu
Esri Contributor
4 4 2,153

 

The attached Python script assigns a pop-up from one web map layer (source) to another web map layer (target). If you like it I'd appreciate if you give a Kudos. Thanks! 👍

To use the script:

  1. Download and extract the attached zip file.
  2. Open the script file in a python editor (e.g., IDLE. This should be installed by default on any machine with ArcGIS Pro).
  3. Change the following details under the USER INPUTS section:
    • Source web map 32-character id
    • Target web map 32-character id (if same as source web map enter the same id in both)
    • Exact name of pop-up source layer in source web map
    • Exact name of pop-up target layer in target web map
    • ArcGIS Online credentials: url, username & password (make sure you have permissions to edit the target web map).
  4. Save and Run the script.

 

The script will:

  • remove and replace the pop-up of the target layer with the pop-up of the source layer.
  • not remove/add layers from/to your web map.
  • not modify the pop-up of the source layer.
  • produce an error if you have more than one layer with the same name as the source or target name within the same web map.
  • produce an error if the layer name you provided cannot be found in the source or target web map.

This script is not an official Esri product and is therefore not supported or updated.

Written by Uri Gilad 28 June 2021

4 Comments