how do you know what layer ID does your web map app use?
![](https://transparentgov.net/data/img4/hrsa_layerid_4.png)
Old classic map viewer still has some value, but new map viewer leave me in the dark on layer id
![](https://transparentgov.net/data/img4/hrsa_layerid_5.png)
If you don't define layer id, leave layer id as blank, arcgis server will automatically assign a layer id for you. It will starting from 0, then 1, 2, ... based on drawing order. First drawing layer on the most top has layer id 0,
![](https://transparentgov.net/data/img4/hrsa_layerid_1.png)
You can arbitrary assign a different layer id at layer property
![](https://transparentgov.net/data/img4/hrsa_layerid_2.png)
Some time, you add 3 layers on top, then original layers id all changed by plus 3. Then you remove those 3 layers, the remaining layer id failed to minus 3 go back to original id. This is ESRI bug. unfixed. The changed layer ID cause our web map failure.
Because my web map app expecting web service layer id 0 and 1. However, now the web service layer ID secretely change to 4, 5. This mismatch cause, web map failed to drawing layer.
![](https://transparentgov.net/data/img4/hrsa_layerid_3.png)