queryTask.url = "someother url"; queryTask.execute(query2, new AsyncResponder(onResult2, onFault));
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 { if (featureSet.features.length == 0) { Alert.show("No Parcel Found."); } else { var graphicsExtent:Extent = GraphicUtil.getGraphicsExtent(featureSet.features); if (graphicsExtent) { map.extent = graphicsExtent; } } } function onFault(info:Object, token:Object = null):void { Alert.show(info.toString()); } } <esri:QueryTask id="queryTask" url="http://gis2.stallingsnc.org:8084/Stallings/rest/services/Flex2/ParcelsAgain/MapServer/0" useAMF="false"/> <esri:Query id="query" where="ACCTNO like '%{fText.text}%'" outSpatialReference="{map.spatialReference}" returnGeometry="true" text="{fText.text}"> <esri:outFields> <fx:String>ACCTNO</fx:String> <fx:String>Owner1</fx:String> </esri:outFields> </esri:Query>
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.