private function onDDLInitComplete(fSet:FeatureSet, token:Object=null):void { //defines and sorts a unique list of values for the drop down list control //Populates the bindable application variable ddlValuesAC var i:int = 1; var item:String; var sortAttr:Array=fSet.attributes.sortOn("FieldName"); for (var j:int=0; j<fSet.attributes.length-1; j++) { item = sortAttr.FieldName; //getItemIndex returns -1 it item is not found in the array i=ddlValuesAC.getItemIndex(item); if (i==-1){ ddlValuesAC.addItem(item); } } }
protected function ddlControl_changeHandler(event:IndexChangeEvent):void { mapQuery.where="fieldName = '" + ddlControl.selectedItem + "'"; mapQuery.geometry = null; //this in case geometry was used in previous query mapQueryTask.execute(mapQuery, new AsyncResponder(onQueryExecuteComplete, onFault)); }
Los miembros registrados pueden publicar, seguir actualizaciones y más. ¿Nuevo aquí? Regístrate gratis.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.