import BufferParameters from "@arcgis/core/rest/support/BufferParameters.js";const BufferParameters = await $arcgis.import("@arcgis/core/rest/support/BufferParameters.js");- Inheritance:
- BufferParameters→
Accessor
- 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
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| properties | | |
Properties
| Property | Type | Class |
|---|---|---|
| | ||
declaredClass readonly inherited | ||
| | ||
| | ||
| | ||
| | ||
| | ||
| |
bufferSpatialReference
- 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.
geodesic
- 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
outSpatialReference
- 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
- 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
- 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
fromJSON
- Signature
-
fromJSON (json: any): any
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
| Parameter | Type | Description | Required |
|---|---|---|---|
| json | 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
- Signature
-
toJSON (): any
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.