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.
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.