I have set up a map using the Sublayer List sample. I haven't made any changes to the sample except that my map uses a different ArcGISDynamicMapServiceLayer than the sample. In the service I am using, some layers are visible by default, but not all.
The sublayer list comes in great initially. The layers that are on in the service by default display on the map and their layer checkboxes are checked. But when I turn on one of the other layers (that was not visible initially) that layer appears on the map but all the other layers disappear. Also, the other layers' checkboxes remain checked even though they are gone from the map. If I uncheck their checkboxes and then check them on again, they will turn on.
Has anyone else experienced this? Any ideas on how to get the layer visibility in sync with the sublayer list?