Hi, I am new to programming with Flex and GIS. I am using Flex 3.0. I have followed the example from the samples "Buffer Using Geometry Service" under "Geometry Service" in order to create a buffer around my point of interest. (http://resources.esri.com/help/9.3/arcgisserver/apis/flex/samples/index.html).
However, I am running into problems getting the data in the buffer. Does anyone know how to do this? The main code from the example is pasted below. Thanks in advance.
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:esri="http://www.esri.com/2008/ags" layout="absolute" pageTitle="Buffer using the Geometry Service"> <!-- This sample creates buffers around the center of the map. This example just draws the buffers, but the buffers could also be used to perform a task such as returning a list of addresses of people who live within the buffered area. --> <mx:Script> <![CDATA[ import com.esri.ags.SpatialReference; import com.esri.ags.events.GeometryServiceEvent; import com.esri.ags.tasks.BufferParameters; import com.esri.ags.Graphic;
private function bufferCenterOfMap():void { var myMapCenterPoint:Graphic = new Graphic(); myMapCenterPoint.geometry = myMap.extent.center;
var bufferParameters:BufferParameters = new BufferParameters(); bufferParameters.features = [myMapCenterPoint]; bufferParameters.distances = [2000, 4000]; bufferParameters.unit = BufferParameters.UNIT_METER; bufferParameters.bufferSpatialReference = new SpatialReference(102113);