geoview-core - v2.1.2
    Preparing search index...

    Class EsriUtilities

    Index

    Constructors

    Methods

    • This method is used to process the layer's metadata. It will fill the empty fields of the layer's configuration (renderer, initial settings, fields and aliases).

      Type Parameters

      • T extends EsriDynamic | EsriFeature | EsriImage
      • U extends
            | EsriDynamicLayerEntryConfig
            | EsriImageLayerEntryConfig
            | EsriFeatureLayerEntryConfig

      Parameters

      • layer: T

        The ESRI layer instance pointer.

      • layerConfig: U

        The layer entry configuration to process.

      • OptionaldisplayDateMode: DisplayDateMode
      • OptionalabortSignal: AbortSignal

        Optional AbortSignal used to cancel the layer creation process.

      Returns Promise<U>

      A promise that the layer configuration has its metadata processed.

      When the metadata fetch fails or contains an error.

    • This method validates recursively the configuration of the layer entries to ensure that it is a feature layer identified with a numeric layerId and creates a group entry when a layer is a group.

      Parameters

      Returns void

      • This method performs indirect recursion by eventually delegating child validation to validateListOfLayerEntryConfig in a sub function called here.
    • Converts metadata mosaic method to ESRI REST API format.

      Parameters

      • method: string

        The metadata mosaic method.

      Returns TypeMosaicMethod

      The ESRI API mosaic method string.

    • Converts metadata mosaic operator to ESRI REST API format.

      Parameters

      • operator: string

        The metadata mosaic operator.

      Returns TypeMosaicOperation | undefined

      The ESRI API mosaic operation string.

    • Returns the domain of the specified field.

      Parameters

      • fields: TypeLayerMetadataFields[]

        The metadata field definitions to search.

      • fieldName: string

        Field name for which we want to get the domain.

      Returns codedValueType | rangeDomainType | undefined

      The domain of the field, or null if not found.

    • Returns the type of the specified field.

      For ESRI Image layers, well-known pixel fields (PixelValue, ProcessedValue, Name) are short-circuited to 'string' because they have no metadata entry.

      Parameters

      • layerConfig:
            | EsriDynamicLayerEntryConfig
            | EsriImageLayerEntryConfig
            | EsriFeatureLayerEntryConfig

        The ESRI layer config, used to detect EsriImage-specific fields.

      • fields: TypeLayerMetadataFields[]

        The metadata field definitions to search.

      • fieldName: string

        Field name for which we want to get the type.

      Returns TypeOutfieldsType

      The mapped outfield type ('date', 'oid', 'number', or 'string').

    • Transforms the query results of an Esri service response - when not querying on the Layers themselves (giving a 'reduced' FeatureInfoEntry). The transformation reads the Esri formatted information and return a list of TypeFeatureInfoEntryPartial records. In a similar fashion and response object as the "Query Feature Infos" functionalities done via the Layers.

      Parameters

      • records: EsriRelatedRecordsJsonResponseRelatedRecord[]

        The records representing the data from Esri.

      • OptionalgeometryType:
            | "Point"
            | "MultiPoint"
            | "LineString"
            | "MultiLineString"
            | "Polygon"
            | "MultiPolygon"

        Optional, the geometry type.

      Returns TypeFeatureInfoEntryPartial[]

      TypeFeatureInfoEntryPartial[] An array of relared records of type TypeFeatureInfoEntryPartial

    • Asynchronously queries an Esri feature layer given the url and returns an array of TypeFeatureInfoEntryPartial records.

      Parameters

      • url: string

        An Esri url indicating a feature layer to query

      • geometryType:
            | "Point"
            | "MultiPoint"
            | "LineString"
            | "MultiLineString"
            | "Polygon"
            | "MultiPolygon"
            | undefined

        The geometry type for the geometries in the layer being queried (used when geometries are returned)

      • parseFeatureInfoEntries: boolean = true

        A boolean to indicate if we use the raw esri output or if we parse it, defaults to true.

      Returns Promise<TypeFeatureInfoEntryPartial[]>

      A promise of an array of relared records of type TypeFeatureInfoEntryPartial, or an empty array.

      When the request exceeds the timeout duration.

      When the request was aborted by the caller's signal.

      When the response is not OK (non-2xx).

      When the JSON response is empty.

      When the response from the service is not an object.

      When the response actually contains an error within it.

      When a network issue happened.

    • Asynchronously queries an Esri feature layer given the url and object ids and returns an array of TypeFeatureInfoEntryPartial records.

      Parameters

      • layerUrl: string

        An Esri url indicating a feature layer to query

      • geometryType:
            | "Point"
            | "MultiPoint"
            | "LineString"
            | "MultiLineString"
            | "Polygon"
            | "MultiPolygon"
            | undefined

        The geometry type for the geometries in the layer being queried (used when returnGeometry is true)

      • objectIds: number[]

        The list of objectids to filter the query on

      • fields: string

        The list of field names to include in the output

      • geometry: boolean

        True to return the geometries in the output

      • OptionaloutSR: number

        The spatial reference of the output geometries from the query

      • OptionalmaxOffset: number

        The max allowable offset value to simplify geometry

      • parseFeatureInfoEntries: boolean = true

        A boolean to indicate if we use the raw esri output or if we parse it

      Returns Promise<TypeFeatureInfoEntryPartial[]>

      A promise of an array of relared records of type TypeFeatureInfoEntryPartial, or an empty array.

    • Asynchronously queries an Esri relationship table given the url and returns an array of TypeFeatureInfoEntryPartial records.

      Parameters

      • url: string

        An Esri url indicating a relationship table to query

      • recordGroupIndex: number

        The group index of the relationship layer on which to read the related records

      Returns Promise<TypeFeatureInfoEntryPartial[]>

      A promise of an array of relared records of type TypeFeatureInfoEntryPartial, or an empty array.

      Doesn't seem to be called anywhere.