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()); } }
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.