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()); } }
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.