More examples | Use Packed | Unpacked Version of the script.

Use Check box to turn on/off layers in a dynamic map service.