How To: Change the layers displayed on a map (ArcWeb Services v2)
Instructions provided in this article pertain to ArcWeb Services, version 2 only.
Each data source contains a set of map layers that turn on and off by default at different extents. Default settings can be overridden to display the map layers at the required extent. Instructions provided detail how to change the layers on a map.
- Use 'getLayerInfo' to locate the layers available for a particular data source.
- Use 'getLayerInfoForExtent' to locate the layers available for a given extent.
- Use the object displayLayers within MapImageOptions to define the layers to turn on or off.
If a layer is not available for a given extent, it will not display on the map, and will not display an error.