I was trying to duplicate the results you had on the excluding all layers not in the IdentifyWidget.xml by commenting out the else block in the function called processIdentifyResults. I then recomplied it but i still get the layers to show up that are not in the IdentifyWidget.xml.
Here is the function with the code i commented out. I've try to clean the project, and build but i still get the layers to show up i didn't want to see.//process identify results private function processIdentifyResults(identifyResults:Array):void { if(!identifyArrayCollection) identifyArrayCollection = new ArrayCollection(); for each (var identifyResult:IdentifyResult in identifyResults) { var title:String = identifyResult.layerName; var obj:Object = identifyResult.feature.attributes; var content:String = ""; var fld:String; var value:String; var link:String = ""; var linkicon:String = ""; var identFields:String = ""; var identLinkPre:String = ""; var identLinkField:String = ""; var identLinkSuffix:String = ""; var identLinkIcon:String = ""; var identLinkIconPre:String = ""; var identLinkIconSuffix:String = ""; var identZoom:Number = 0; var identForceScale:Boolean = false; for(var i:int=0; i<configIdentFields.length; i++) { if (identifyResult.layerName == configIdentFields.label) { identLinkField = configIdentFields.linkfield; identFields = configIdentFields.fields; identLinkPre = configIdentFields.linkpre; identLinkSuffix = configIdentFields.linksuffix; identLinkIconPre = configIdentFields.linkiconpre; identLinkIcon = configIdentFields.linkicon; identLinkIconSuffix = configIdentFields.linkiconsuffix; identZoom = configIdentFields.zoomscale; identForceScale = configIdentFields.forcescale; } } if(identFields) { var fldArr:Array = identFields.split(","); for (var f:Number = 0; f < fldArr.length; f++) { try{ value = obj[fldArr].toString(); } catch (error: Error){ value = ""; } if (fldArr .toUpperCase() == identLinkField.toUpperCase()){ //concatenate link = identLinkPre + value + identLinkSuffix; } else if (fldArr .toUpperCase() == identLinkIcon.toUpperCase()){ //concatenate linkicon = identLinkIconPre + value + identLinkIconSuffix; } else { content += fldArr + ": " + value + "\n"; } } } /* else { for (fld in obj) { try{ value = obj[fld].toString(); } catch (error: Error){ value = ""; } if (fld.toUpperCase() == identLinkField.toUpperCase()) { link = value; } else { content += fld + ": " + value + "\n"; } } } */ var idResult:IdResult = new IdResult(); idResult.icon = widgetIcon; idResult.title = identifyResult.layerName; idResult.content = content; if(link!="") idResult.link = link; idResult.point = identifyPoint; idResult.geometry = identifyPoint; idResult.zoomScale = identZoom; idResult.zoom2msg = zoom2Msg; if(linkicon!="") idResult.linkicon = linkicon; idResult.forceScale = identForceScale; identifyArrayCollection.addItem(idResult); } clearMessage(); }
It's probably something simple that i'm not seeing. Any Ideas? Also, i'm using Flash builder 4 to rebuild the mxml.
Thanks.