how to hide subLayer in map but show in legend?

Discussion created by deleted-user-ugCMpXci8bn5 on Dec 27, 2012

My webapp uses v3.1 of the JS API and a dynamic map service with several sub layers, which can be turned on and off with an array of checkboxes(which also controls which sublayers are displayed in the legend).  I would like to show all the sub layers in the legend, but hide the features from one of those sublayers in the map (so that this sublayer may be shown as graphics only).  Any ideas? I see ways to do the reverse and to hide the entire layer but I haven't got this yet...thanks!