<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Popup and Filter information not showing on Python API generated Web Map with Views in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/popup-and-filter-information-not-showing-on-python/m-p/1408168#M9865</link>
    <description>&lt;P&gt;Very cool! Yeah, the only thing I can think of is making sure to save the pop-up info to the layer itself in the visualization tab instead of the map&lt;/P&gt;</description>
    <pubDate>Wed, 10 Apr 2024 19:55:04 GMT</pubDate>
    <dc:creator>GIS_utahDEM</dc:creator>
    <dc:date>2024-04-10T19:55:04Z</dc:date>
    <item>
      <title>Popup and Filter information not showing on Python API generated Web Map with Views</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/popup-and-filter-information-not-showing-on-python/m-p/1408096#M9861</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Context:&lt;/STRONG&gt;&lt;BR /&gt;I am working on generating a set of feature layer views from a template web map, then create a web map with those views using the python api. I have been able to successfully generate the views from the template, then create a web map containing those views.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Problem:&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;The styling, filters, and PopupInfo from the template are visible on the View visualization tab and when creating a new web map from that view. Only the styling is visible on the programatically generated web map, not the filters or popup formatting.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Visualization Tab&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-04-10 124651.jpg" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/100606i6D58D67A7499AFEB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2024-04-10 124651.jpg" alt="Screenshot 2024-04-10 124651.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;New Web Map Made from GUI:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-04-10 125122.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/100609i924918C3F5D73FBA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2024-04-10 125122.png" alt="Screenshot 2024-04-10 125122.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Python API Web Map:&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-04-10 125703.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/100612i51A240CC7F9E94E7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2024-04-10 125703.png" alt="Screenshot 2024-04-10 125703.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Code Snipped for View + Web Map Creation&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;web_map = WebMap()

timestamp = datetime.now().strftime("%Y%m%d%H%M%S")
for category, data in feature_categories.items():
    name = f"{category} {project} View"
    print(name)
    if data['type'] == 'scan':
        view = scan_data_item.manager.create_view(name = name)
        view.update(item_properties={'text': json.dumps({'layers': [data['data']], 'tables': []})})
        web_map.add_layer(view, {'title': name})
    elif data['type'] == 'strip':
        view = strip_data_item.manager.create_view(name = name)
        view.update(item_properties={'text': json.dumps({'layers': [data['data']], 'tables': []})})
        web_map.add_layer(view, {'title': name})
    elif data['type'] == 'ind':
        view = ind_data_item.manager.create_view(name = name)
        view.update(item_properties={'text': json.dumps({'layers': [data['data']], 'tables': []})})
        web_map.add_layer(view, {'title': name})

# Save the WebMap
web_map_properties = {'title': f' Web Map Project {project}',
                      'snippet': 'This web map was created using the ArcGIS Python API',
                      'tags': 'ArcGIS Python API'}
