How to change visibility of AGSDynamicMapServiceLayer sub layers

548
1
01-17-2018 11:18 PM
AkshayAnpat
New Contributor

I am trying to change the visibility of few sub layers within my AGSDynamicMapServiceLayer.But didn't found any solution for same.

Please help.

0 Kudos
1 Reply
GarimaDhakal
New Contributor III

You can specify which layers in the service should be visible by modifying the visibleLayers property. For more information, please refer to this guide page: Dynamic map service layer—ArcGIS Runtime SDK for iOS | ArcGIS for Developers. Here's a code snippet from the documentation.

//only display ‘ushigh’ (id=0) and ‘states’ (id=1) layer
layer.visibleLayers = [0, 1]
0 Kudos