Solved! Go to Solution.
private function doQuery():void { // clear the graphics layer myGraphicsLayer.clear(); queryTask.execute(query, new AsyncResponder(onResult, onFault)); function onResult(featureSet:FeatureSet, token:Object = null):void { Alert.show("In Function" + featureSet.features.length); if (featureSet.features.length == 0) { Alert.show("No Feature found. Please try again."); } else { Alert.show("Record Found"); map.scale = 15000; map.centerAt(featureSet.features[0].geometry as MapPoint); } } function onFault(info:Object, token:Object = null):void { Alert.show(info.toString()); } }
private function doQuery():void { // clear the graphics layer myGraphicsLayer.clear(); queryTask.execute(query, new AsyncResponder(onResult, onFault)); function onResult(featureSet:FeatureSet, token:Object = null):void { Alert.show("In Function" + featureSet.features.length); if (featureSet.features.length == 0) { Alert.show("No Feature found. Please try again."); } else { Alert.show("Record Found"); map.scale = 15000; map.centerAt(featureSet.features[0].geometry as MapPoint); } } function onFault(info:Object, token:Object = null):void { Alert.show(info.toString()); } }