Hello everyone,
I’m trying to replicate the “Share As Web Layer” functionality (shown in the screenshot) using the ArcGIS Pro SDK.
Here are my questions:
Is there a direct API in ArcGIS Pro SDK to share a feature layer (or raster layer) as a web layer to ArcGIS Online / Enterprise?
If not, is there any workaround through the SDK that mimics the desktop workflow (right-click → Share As Web Layer)?
Any insights, documentation links, or code examples would be very helpful.
Thanks in advance!
@UmaHarano , @Wolf
Hello,
@UmaHarano , @Wolf , @GKmieliauskas ,
Please could someone help me with this query?
It would be a great help if anyone could provide some insights.
Regards,
Abhijeet
I am not aware of a way to accomplish this with the API.
I recommend posting this request in the Pro ideas site for the API support.
I am trying to find the script / GP tool that can be used to 'share' or 'publish' a feature layer as a web layer. Until then you can at least present your users programmatically with the 'share feature layer as web layer' dockpane using this snippet:
IPlugInWrapper wrapper = FrameworkApplication.GetPlugInWrapper("esri_sharing_SharingAsWebLayerPaneBtn");
if ((wrapper is ICommand command) && command.CanExecute(null))
command.Execute(null);
After some digging we found this:
An overview of the Publishing toolset—ArcGIS Pro | Documentation
which indicates that it is possible to publish a feature layer as a web layer. It appears that to accomplish this is very complicated. I will try to publish a sample that publishes a feature layer as a web layer. I'll put the sample on this thread as well - if i can get it to work.
Thank you @Wolf , I am waiting for you to provide me with a example.