JS API 2.2 /2.3 ArcGIS Server 10.1 and Legend - Checkbox for sublayers

Discussion created by Arkitech on May 19, 2011
Latest reply on May 20, 2011 by kdoman

Just working on getting a nice legend for my service. I have followed the instructions and the legend works fine however i require checkboxes for each sublayer in the service instead of the higher layer. Does anyone know how i would be able to achieve this?

I would like to do it automatically so i dont need to manually change anything when using the code in another application for example. I just would like it to loop through, see sublayers and add the option for a checkbox to turn it on/off, unsure why this is not included as it seems so common for end users to do???