ArcGIS Pro 3.0 API Reference Guide
ArcGIS.Core.CIM Namespace / CIMWMSServiceConnection Class
Members Example

In This Topic
    CIMWMSServiceConnection Class
    In This Topic
    Represents a WMS service connection.
    Object Model
    CIMWMSServiceConnection ClassCIMWMSServiceConnection ClassCIMWMSServiceConnection ClassCIMInternetServerConnectionBase Class
    Syntax
    Example
    Add a WMS service
    // Create a connection to the WMS server
    var serverConnection = new CIMInternetServerConnection { URL = "URL of the WMS service" };
    var connection = new CIMWMSServiceConnection { ServerConnection = serverConnection };
    
    // Add a new layer to the map
    var layerParams = new LayerCreationParams(connection);
    await QueuedTask.Run(() =>
    {
      var layer = LayerFactory.Instance.CreateLayer<FeatureLayer>(layerParams, MapView.Active.Map);
    });
    Add a WMS service
    // Create a connection to the WMS server
    var serverConnection = new CIMInternetServerConnection { URL = "URL of the WMS service" };
    var connection = new CIMWMSServiceConnection { ServerConnection = serverConnection };
    
    // Add a new layer to the map
    var layerParams = new LayerCreationParams(connection);
    await QueuedTask.Run(() =>
    {
      var layer = LayerFactory.Instance.CreateLayer<FeatureLayer>(layerParams, MapView.Active.Map);
    });
    Inheritance Hierarchy

    System.Object
       ArcGIS.Core.CIM.CIMObject
          ArcGIS.Core.CIM.CIMDataConnection
             ArcGIS.Core.CIM.CIMServiceConnection
                ArcGIS.Core.CIM.CIMWMSServiceConnection

    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 8.1

    See Also