Access Specific Layers within a MapService to Toggle them on/off

Discussion created by agray7501 on Sep 30, 2010
Latest reply on Oct 1, 2010 by agray7501
I have access to number of ESRI Mapservices and would like to be able to access specific layers within the mapservices in my online map application I am working on creating with the ESRI Javascript API.

I have looked at and hoped that I could use this sample map

and substitute some of the data I have access to.

When I do substitute mapservices that we have here, the sample map will toggle on and off the entire mapservice and not the specific layer I was hoping it would.

Here is the mapservice I am trying to access with this code.

I would love to hear from someone about a solution.. Nothing seems as straight forward as it looks..