Select to view content in your preferred language

Add WMS Layer Help Needed

638
1
01-14-2011 06:56 AM
ElizabethMiller
Regular Contributor
I am trying to add a WMS layer to my map using the following format, and my webpage is choking. Can anyone help? Thanks!

In my XAML file:

<esri:WmsLayer ID="WMSLayer" 
Url="http://www.datafinder.org/wmsconnector/com.esri.wms.Esrimap/MN_MetroGIS_DataFinder_WMS_Planning_Development?"                     
Initialized="WmsLayer_Initialized"/>


In my XAML.vb file:

    Private Sub WmsLayer_Initialized(ByVal sender As System.Object, ByVal e As System.EventArgs)
        Dim myWmsLayer As ESRI.ArcGIS.Client.Toolkit.DataSources.WmsLayer
        myWmsLayer = TryCast(MyMap.Layers("WMSLayer"), ESRI.ArcGIS.Client.Toolkit.DataSources.WmsLayer)

        ' You can control the visibility of which WMS layers are displayed by adding the
        ' sub-LayerID's to the String Array. 
        Dim myVisibleWmsLayers() As String = {"mnrra_a"}
        myWmsLayer.Layers = myVisibleWmsLayers
    End Sub
0 Kudos
1 Reply
JenniferNery
Esri Regular Contributor
The application hangs? Can you try to run Fiddler with your app to see which webrequest was giving trouble? Also try to subscribe to the InitializationFailed event.
0 Kudos