web_map_item = web_map.save(item_properties=web_map_properties)&lt;/LI-CODE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Things I Tried:&lt;/STRONG&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Reviewed the View and Web Map item on ArcGIS Assistant (They look normal, can provide the json if it is helpful)&lt;/LI&gt;&lt;LI&gt;Refreshing Web Map&lt;/LI&gt;&lt;LI&gt;Verified that Popups are enabled on the Web Map&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would greatly appreciate some help on the subject!&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Apr 2024 18:05:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/popup-and-filter-information-not-showing-on-python/m-p/1408096#M9861</guid>
      <dc:creator>BrandonYates1</dc:creator>
      <dc:date>2024-04-10T18:05:06Z</dc:date>
    </item>
    <item>
      <title>Re: Popup and Filter information not showing on Python API generated Web Map with Views</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/popup-and-filter-information-not-showing-on-python/m-p/1408133#M9862</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have a script I use to create/update view layers that maintains the pop-up info, symbology and form info (editing) from the master hosted feature layer using the python API. The link to the repository is here -- specifically the JurisdictionalViewLayer_CreateUpdate_UCIP:&amp;nbsp;&lt;A href="https://github.com/julia-surkis/Utah-Critical-Infrastructure-Prioritization/tree/main" target="_blank"&gt;https://github.com/julia-surkis/Utah-Critical-Infrastructure-Prioritization/tree/main&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The main thing you will need to do is save the information you want directly to the master hosted feature layer (pop-up and symbology in the Visualization tab of the hosted feature layer, form-info in the Field Maps Designer. Once you have that set up, this script goes through pulling that info from the master feature layer's JSON and including it in the updated/created view layers.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Apr 2024 18:43:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/popup-and-filter-information-not-showing-on-python/m-p/1408133#M9862</guid>
      <dc:creator>GIS_utahDEM</dc:creator>
      <dc:date>2024-04-10T18:43:22Z</dc:date>
    </item>
    <item>
      <title>Re: Popup and Filter information not showing on Python API generated Web Map with Views</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/popup-and-filter-information-not-showing-on-python/m-p/1408162#M9864</link>
      <description>&lt;P&gt;This is great! I wish I knew about this before I started working on this. We have a super similar workflow. Here's a diagram of what I'm trying to do for reference.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Untitled Diagram.drawio.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/100627i5675606D165AFA9B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Untitled Diagram.drawio.png" alt="Untitled Diagram.drawio.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;It looks like the main difference is that you are adding components of the template definition piece by piece and I'm just pasting the whole definition in there. Is there something else that I'm missing? I'll try to implement your approach and see if it fixes it!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Apr 2024 19:40:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/popup-and-filter-information-not-showing-on-python/m-p/1408162#M9864</guid>
      <dc:creator>BrandonYates1</dc:creator>
      <dc:date>2024-04-10T19:40:06Z</dc:date>
    </item>
    <item>
      <title>Re: Popup and Filter information not showing on Python API generated Web Map with Views</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/popup-and-filter-information-not-showing-on-python/m-p/1408168#M9865</link>
      <description>&lt;P&gt;Very cool! Yeah, the only thing I can think of is making sure to save the pop-up info to the layer itself in the visualization tab instead of the map&lt;/P&gt;</description>
      <pubDate>Wed, 10 Apr 2024 19:55:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/popup-and-filter-information-not-showing-on-python/m-p/1408168#M9865</guid>
      <dc:creator>GIS_utahDEM</dc:creator>
      <dc:date>2024-04-10T19:55:04Z</dc:date>
    </item>
    <item>
      <title>Re: Popup and Filter information not showing on Python API generated Web Map with Views</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/popup-and-filter-information-not-showing-on-python/m-p/1408170#M9866</link>
      <description>&lt;P&gt;Here's a screen recording of me further describing the issue!&amp;nbsp;&lt;A href="https://www.loom.com/share/2fb1450823ac42329932d8a3eb63ad46?sid=5e2f1414-21b6-41d6-8e04-747af77b4dbe" target="_blank"&gt;https://www.loom.com/share/2fb1450823ac42329932d8a3eb63ad46?sid=5e2f1414-21b6-41d6-8e04-747af77b4dbe&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Apr 2024 19:56:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/popup-and-filter-information-not-showing-on-python/m-p/1408170#M9866</guid>
      <dc:creator>BrandonYates1</dc:creator>
      <dc:date>2024-04-10T19:56:20Z</dc:date>
    </item>
    <item>
      <title>Re: Popup and Filter information not showing on Python API generated Web Map with Views</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/popup-and-filter-information-not-showing-on-python/m-p/1408177#M9867</link>
      <description>&lt;P&gt;Ohhh, okay I see. Does the AGO assistant for the web map show the same JSON as the view or is it different? I might try getting the layer and adding to the webmap via the .search() method instead of directly?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Apr 2024 20:07:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/popup-and-filter-information-not-showing-on-python/m-p/1408177#M9867</guid>
      <dc:creator>GIS_utahDEM</dc:creator>
      <dc:date>2024-04-10T20:07:28Z</dc:date>
    </item>
    <item>
      <title>Re: Popup and Filter information not showing on Python API generated Web Map with Views</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/popup-and-filter-information-not-showing-on-python/m-p/1408185#M9868</link>
      <description>&lt;P&gt;That seems to be the issue! The Web Map seems to have a PopupInfo Field that is very different from the View PopupInfo. I'll try that method now&lt;/P&gt;</description>
      <pubDate>Wed, 10 Apr 2024 20:25:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/popup-and-filter-information-not-showing-on-python/m-p/1408185#M9868</guid>
      <dc:creator>BrandonYates1</dc:creator>
      <dc:date>2024-04-10T20:25:19Z</dc:date>
    </item>
    <item>
      <title>Re: Popup and Filter information not showing on Python API generated Web Map with Views</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/popup-and-filter-information-not-showing-on-python/m-p/1408570#M9873</link>
      <description>&lt;P&gt;Got it working but it's a bit ugly! I added another loop that applies the formatting to the web map as well. I think it would be a bit cleaner to find a method to add the view to the web map while retaining the formatting from the view but this seems to work. Very similar to your code in:&amp;nbsp;&lt;A href="https://github.com/julia-surkis/Utah-Critical-Infrastructure-Prioritization/tree/main" target="_blank" rel="noopener"&gt;https://github.com/julia-surkis/Utah-Critical-Infrastructure-Prioritization/tree/main&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;map_data = web_map_item.get_data()

for layer in map_data['operationalLayers']:
    view_name = layer['title']
    for definition in feature_categories:
        if feature_categories[definition]['view_name'] == view_name:
            layer['layerDefinition'] = feature_categories[definition]['data']
            layer['popupInfo'] = feature_categories[definition]['data']['popupInfo']
            break
web_map_item.update(item_properties={'text': json.dumps(map_data)})&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Apr 2024 15:56:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/popup-and-filter-information-not-showing-on-python/m-p/1408570#M9873</guid>
      <dc:creator>BrandonYates1</dc:creator>
      <dc:date>2024-04-11T15:56:07Z</dc:date>
    </item>
  </channel>
</rss>

