Select to view content in your preferred language

What is Python equivalent to ArcGIS Pro "Share as Web Map"

2044
5
Jump to solution
12-15-2022 03:13 PM
DonMorrison1
Frequent Contributor

I have a map in ArcGIS pro that I can upload to ArcGIS online using the "Share as Web Map" dialog, which gives me various options for how I want the data copied (in my case it creates an ArcGIS Online web map and a feature layer).  I'd like to automate that in Python but having some trouble figuring out how to do it. 

This question was asked previously but the answer seems to imply that I have to build the web map from scratch using the ArcGIS Api for Python WebMap object, then call the save() method. Even if I do that, I suspect that does not handle all of the options available on the ArcGIS Pro Share as Web Map dialog.

I was hoping I could do it with more simply with arcpy objects. Has anybody been able to do this? I'm on ArcGIS Pro 2.9.5

 

DonMorrison1_0-1671145983075.png

 

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
Andrew--Johnson
Esri Regular Contributor

The Sharing team has this as an item to be worked on in a future release. There is no specific timeline at this point but if you want to track it you can always create an ArcGIS Idea with the sharing and publishing tag and they can provide updates there.

thanks,

Andrew

View solution in original post

0 Kudos
5 Replies
JohnHughson
Occasional Contributor

Hello @DonMorrison1, have you seen the following page concerning arcpy.sharing?

FeatureSharingDraft—ArcGIS Pro | Documentation

It contains some code samples used to share web layers using this module, might be a good start. I hope that helps!

0 Kudos
DonMorrison1
Frequent Contributor

Right - I have read through that and have coded it in Python but sharing the web layers is not what I need to do.  I need to upload the complete map to ArcGIS online - just like it is done with "Share as Web Map"

0 Kudos
DanPatterson
MVP Esteemed Contributor

Those tools don't exist in ArcToolbox, so they won't be available in arcpy but through the various objects and functions in the Sharing portion of the cim as @JohnHughson pointed out.


... sort of retired...
0 Kudos
Andrew--Johnson
Esri Regular Contributor

The Sharing team has this as an item to be worked on in a future release. There is no specific timeline at this point but if you want to track it you can always create an ArcGIS Idea with the sharing and publishing tag and they can provide updates there.

thanks,

Andrew

0 Kudos
DonMorrison1
Frequent Contributor

I just opened an ArcGIS idea on this

0 Kudos