i took another look at this after you replied to jian's thread and was able to adapt your sample to get legend swatches for "Hostile Units" to display using the following code//add only a layer which is embedded in a single group layer
dynamicMapServiceLayer.setVisibleLayers([6]);
//...
//make sure both the group layer and sublayer are referenced in the subLayerIds
legendLayer.subLayerIds = [0,6]
for the the Lansing river and Areas layer (which is embedded in a group layer inside another group layer) i was able to get swatches using the followingdynamicMapServiceLayer.setVisibleLayers([8]);
//...
legendLayer.subLayerIds = [0,7,8]
i'm not positive, but i think your problems with layers 2,3,4,5 is that the dozens and dozens of symbols won't fit in the space allocated to the legend