Select to view content in your preferred language

Add WMS Layer

279
0
03-18-2024 07:57 AM
SigurdurGesr
Emerging Contributor

 

Hi

How can I add username and password when I add WMS layer
I still get popup form to add username and password when I try to add new WMS layer

 

    Dim serverConnection = New CIMInternetServerConnection With {
                                                   .URL = "SERVER",
                                                   .Password = "PASSWORD",
                                                   .User = "USERNAME"
                                               }


    Dim connection = New CIMWMSServiceConnection With {
    .ServerConnection = serverConnection
}

    Dim layerParams = New LayerCreationParams(connection)
    Await QueuedTask.Run(Sub()
                             Dim layer = LayerFactory.Instance.CreateLayer(Of FeatureLayer)(layerParams, MapView.Active.Map)
                         End Sub)

 

 

Thanks

0 Kudos
0 Replies