Hi all,I have two buttons(button1 and button 2) in my layer list widget. The purpose of the buttons is to send a different query to ArcGIS Server and get a map returned. For this purpose I have var data:Object = { newqr:(state[index].toString()) } ViewerContainer.dispatchEvent( new AppEvent("newQuery",data)); and in Mapmanager.mxml init() I haveViewerContainer.addEventListener("newQuery", chgQuery);private function chgQuery(event:AppEvent):void { var lquery:String = new String(); lquery=(event.data.newqr.toString()); newSDEquery= "STATE=" + lquery; }Once I receive this from layerlist widget in Mapmanager.mxml I try to plug it in function addLayerToMap(layerObject:Object)
under case dynamic asdynLayer.layerDefinitions= newSDEquery;
However I never get the map with new query results. I just need the map with query results. However I still have the same old map before I send a query. It would be great if someone could enlighten me to what needs to be done. I am using Flex Viewer 2.3.1. Thank you.