I would like for my users to be able to turn layers on and off so they can see just street signs or supports. I have tried using this widget, but it does not work: http://www.arcgis.com/home/item.html?id=9b6280a6bfb0430f8d1ebc969276b109http://Is there a way to add a checkbox next to the layer in the legend widget to turn layers on/off?
My code for starting the legend is the following:
app.legend = new Legend({
map: app.map,
layerInfos: [{
title: app.supportLayer.name,
layer: app.supportLayer
}, {
title: app.signLayer.name,
layer: app.signLayer
}]
}, "legend");
app.legend.startup();