I would like to use the freehand tool and multipoint tool to select companies. The freehand tool works great. When I create a polygon it creates a polygon graphic and shows point for the companies inside the polygon I created. For the multipoint I would like to use points to select counties that would show companies inside those counties. The company layer is in one service and the county layer is in another but I could have them in just one service if necessary. So far I have been able to use the tool to select the counties, but my question is how can I show the points (the company) for the counties selected? I haven't found any similar example. Here is the code snippet I have so far: private function init():void { //things to do when the page creation is complete drawToolbar.fillSymbol = fillSymbol; drawToolbar.lineSymbol = lineSymbol; drawToolbar.markerSymbol = drawPointSymbol; drawToolbar.map = myMap; drawToolbar.addEventListener(DrawEvent.DRAW_END,onDrawEnd, false, 0, true); } private function itemClickHandler(event:ItemClickEvent):void { //This function handles button clicks freehandbutton.validateProperties(); myGraphicsLayer.clear(); //clear the graphics layer myPolygonGraphicsLayer.clear(); //clear away all infoWindows myMap.infoWindow.hide(); //clear the DataGrid /* var tempArray:Array = new Array(0); tempArray = null; */ /* querydg.dataProvider = tempArray; */ drawToolbar.fillSymbol = fillSymbol; if (freehandbutton.selectedIndex < 0) { // when toggling a tool off, deactivate it drawToolbar.deactivate(); }else{ switch (event.label) { case "Polygon Select": { drawToolbar.activate(DrawTool.POLYGON); myMap.panEnabled = false; break; } case "Freehand Polygon Select": { drawToolbar.activate(DrawTool.FREEHAND_POLYGON); myMap.panEnabled = false; break; } case "Multi Point Select": { drawToolbar.activate(DrawTool.MULTIPOINT); myMap.panEnabled = false; break; } } } } private function onDrawEnd(event:DrawEvent):void { drawToolbar.deactivate(); myGraphicsLayer.clear(); freehandbutton.selectedIndex = -1; multipointbutton.selectedIndex = -1; myMap.panEnabled = false; if (event.graphic.geometry is Polygon) { var drawPolygon : Graphic = new Graphic(); drawPolygon.geometry = event.graphic.geometry; drawPolygon.autoMoveToTop = false; //keep graphics from moving to top myPolygonGraphicsLayer.add(drawPolygon); runQueryTask(event.graphic.geometry); } else{ //Must be multipoint runQueryTask3(event.graphic.geometry);} } [Bindable] private var queryTask3:QueryTask = new QueryTask(); [Bindable] private var query3:Query = new Query(); private function runQueryTask3(geometry:Geometry):void { queryTask3.url = "http://tfs-24279/ArcGIS/rest/services/ForestProducts/county_forest_products/MapServer/0"; queryTask3.showBusyCursor = true; queryTask.useAMF = false; query3.geometry = geometry; //geometry from the drawToolbar query3.returnGeometry = true; //set to true because we want to place points on the map query3.spatialRelationship = "esriSpatialRelIntersects"; query3.outSpatialReference = myMap.spatialReference; query3.outFields = ['*']; //run the query task queryTask3.execute(query3, new AsyncResponder( onResult, onFault)); function onResult(featureSet:FeatureSet, token:Object = null):void { if (featureSet.features.length == 0){ Alert.show("No matching records found. Please try again."); resizableDraggableTitleWindow.visible = false; querydg2.visible = false; }else{ myGraphicslayer.clear() myGraphicslayer.visible = true; for each(var graphic : Graphic in featureSet.features) { graphic.symbol = fillSymbol; myGraphicslayer.add(graphic); } } if (featureSet.features.length > 1) { info.text = "There are " + featureSet.features.length + " matching records"; } if (featureSet.features.length == 1) { info.text = "There is " + featureSet.features.length + " matching record"; } } function onFault(info:Object, token:Object = null):void { Alert.show(info.toString(), "Query Problem"); } }