Hi!
Context:
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.
Problem:
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.
Visualization Tab
New Web Map Made from GUI:
Python API Web Map:
Code Snipped for View + Web Map Creation
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)
Things I Tried:
- Reviewed the View and Web Map item on ArcGIS Assistant (They look normal, can provide the json if it is helpful)
- Refreshing Web Map
- Verified that Popups are enabled on the Web Map
I would greatly appreciate some help on the subject!