Hello
When searching for web map in the Portal, for example using python below:
webmaps_contents = gis.content.search("*",item_type="Web Map", max_items=500)
Is it possible to filter for Web Maps saved in Classic or the New Map Viewer?
Or can this be done with with an if statement in a loop:
for webmap_item in webmaps_contents:
if webmap_item. .....
Thanks
Solved! Go to Solution.
I think one way you might be able to do this is:
for webmap in webmaps_contents :
data = webmap.get_data()
authoring_app = d["authoringApp"]
if authoring_app == "ArcGISMapViewer"
# Created with new MapViewer
pass
else:
# Classic webmap (authoring_app is "WebMapViewer")
pass
At least, based on my observations the Authoring App value is "ArcGISMapViewer" for the new MapViewer and "WebMapViewer" for the classic MapViewer.
Thank you. Worked with a couple of tweaks:
for webmap in webmaps_contents :
data = webmap.get_data()
authoring_app = data["authoringApp"]
if authoring_app == "ArcGISMapViewer":
# Created with new MapViewer
pass
else:
# Classic webmap (authoring_app is "WebMapViewer")
pass
I think one way you might be able to do this is:
for webmap in webmaps_contents :
data = webmap.get_data()
authoring_app = d["authoringApp"]
if authoring_app == "ArcGISMapViewer"
# Created with new MapViewer
pass
else:
# Classic webmap (authoring_app is "WebMapViewer")
pass
At least, based on my observations the Authoring App value is "ArcGISMapViewer" for the new MapViewer and "WebMapViewer" for the classic MapViewer.
Thank you. Worked with a couple of tweaks:
for webmap in webmaps_contents :
data = webmap.get_data()
authoring_app = data["authoringApp"]
if authoring_app == "ArcGISMapViewer":
# Created with new MapViewer
pass
else:
# Classic webmap (authoring_app is "WebMapViewer")
pass