Adding a WMS service to ArcGIS Pro is very simple and straightforward:
using ArcGIS.Core.CIM; using ArcGIS.Desktop.Framework.Threading.Tasks; using ArcGIS.Desktop.Mapping; // Create a connection to the WMS server var serverConnection = new CIMInternetServerConnection {URL = "Fill in the URL of the WMS service"}; var connection = new CIMWMSServiceConnection {ServerConnection = serverConnection}; // Add a new layer to the map await QueuedTask.Run(() => { var layer = LayerFactory.CreateLayer(connection, MapView.Active.Map); });
But with CIMWCSServiceConnection I can't add a WCS service in ArcGIS Pro, what is wrong in my code:
// Create a connection to the WCS servervar serverConnection = new CIMInternetServerConnection {URL = "Fill in the URL of the WCS service"};var connection = new CIMWCSServiceConnection {ServerConnection = serverConnection};
// Add a new layer to the mapawait QueuedTask.Run(() =>{var layer = LayerFactory.CreateLayer(connection, MapView.Active.Map);});
Thank you in advance.
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.