ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Core.CIM Namespace / CIMInternetServerConnectionBase Class / URL Property
Example

In This Topic
    URL Property (CIMInternetServerConnectionBase)
    In This Topic
    Gets or sets the URL.
    Syntax
    Public Property URL As String
    public string URL {get; set;}
    Example
    Add a WMTS service
    {
        // Create a connection to the WMS server
        var serverConnection = new CIMProjectServerConnection
        {
            URL = "URL of the WMTS service.xml",
            ServerType = ServerType.WMTS,
        };
        var service_connection = new CIMWMTSServiceConnection
        {
            ServerConnection = serverConnection,
            LayerName = "AdminBoundaries", // Specify the layer name you want to add
        };
    
        // Add a new layer to the map
        var layerParams = new LayerCreationParams(service_connection);
        layerParams.MapMemberPosition = MapMemberPosition.AddToBottom;
        //Note: Needs QueuedTask to run
        var layerCreated = LayerFactory.Instance.CreateLayer<FeatureLayer>(layerParams, map);
    }
    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.0 or higher.
    See Also