I am using a tiledmapservicelayer to display a map and a querytask to return a geo id and polygon from the service and send the id to a coldfusion function in order fill datagrid/charts with related data.
I was wondering if it was possible to change the query layer and outfields base on what scale or what LOD the user was looking at. essentially I want to change the geographies returned as the user zooms in. I am new to flex/arcgis and I am not sure if I am going about reaching this goal the right way. below is a portion of my code. If someone could point me in the right direction it would be appreciated.
currently this works for one geography layer.
[Bindable] public var querylayer:Number = 4; [Bindable] public var code:String = "CSDUID"; private function fault(evt:FaultEvent):void { Alert.show(evt.fault.message); } private function result(evt:ResultEvent):void { GEODATAGRID.dataProvider = evt.result; } public function onMapClick(event:MapMouseEvent):void { query_1.geometry = event.mapPoint; queryTask_1.execute(query_1); } private function onQueryExecuteComplete(event:QueryEvent):void { myGraphicsLayer.clear(); graphicsLayer.clear(); var fset:FeatureSet = event.featureSet; for each (var graphic:Graphic in fset.features) { graphic.symbol = sfs; graphic.infoWindowRenderer = myInfoWindowRenderer; graphicsLayer.add(graphic); var GEOCODE:Object = new Object(); GEOCODE = graphic.attributes