Class: BufferParameters

Description

Sets the distances, units, and other parameters for a buffer operation. Note: features parameter replaced by geometries: v2.0

Samples

Search for samples that use this class.  

Class hierarchy

esri.tasks.BufferParameters

Constructor

Constructor Description
esri.tasks.BufferParameters() Creates a new BufferParameters object. The constructor takes no parameters.

Properties

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.
Constructor Detail

esri.tasks.BufferParameters()

Creates a new BufferParameters object. The constructor takes no parameters.
Code snippets:
var params = new esri.tasks.BufferParameters();
Properties Detail

<SpatialReference> bufferSpatialReference

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.
Code snippets:
params.bufferSpatialReference = new esri.SpatialReference({wkid: 32662});

<Number[]> distances

The distances the input features are buffered. The distance units are specified by unit.
Code snippets:
params.distances = [ dojo.byId('bufferDistance').value ];

<Geometry[]> geometries

The input geometries to buffer. (As of v2.0)
Code snippets:
params.geometries  = [ evt.mapPoint ];

<SpatialReference> outSpatialReference

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.
Code snippets:
params.outSpatialReference = map.spatialReference;

<Boolean> unionResults

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.
Known values: true | false
Default value: false

<String> unit

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.
Code snippets:
params.unit = esri.tasks.GeometryService.UNIT_KILOMETER;