Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "geocortex/infrastructure/buffer/BufferUtils"

Index

Variables

GCX_UNIT_YARDS

GCX_UNIT_YARDS: number

The geometry service has no inherent support for yards. Defining our own constant here so we can support it.

SUPPORTED_BUFFER_UNITS

SUPPORTED_BUFFER_UNITS: BufferUnits

The buffer units that the Buffer Module supports along with their descriptions. This static object will be populated with the configured language resources when the buffer module initializes.

Functions

buffer

  • Buffers an array of given geometries and returns a promise containing the Buffer Results. Note that all input geometries must be of the same type.

    Parameters

    • app: ViewerApplication

      The application that's requesting the buffer operation.

    • bufferParameters: BufferParameters

      The {@link esri.tasks.BufferParameters} object containing the buffer configuration.

    Returns Promise<BufferResultBase>

    A Promise returning a {@link infrastructure.buffer.BufferOperationResult} object on success and a {@link infrastructure.buffer.BufferOperationError} object on failure.

bufferGeometries

  • Buffers an array of given geometries and returns a promise containing the Buffer Results. The input geometries need not be of the same type. However, multiple buffer requests may be issued if geometries are of different types.

    Parameters

    • app: ViewerApplication

      The application that's requesting the buffer operation.

    • bufferGeometriesArgs: BufferGeometriesArgs

      The {@link infrastructure.buffer.BufferGeometriesArgs} object containing the buffer configuration.

    Returns Promise<BufferResultBase>

    A Promise returning a {@link infrastructure.buffer.BufferOperationResult} object on success and a {@link infrastructure.buffer.BufferOperationError} object on failure.

bufferGeometry

  • Buffers a given geometry and returns a promise containing the Buffer Results.

    Parameters

    • app: ViewerApplication

      The application that's requesting the buffer operation.

    • bufferGeometryArgs: BufferGeometryArgs

      The {@link infrastructure.buffer.BufferGeometryArgs} object containing the buffer configuration.

    Returns Promise<BufferResultBase>

    A Promise returning a {@link infrastructure.buffer.BufferOperationResult} object on success and a {@link infrastructure.buffer.BufferOperationError} object on failure.

convertLength

  • convertLength(length: number, fromUnit: number, toUnit: number): number
  • Parameters

    • length: number
    • fromUnit: number
    • toUnit: number

    Returns number

getGeometryServiceUnitConstant

  • getGeometryServiceUnitConstant(typeName: string, defaultUnit?: any): any
  • Returns the type of ESRI Geometry Service unit constant. Works for standard abbreviations, display text and esri.Unit constants. Will also work to convert between string representations of esri's geometry service unit constants and the constants themselves.

    Parameters

    • typeName: string
    • Optional defaultUnit: any

    Returns any

    esri.tasks.GeometryService unit constant

getUnitDescFromConfig

  • Retrieves the unit description from the configuration string used by the Buffer Module.

    Parameters

    • config: string

      A string containing the configuration value for which the unit description is required. Can be any SUPPORTED_BUFFER_UNITS property value.

    Returns BufferUnitDesc

    A {@link infrastructure.buffer.BufferUnitDesc} object with details about the configured language resources for the config string.

isGeographicWkid

  • isGeographicWkid(wkid: string | number): boolean
  • Checks to see if a given WKID is geographic or not.

    Parameters

    • wkid: string | number

    Returns boolean