Change the visibility of sublayers.

Use case
A map image layer may contain many sublayers such as different types of roads in a road network or city, county, and state borders in a US map. The user may only be interested in a subset of these sublayers. Or, perhaps showing all of the sublayers would show too much detail. In these cases, you can hide certain sublayers by changing their visibility.
How to use the sample
Each sublayer has a check box which can be used to toggle the visibility of the sublayer.
How it works
- Create an
ArcGISMapImageLayerobject with the URL to a map image service. - Get an array of
ArcGISMapImageSublayerafter loading the map image layer. - For each layer in the sublayer array, set its visible property to true or false.
Relevant API
- ArcGISMapImageLayer
- ArcGISMapImageSublayer
Tags
layer, sublayer, visibility