Provides methods for handling ESRI-style attributes

Hierarchy (view full)

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

  • Will apply any field config metadata to a layer. Should be used after loading process has populated .fields property of the layer

    Parameters

    • layer: LayerInstance

      the layer to apply the additional configuration to. Will be modified.

    • fieldMetadata: undefined | RampLayerFieldMetadataConfig = undefined

      field settings from the config object. can be undefined

    Returns void

  • 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, tooltipField). 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

    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.