I am looking at the identify code sample and I have it running in an application. I would like the results to show in a datagroup like how Robert's Identify Widget works. This is the code that I am using out of the sample code section. The pop up works fine on a mouse click and the data is populated. private function mapClickHandler(event:MapMouseEvent):void
{
clickGraphicsLayer.clear();
var identifyParams:IdentifyParameters = new IdentifyParameters();
identifyParams.returnGeometry = true;
identifyParams.tolerance = 3;
identifyParams.width = map.width;
identifyParams.height = map.height;
identifyParams.geometry = event.mapPoint;
identifyParams.mapExtent = map.extent;
identifyParams.spatialReference = map.spatialReference;
var clickGraphic:Graphic = new Graphic(event.mapPoint, clickPtSym);
clickGraphicsLayer.add(clickGraphic);
identifyTask.execute(identifyParams, new AsyncResponder(myResultFunction, myFaultFunction, clickGraphic));
}
private function myResultFunction(results:Array, clickGraphic:Graphic = null):void
{
if (results && results.length > 0)
{
var result:IdentifyResult = results[0];
var resultGraphic:Graphic = result.feature;
switch (resultGraphic.geometry.type)
{
case Geometry.MAPPOINT:
{
resultGraphic.symbol = smsIdentify;
break;
}
case Geometry.POLYLINE:
{
resultGraphic.symbol = slsIdentify;
break;
}
case Geometry.POLYGON:
{
resultGraphic.symbol = sfsIdentify;
break;
}
}
lastIdentifyResultGraphic = resultGraphic;
// update clickGraphic (from mouse click to returned feature)
clickGraphic.symbol = new InfoSymbol(); // use default renderer
clickGraphic.attributes = resultGraphic.attributes;
}
}
Here is the code I am using for the datagroup [Bindable]
private var resultGraphic:IList;
<s:Scroller visible="false" id="resultlist" width="100%" height="100%">
<s:DataGroup dataProvider="{resultGraphic}" visible="true">
<s:layout>
<s:VerticalLayout gap="2" horizontalAlign="justify" useVirtualLayout="true"/>
</s:layout>
</s:DataGroup>
</s:Scroller>
Unfortunately the data is not being populated in the datagroup. Am I binding the wrong value? Any help would be appreciated