Represents a record in a data/FeatureSource!FeatureSource. Both spatial and non-spatial features have attributes, while only spatial features have geometry.

Hierarchy (view full)

Constructors

Properties

_handles: Handles<unknown, ResourceHandle>
_id: string

The unique ID for this entity. Once set, this should never change.

_itemType: string = ItemType.FEATURE

The item type for this entity when it participates in an App.

Do not directly reference this property. Use EventNames and EventTypes helpers from @arcgis/core/Evented.

attachments: Collection<Attachment>

Attachments associated with this feature. See fetchAttachments.

attributes: CaseInsensitiveObservableMap<unknown>

The feature's attributes, keyed by field name.

expressionFieldValues: ReadOnlyMap<string, unknown>

The Expression values associated with this feature. See fetchExpressionInfos.

schema: Schema

Metadata about the feature, such as fields, domains, geometry type, etc.

settings: FeatureSettings

Settings for this feature.

Accessors

  • get attachmentsInitialized(): boolean
  • Indicates whether attachments have been fetched at least once.

    Returns boolean

  • get description(): string
  • A human-readable description for the feature.

    Returns string

  • get expressionsInitialized(): boolean
  • Indicates whether async Arcade expressions have been evaluated at least once.

    Returns boolean

  • get geometry(): GeometryUnion
  • The feature's geometry. For non-spatial features, this will be undefined.

    Returns GeometryUnion

  • set geometry(value): void
  • Parameters

    • value: GeometryUnion

    Returns void

  • get geometryType(): string
  • The type of geometry. This property will be undefined if the data is not spatial.

    Returns string

  • get globalId(): string
  • Returns the feature's global ID if set and supported by its underlying source. If the feature's source does not support global IDs, then reading this value will return undefined, and attempting to set this property will result in an error. Use hasGlobalId to check if it's supported.

    Returns string

  • set globalId(value): void
  • Parameters

    • value: string

    Returns void

  • get hasGlobalId(): boolean
  • Determines whether this feature has a global ID field.

    Returns boolean

  • Hyperlinks associated with the feature. Note: This collection is read-only. To change hyperlinks, modify the hyperlinkTemplates setting instead.

    Returns Collection<Hyperlink>

  • get id(): string
  • The unique ID for this entity.

    Returns string

  • get itemType(): string
  • The item type for this entity when it participates in an App.

    Returns string

  • get primaryKey(): string
  • The attribute value of the Feature's OBJECTID (oid) field.

    Returns string

  • get relatedFeaturesInitialized(): boolean
  • Indicates whether related features have been fetched at least once, if this feature has relationships.

    Returns boolean

  • get title(): string
  • A human readable title for the feature.

    Returns string

  • get type(): FeatureType
  • The Esri API FeatureType object that is associated with this feature.

    Returns FeatureType

Methods

  • Called to perform cleanup. Subclasses should override this method rather than destroy() to perform custom cleanup.

    Returns Promise<void>

  • Called after normal initialization. Note: Child items are initialized before this is called.

    Returns Promise<void>

  • Clears the cached values for all "expression info" contained in the PopupTemplate.

    Returns void

  • Deletes attachments from the feature.

    Parameters

    • attachments: (string | Attachment)[]

      The attachments or the ids of the attachments to delete.

    Returns Promise<void>

  • A clean-up function that should get called whenever the item is disposed of.

    Returns Promise<void>

  • Retrieves attachments that are associated with this feature.

    Returns Promise<void>

  • Fetches or updates the cached values for all "expression infos" contained in the PopupTemplate.

    Parameters

    • watch: boolean = false

      If specified "expression infos" will be reevaluated when the feature's attributes change.

    Returns Promise<IHandle>

  • Fetches features that are related to this feature. Features are available through Feature.relatedFeatures.

    Parameters

    • Optionalrelationships: string | Relationship | (string | Relationship)[]

      The relationships or relationship IDs to fetch related features for. If omitted, all related features will be fetched.

    • Optionaloptions: FetchRelatedFeaturesOptions

      Additional options that affect fetching related features.

    Returns Promise<void>

  • Same as utilities/format/string!StringFormatter.format, except that the format string may also contain field format items, which have this syntax: {field-name[:format]}.

    These items will be substituted with the appropriate field value. Null and undefined values will be converted into empty strings.

    Parameters

    • format: string

      The format string to use.

    • Rest...args: unknown[]

    Returns string

  • Same as utilities/format/string!StringFormatter.format, except that the format string may also contain field format items, which have this syntax: {field-name[:format]}.

    These items will be substituted with the appropriate field value. Null and undefined values will be converted into empty strings.

    Parameters

    Returns string

  • Initializes the item.

    Returns Promise<void>

  • Converts the feature to an Esri Graphic object.

    Returns Graphic

  • Creates an item:// URI reference to this entity.

    Returns string