I'm trying to use ESRI's Javascript API and when I view the live sample for "Reorder layers in map service" under "Dynamic Layers" I turn off all the check boxes. One by one they go off, but once the last one is off all the layers show up again on the map. Is this supposed to happen? It seems unintuitive.
If it is supposed to happen, anyone know how I can make it not happen in my own code?
Here's the link to the sample: Reorder layers in map service | ArcGIS API for JavaScript