Setting Layer Definition doesn't allow me to remove the layers in the Live Map Widget

Discussion created by pmukkamala67 on Apr 28, 2010
I have issues with the Layer Defintion. Thanks in advance for your help.
I am creating a dynamic map (which has 17 layers), but,
layer = new esri.layers.ArcGISDynamicMapServiceLayer(mapServiceInfo.url, {
id: mapServiceInfo.label,
opacity: parseFloat(mapServiceInfo.alpha),
visible: mapServiceInfo.visible


I am setting the layer definition to filter the layers by state.
But, when I do this, the Live Map Widget see's all the 17 layers as one and I cannot take one layer after another in the Live Map Widget.