Select to view content in your preferred language

How do I “bump” a webmap in code to make it available to QuickCapture?

153
0
Thursday
Dirk_Vandervoort
Frequent Contributor

Short story: I am using Python to create and fully hydrate a QuickCapture project. QuickCapture requires a webmap so I create one:

from arcgis.map import Map
new_map = Map()
new_map.extent = {
    "spatialReference": {"wkid": 102100},
    "xmin": -13800000,
    "ymin": 3600000,
    "xmax": -11300000,
    "ymax": 6200000
}

# Save as a new WebMap item
 my _item = new_map.save({
     "title": project_name,
     "tags": ["webmap", "python"],
     "snippet": "WebMap focused on the somewhere USA"
 })

In code I can do things in code like set the basemap, change the extent, change the thumbnail, add operational layers, changing the snippet, etc. 

This creates a fully (almost) functional webmap. I can open it in the Map Viewer. It looks great. 

Note that I have not saved the WebMap in the Map Viewer. So far it is entirely built in code.

When I add the webmap to a QuickCapture project, and open the project in the QuickCapture app. I get this error:

Dirk_Vandervoort_0-1755211502104.png

If I open the webmap in the Map Viewer and simply change the extent and save the webmap, the webmap loads in the QuickCapture app just fine:

Dirk_Vandervoort_1-1755211528073.png

We do not want to have to manually open, bump, and save the webmap in ArcGIS Online. We changed the map extent in code still without creating a QuickCapture-worthy webmap.

My question is:

How can I programmatically “bump” the webmap so it loads in QuickCapture?

I hope you can help. TIA

0 Kudos
0 Replies