# Function buffer

- buffer(geometries, distances, unit, unionResults?): Promise<Polygon | Polygon[]>

- Creates buffer polygons at a specified distances around the given geometries. The original geometry will not be modified.

  #### Parameters

  - geometries: GeometryUnion

    The geometry to buffer.

  - distances: number

    The distances between the buffer polygons and the geometries.

  - unit:
    | "feet"
    | "kilometers"
    | "meters"
    | "miles"
    | "nautical-miles"
    | "yards"

    The unit of the distance, see support/esri!DistanceUnit.

  - `Optional` unionResults: boolean

    If true, the returned buffers will be combined into a single polygon. Defaults to false.

  #### Returns Promise<Polygon | Polygon[]>

- buffer(geometries, distances, unit, unionResults?): Promise<Polygon | Polygon[]>

- #### Parameters

  - geometries: GeometryUnion[]
  - distances: number[]
  - unit:
    | "feet"
    | "kilometers"
    | "meters"
    | "miles"
    | "nautical-miles"
    | "yards"
  - `Optional` unionResults: boolean

  #### Returns Promise<Polygon | Polygon[]>