WMS Visible Layers

667
1
04-18-2012 04:09 AM
utkuiyi
New Contributor
I use WMSLayer for consuming WMS layer. It has some parameter like ID,URL and Layers. However I don't know names of the layers for WMS layer. It is configurable for us. Do we have any option to display all layers ?
WmsLayer mapWmsLayer = new WmsLayer()
{
ID = "BaseLayer",
Url = AgsConfiguration.Instance().AGSBaseLayer.Value.ToString(),
Layers = new string[] { "2", "3", "4", "5", "6", "8", "9", "12", "13", "15", "16", "19", "21", "23", "24", "26", "27", "28", "29", "30", "32", "34", "35", "36", "38", "39", "40", "41", "42", "45", "46", "47", "48", "49" }

};
0 Kudos
1 Reply
DominiqueBroux
Esri Frequent Contributor
Once the WMS is initialized, the LayerList property gives the layers available for this service.

The legend control is also showing you these layers (sample)
0 Kudos