Frequently asked question
Code:
if (ActiveLayerIndex>=layerCount) ActiveLayerIndex = 0;
Code:
ActiveLayerIndex=<number of the preferred active layer>;
if (ActiveLayerIndex>=layerCount) ActiveLayerIndex = 0;
Note:
The ActiveLayerIndex starts with '0' for the topmost layer and its value increases in top to bottom order. So for the third layer to be active, insert the number 2.
Article ID:000006803
Get help from ArcGIS experts
Download the Esri Support App