features parameter replaced by geometries: v2.0
esri.tasks.BufferParameters
| Constructor | Description |
|---|---|
| esri.tasks.BufferParameters() | Creates a new BufferParameters object. The constructor takes no parameters. |
| Property | Type | Description |
|---|---|---|
| bufferSpatialReference | SpatialReference |
The spatial reference in which the geometries are buffered. See Projected Coordinate Systems and Geographic Coordinate Systems for the list of supported spatial references. If bufferSpatialReference is not specified, the geometries are buffered in the spatial reference specified by outSpatialReference. If outSpatialReference is also not specified, they are buffered in the spatial reference of the features. |
| distances | Number[] | The distances the input features are buffered. The distance units are specified by unit. |
| geometries | Geometry[] | The input geometries to buffer. |
| outSpatialReference | SpatialReference |
The spatial reference for the returned geometries. See Projected Coordinate Systems and Geographic Coordinate Systems for the list of supported spatial references. If outSpatialReference is not specified, the output geometries are in the spatial reference specified by bufferSR. If bufferSpatialReference is also not specified, they are in the spatial reference of the features. |
| unionResults | Boolean | If true, all geometries buffered at a given distance are unioned into a single (possibly multipart) polygon, and the unioned geometry is placed in the output array. |
| unit | String | The units for calculating each buffer distance. If unit is not specified, the units are derived from bufferSpatialReference. If bufferSpatialReference is not specified, the units are derived from the features. See the Geometry service constants table for values. |
var params = new esri.tasks.BufferParameters();
params.bufferSpatialReference = new esri.SpatialReference({wkid: 32662});
params.distances = [ dojo.byId('bufferDistance').value ];
params.geometries = [ evt.mapPoint ];
params.outSpatialReference = map.spatialReference;
params.unit = esri.tasks.GeometryService.UNIT_KILOMETER;