RAMP4 - v4.21.0
    Preparing search index...

    Provides methods for handling ESRI-style attributes

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    The instance of RampMap API scoped to a single Vue R4MP application.

    APIScope

    Accessors

    • get $element(): App<Element>

      Returns App<Element>

    • get $vApp(): ComponentPublicInstance

      The instance of Vue R4MP application controlled by this InstanceAPI. This is just a shorthand for this.$iApi.$vApp.

      Returns ComponentPublicInstance

      APIScope

    Methods

    • Gives an arcade variable type that corresponds to a field type.

      Parameters

      • fieldType: string

        a RAMP field type (same as ESRI field type)

      Returns EsriArcadeVarType | undefined

      matching arcade type, or undefined if a valid mapping could not be derived

    • Util function to manage trickery. Non-Arcgis layer sources can have field names that are bad keys. Our loader will have corrected them, but the ramp layer config may still be referencing the original names (e.g. nameField, maptipField). This function will attempt to return the valid field name for a given original field name.

      Parameters

      • fields: FieldDefinition[]

        array of valid fields for the layer

      • originalName: string

        field name as defined in the source

      Returns string

      a valid field name to use. Empty string if none found

    • Will generate the tabular transformation of an attribute set for a layer. The result will also be cached in the attribute source. If the result is already cached, it will be returned. The layer must be the owner of the attribute source. This method is generally called from an internal call within a layer. It exists as a public API to allow re-use across diverging layer types.

      Parameters

      • layer: LayerInstance

        the layer owning the attributes and the attribute source

      • attSource: AttribSource

        the attribute source for the attributes to transform

      Returns Promise<TabularAttributeSet>

    • Will generate an attribute set from a compact json object. This is our base format for DataLayer sources that are not hosted on ArcGIS server. Provided sourceDataJson on the details parameter has already been cleaned and has object ids inserted.

      Parameters

      • details: AttributeLoaderDetails

        defines the parameters for what to load

      • controller: AsynchAttribController

        the controller which provides asyncronous hooks into the load, including loaded count and ability to abort

      Returns Promise<AttributeSet>

    • Will generate an attribute set from a feature layer with local data (i.e. a file layer).

      Parameters

      • details: AttributeLoaderDetails

        defines the parameters for what to load

      • controller: AsynchAttribController

        the controller which provides asyncronous hooks into the load, including loaded count and ability to abort

      Returns Promise<AttributeSet>

    • Trims the desired attribute values for a feature set's attribute groups.

      Parameters

      • features: any[]

        The featureset to be trimmed.

      • fieldsToTrim: string[]

        Array of string names of the attributes to be trimmed.

      Returns any[]

      The featureset, trimmed.