Hi Jorge,I also wanted to specify <layers onlythese="false"> but also provide layers to exclude, so I added some lines to the config file and to the Identify Widget.IdentifyWidget.xml:
<layers onlythese="false">
</layers>
<excludeLayers>
<excludeLayer name="LayerName" />
</excludeLayers>
IdentifyWidget.mxml1. Add the following to the variable declarations:private var configExcludeLayers:Array;
2. Add the following to private function init():void, after if (configXML) {:
configExcludeLayers = [];
var excludeLayerList:XMLList = configXML..excludeLayer;
for (var index:int = 0; index < excludeLayerList.length(); index++) {
configExcludeLayers.push(excludeLayerList[index].@name);
}
3. Add the following to private function onResult(identifyResults:Array, arcL:* = null):void, after for each (var identifyResult:IdentifyResult in identifyResults) {:
var exclude:Boolean = false;
for (var index:int=0; index < configExcludeLayers.length; index++) {
if (identifyResult.layerName == configExcludeLayers[index]) {
exclude = true;
break;
}
}
if (exclude)
break;