Karl, It is a pretty straight forward work flow you does the addressToLocations method on the locateTask and take the map points from the result and then send them to a buffering operation on the Geometry Server then use the polygons from the buffers as the geometry for a QueryTask on the features you are looking for inside the buffers.Addrress Result Snippet: function onResult(candidates:Array, token:Object=null):void
{
var addressCandidate:AddressCandidate;
for (var i:int=0; i < candidates.length; i++)
{
addressCandidate=candidates;
if (addressCandidate.score > 80)
{
var pGeom:Geometry=addressCandidate.location;
pGeom.spatialReference=map.spatialReference;
var pArray:Array=[addressCandidate.location, addressCandidate.address, addressCandidate.score];
tpoints.push(pArray);
}
}
if (tpoints.length > 0)
{
qDistrict(); //Your buffering function
}
A Buffering Function Snippet: private function bufferGeometries(geomArr:Array, sr:SpatialReference, dist:Array, unit:Number):void
{
if (geomArr)
{
showMessage("Buffering...",true);
var bufferParameters:BufferParameters = new BufferParameters();
var resultEvent:Polygon = new Polygon;
bufferParameters.geometries = geomArr;
bufferParameters.bufferSpatialReference = sr;
bufferParameters.unit = unit;
bufferParameters.distances = dist;
bufferParameters.unionResults = dischk.selected;
bufferParameters.outSpatialReference = map.spatialReference;
geometryService.buffer(bufferParameters,new AsyncResponder(bufferCompleteHandler,bufferFault));
function bufferCompleteHandler(event:Array, token:Object):void
{
for each(resultEvent in event)
{
try
{
var graphic:Graphic = new Graphic();
graphic.geometry = resultEvent;
graphic.symbol = sfs;
var attribs:Object =
{
distance: textInputBuffer.text,
unit: configBufferUnits[cboBufferUnit.selectedIndex].name
}
graphic.attributes = attribs;
graphicsLayerBuffer.add(graphic);
clearMessage();
}
catch (error:Error)
{
showMessage(error.message, false, true);
}
}
}
function bufferFault(event:Fault, token:Object):void
{
showMessage(event.message, false, true);
}
}
}