Skip to content
import BufferParameters from "@arcgis/core/rest/support/BufferParameters.js";
Inheritance:
BufferParametersAccessor
Since
ArcGIS Maps SDK for JavaScript 4.20

Sets the distances, units, and other parameters for the buffer() method on the geometryService.

See also

Constructors

Constructor

Constructor
Parameters
ParameterTypeDescriptionRequired
properties
See the properties table for a list of all the properties that may be passed into the constructor.

Properties

Any properties can be set, retrieved or listened to. See the Watch for changes topic.

bufferSpatialReference

autocast Property
Type
SpatialReference | null | undefined

The spatial reference in which the geometries are buffered.

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.

declaredClass

readonlyinherited Property
Type
string
Inherited from: Accessor

The name of the class. The declared class name is formatted as esri.folder.className.

distances

Property
Type
number[] | null | undefined

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

geodesic

Property
Type
boolean

If the input geometries are in a geographic coordinate system, set geodesic to true 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.

Default value
false

geometries

autocast Property
Type
GeometryUnion[]

The input geometries to buffer.

outSpatialReference

autocast Property
Type
SpatialReference | null | undefined

The spatial reference for the returned geometries.

If outSpatialReference is not specified, the output geometries are in the spatial reference specified by bufferSpatialReference. If bufferSpatialReference also is not specified, they are in the spatial reference of the features.

unionResults

Property
Type
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.

Default value
false

unit

Property
Type
GeometryOperationLengthUnit | null | undefined

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.

For a list of valid units, see esriSRUnitType Constants and esriSRUnit2Type Constants.

Methods

MethodSignatureClass
fromJSON
inherited static
fromJSON(json: any): any
toJSON
inherited
toJSON(): any

fromJSON

inheritedstatic Method
Signature
fromJSON (json: any): any
Inherited from: JSONSupportMixin

Creates a new instance of this class and initializes it with values from a JSON object generated from an ArcGIS product. The object passed into the input json parameter often comes from a response to a query operation in the REST API or a toJSON() method from another ArcGIS product. See the Using fromJSON() topic in the Guide for details and examples of when and how to use this function.

Parameters
ParameterTypeDescriptionRequired
json
any

A JSON representation of the instance in the ArcGIS format. See the ArcGIS REST API documentation for examples of the structure of various input JSON objects.

Returns
any

Returns a new instance of this class.

toJSON

inherited Method
Signature
toJSON (): any
Inherited from: JSONSupportMixin

Converts an instance of this class to its ArcGIS portal JSON representation. See the Using fromJSON() guide topic for more information.

Returns
any

The ArcGIS portal JSON representation of an instance of this class.