But, in order to get/set the visibility of its sublayer it takes Layerid as an argument which is not public. The question here is how can I use this method unless I have the Layerid.SetLayerVisibility(int layerID, bool visible);Same is the issue with MaximumScale and MinimumScale. Please suggest me a proper way to handle this situation.
How exactly do you set the visibility of WMS sub layer using Wms.Layers property?
The 'Layers' property is of type string[].
You can set it in XAML though a comma separated layer list:
<esri:WmsLayer Layers="layer1,layer2" .....
or in C# by code like:
wmsLayer.Layers = new[] { "layer1", "layer2"};
If you need to know dynamically the list of layers supported by the service you can use the LayerList property
Thanks Dominique - I can add the WMS successfully, using
<esri:WmsLayer Layers="layer1,layer2"
.. but default visibility on the WMS sub layers is false.
How do I programmatically turn on visibility for a WMS sub layer in c#?
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.