Hide Table of Contents
esri/dijit/util
esri/layer/pixelFilters
esri/process
esri/support
esri/workers
Class: BufferParameters

dojo.require("esri.tasks.BufferParameters")

Description

(Added at v1.0)
Sets the distances, units, and other parameters for a buffer operation.

Samples

Search for samples that use this class.

Constructors

NameSummary
new esri.tasks.BufferParameters()Creates a new BufferParameters object.

Properties

NameTypeSummary
bufferSpatialReferenceSpatialReferenceThe spatial reference in which the geometries are buffered.
distancesNumber[]The distances the input features are buffered.
geodesicBooleanIf the input geometries are in geographic coordinate system set geodesic to true in order to generate a buffer polygon using a geodesic distance.
geometriesGeometry[]The input geometries to buffer.
outSpatialReferenceSpatialReferenceThe spatial reference for the returned geometries.
unionResultsBooleanIf 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.
unitNumberThe units for calculating each buffer distance.
Constructor Details

new esri.tasks.BufferParameters()

Creates a new BufferParameters object. The constructor takes no parameters.
Sample:

var params = new esri.tasks.BufferParameters();

Property Details

<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.
Sample:

params.bufferSpatialReference = new esri.SpatialReference({wkid: 32662});

<Number[]> distances

The distances the input features are buffered. The distance units are specified by unit.
Sample:

params.distances = [ dojo.byId('bufferDistance').value ];

<Boolean> geodesic

If the input geometries are in geographic coordinate system set geodesic to true in order to generate a buffer polygon using a geodesic distance. The bufferSpatialReference property is ignored when geodesic is set to true. Requires ArcGIS Server 10.1 or greater geometry service. For more information, see the ArcGIS REST API documentation on the GeometryService buffer operation and the geodesic property. (Added at v2.7)
Known values: true | false
Sample:
params.geodesic = true;

<Geometry[]> geometries

The input geometries to buffer. (Added at v2.0)
Sample:

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.
Sample:

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

<Number> 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 GeometryService constants table for values.

For a list of valid units, see esriSRUnitType Constants and esriSRUnit2Type Constants.
Sample:
params.unit = esri.tasks.GeometryService.UNIT_KILOMETER;
Show Modal