Class EsriFeatureLayer

Hierarchy

  • Layer
  • OrderedLayer
  • PortalLayer
  • ScaleRangeLayer
  • TemporalLayer
  • BlendLayer
  • CustomParametersMixin
  • APIKeyMixin
  • FeatureEffectLayer
  • FeatureReductionLayer
  • PublishableLayer
  • FeatureLayerBase
    • EsriFeatureLayer

Constructors

Properties

Methods

Constructors

  • A FeatureLayer is a single layer that can be created from a Map Service or Feature Service; ArcGIS Online or ArcGIS Enterprise portal items; or from an array of client-side features.

    Read more...

    Parameters

    • Optional properties: FeatureLayerProperties

    Returns EsriFeatureLayer

Properties

apiKey: string

An authorization string used to access a resource or service.

Read more...

blendMode: "screen" | "average" | "color-burn" | "color-dodge" | "color" | "darken" | "destination-atop" | "destination-in" | "destination-out" | "destination-over" | "difference" | "exclusion" | "hard-light" | "hue" | "invert" | "lighten" | "lighter" | "luminosity" | "minus" | "multiply" | "normal" | "overlay" | "plus" | "reflect" | "saturation" | "soft-light" | "source-atop" | "source-in" | "source-out" | "vivid-light" | "xor"

Blend modes are used to blend layers together to create an interesting effect in a layer, or even to produce what seems like a new layer.

Default

normal

[Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-BlendLayer.html#blendMode)
capabilities: Capabilities

Describes the layer's supported capabilities.

Read more...

copyright: string

Copyright information for the layer.

Read more...

customParameters: any

A list of custom parameters appended to the URL of all resources fetched by the layer.

Read more...

datesInUnknownTimezone: boolean

This property is set by the service publisher and indicates that dates should be considered without the local timezone.

Default

false

[Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-FeatureLayerBase.html#datesInUnknownTimezone)
declaredClass: string
definitionExpression: string

The SQL where clause used to filter features on the client.

Read more...

destroyed: boolean
displayField: string

The name of the layer's primary display field.

Read more...

dynamicDataSource: DynamicMapLayer | DynamicDataLayer

An object that allows you to create a dynamic layer with data either from map service sublayers or data from a registered workspace.

Read more...

editFieldsInfo: EditFieldsInfo

The editor tracking fields, which record who adds or edits the data through the feature service and when edits are made.

Read more...

editingEnabled: boolean

Determines if the layer is editable.

Default

true

[Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#editingEnabled)
editingInfo: EditFieldsInfo

The editor tracking fields, which record who adds or edits the data through the feature service and when edits are made.

Read more...

effect: Effect

Effect provides various filter functions that can be performed on the layer to achieve different visual effects similar to how image filters work.

Default

null

[Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-BlendLayer.html#effect)
effectiveCapabilities: Capabilities

Describes effective capabilities of the layer taking in to consideration privileges of the currently signed-in user.

Read more...

effectiveEditingEnabled: boolean

Indicates whether the layer is editable taking in to consideration privileges of the currently signed-in user.

Read more...

elevationInfo: FeatureLayerBaseElevationInfo

Specifies how features are placed on the vertical axis (z).

Read more...

featureEffect: FeatureEffect

The featureEffect can be used to draw attention features of interest.

Read more...

featureReduction: FeatureReductionBinning | FeatureReductionCluster | FeatureReductionSelection

Configures the method for reducing the number of point features in the view.

Read more...

fields: EsriField[]

An array of fields in the layer.

Read more...

fieldsIndex: FieldsIndex

A convenient property that can be used to make case-insensitive lookups for a field by name.

Read more...

floorInfo: LayerFloorInfo

When a feature layer is configured as floor-aware, it has a floorInfo property defined.

Read more...

formTemplate: FormTemplate

The template used in an associated layer's FeatureForm.

Read more...

fullExtent: EsriExtent

The full extent of the layer.

Read more...

gdbVersion: string

The version of the geodatabase of the feature service data.

Read more...

geometryFieldsInfo: GeometryFieldsInfo

Provides information on the system maintained area and length fields along with their respective units.

Read more...

geometryType: "point" | "multipoint" | "polyline" | "polygon" | "multipatch" | "mesh"

The geometry type of features in the layer.

Read more...

hasM: boolean

Indicates whether the client-side features in the layer have M (measurement) values.

Default

undefined

[Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-FeatureLayerBase.html#hasM)
hasZ: boolean

Indicates whether the client-side features in the layer have Z (elevation) values.

Default

undefined

[Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-FeatureLayerBase.html#hasZ)
historicMoment: Date

The historic moment to query.

Read more...

id: string

The unique ID assigned to the layer.

Read more...

initialized: boolean
isTable: boolean

Returns true if the layer is loaded from a non-spatial table in a service.

Default

false

[Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-FeatureLayerBase.html#isTable)
labelingInfo: LabelClass[]

The label definition for this layer, specified as an array of LabelClass.

Read more...

labelsVisible: boolean

Indicates whether to display labels for this layer.

Default

true

[Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#labelsVisible)
layerId: number

The layer ID, or layer index, of a Feature Service layer.

Read more...

legendEnabled: boolean

Indicates whether the layer will be included in the legend.

Default

true

[Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#legendEnabled)
listMode: "show" | "hide" | "hide-children"

Indicates how the layer should display in the LayerList widget.

Default

"show"

[Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html#listMode)
loadError: Error

The Error object returned if an error occurred while loading.

Default

null

[Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Loadable.html#loadError)
loadStatus: "loaded" | "loading" | "not-loaded" | "failed"

Represents the status of a load operation.

Default

not-loaded

[Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Loadable.html#loadStatus)
loadWarnings: any[]

A list of warnings which occurred while loading.

Read more...

loaded: boolean

Indicates whether the layer's resources have loaded.

Default

false

[Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html#loaded)
maxScale: number

The maximum scale (most zoomed in) at which the layer is visible in the view.

Default

0

[Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-ScaleRangeLayer.html#maxScale)
minScale: number

The minimum scale (most zoomed out) at which the layer is visible in the view.

Default

0

[Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-ScaleRangeLayer.html#minScale)
objectIdField: string

The name of an oid field containing a unique value or identifier for each feature in the layer.

Read more...

opacity: number

The opacity of the layer.

Default

1

[Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html#opacity)
orderBy: OrderedLayerOrderBy[]

Determines the order in which features are drawn in the view.

Default

null

[Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-OrderedLayer.html#orderBy)
outFields: string[]

An array of field names from the service to include with each feature.

Default

null

[Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#outFields)
popupEnabled: boolean

Indicates whether to display popups when features in the layer are clicked.

Default

true

[Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#popupEnabled)
popupTemplate: PopupTemplate

The popup template for the layer.

Read more...

portalItem: PortalItem

The portal item from which the layer is loaded.

Read more...

publishingInfo: PublishingInfo

Checks layer's publishing status while the layer is being published to the portal.

Read more...

refreshInterval: number

Refresh interval of the layer in minutes.

Default

0

[Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#refreshInterval)
relationships: Relationship[]

Array of relationships set up for the layer.

Read more...

renderer: EsriRenderer

The renderer assigned to the layer.

Read more...

returnM: boolean

When true, indicates that M values will be returned.

Default

undefined

[Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-FeatureLayerBase.html#returnM)
returnZ: boolean

When true, indicates that z-values will always be returned.

Default

undefined

[Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-FeatureLayerBase.html#returnZ)
screenSizePerspectiveEnabled: boolean

Apply perspective scaling to screen-size point symbols in a SceneView.

Default

true

[Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#screenSizePerspectiveEnabled)
serviceDefinitionExpression: string

The service definition expression limits the features available for display and query.

Read more...

source: Collection<EsriGraphic>

A collection of Graphic objects used to create a FeatureLayer.

Read more...

sourceJSON: any

The feature service's metadata JSON exposed by the ArcGIS REST API.

Read more...

spatialReference: EsriSpatialReference

The spatial reference of the layer.

Read more...

templates: FeatureTemplate[]

An array of feature templates defined in the feature layer.

Read more...

timeExtent: TimeExtent

The layer's time extent.

Default

null

[Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-TemporalLayer.html#timeExtent)
timeInfo: TimeInfo

TimeInfo provides information such as date fields that store start and end time for each feature and the fullTimeExtent for the layer.

Default

null

[Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-TemporalLayer.html#timeInfo)
timeOffset: TimeInterval

A temporary offset of the time data based on a certain TimeInterval.

Default

null

[Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-TemporalLayer.html#timeOffset)
title: string

The title of the layer used to identify it in places such as the LayerList widget.

Read more...

type: "feature"
typeIdField: string

The name of the field holding the type ID or subtypes for the features.

Read more...

types: FeatureType[]

An array of subtypes defined in the feature service exposed by ArcGIS REST API.

Read more...

url: string

The absolute URL of the REST endpoint of the layer, non-spatial table or service.

Read more...

useViewTime: boolean

Determines if the layer will update its temporal data based on the view's timeExtent.

Default

true

[Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-TemporalLayer.html#useViewTime)
version: number

The version of ArcGIS Server in which the layer is published.

Read more...

visible: boolean

Indicates if the layer is visible in the View.

Default

true

[Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html#visible)

Methods

  • Parameters

    • propertyName: string

    Returns any

  • Type Parameters

    • T

    Parameters

    • propertyName: string

    Returns T

  • Type Parameters

    • T

    Parameters

    • propertyName: string
    • value: T

    Returns EsriFeatureLayer

  • Adds an attachment to a feature.

    Read more...

    Parameters

    • feature: EsriGraphic
    • attachment: HTMLFormElement | FormData

    Returns Promise<FeatureEditResult>

  • Type Parameters

    • T

    Parameters

    • handles: IHandle | IHandle[]
    • Optional groupKey: Exclude<T, IHandle>

    Returns void

  • Applies edits to features in a layer.

    Read more...

    Parameters

    • edits: FeatureLayerBaseApplyEditsEdits
    • Optional options: FeatureLayerBaseApplyEditsOptions

    Returns Promise<EditsResult>

  • Cancels a load() operation if it is already in progress.

    Read more...

    Returns void

  • Called by the views, such as MapView and SceneView, when the layer is added to the Map.layers collection and a layer view must be created for it.

    Read more...

    Parameters

    • view: any
    • Optional options: LayerCreateLayerViewOptions

    Returns Promise<LayerView>

  • Creates a popup template for the layer, populated with all the fields of the layer.

    Read more...

    Parameters

    • Optional options: CreatePopupTemplateOptions

    Returns PopupTemplate

  • Deletes attachments from a feature.

    Read more...

    Parameters

    Returns Promise<FeatureEditResult[]>

  • Destroys the layer and any associated resources (including its portalItem, if it is a property on the layer).

    Read more...

    Returns void

  • Emits an event on the instance.

    Read more...

    Parameters

    • type: string
    • Optional event: any

    Returns boolean

  • Fetches custom attribution data for the layer when it becomes available.

    Read more...

    Returns Promise<any>

  • Type Parameters

    • T

    Parameters

    • propertyName: string

    Returns T

  • Parameters

    • propertyName: string

    Returns any

  • Returns a FeatureType describing the feature's type.

    Read more...

    Parameters

    Returns FeatureType

  • Returns the Field instance for a field name (case-insensitive).

    Read more...

    Parameters

    • fieldName: string

    Returns EsriField

  • Returns the Domain associated with the given field name.

    Read more...

    Parameters

    • fieldName: string
    • Optional options: FeatureLayerBaseGetFieldDomainOptions

    Returns Domain

  • Indicates whether there is an event listener on the instance that matches the provided event name.

    Read more...

    Parameters

    • type: string

    Returns boolean

  • Type Parameters

    • T

    Parameters

    • Optional groupKey: Exclude<T, IHandle>

    Returns boolean

  • isFulfilled() may be used to verify if creating an instance of the class is fulfilled (either resolved or rejected).

    Read more...

    Returns boolean

  • isRejected() may be used to verify if creating an instance of the class is rejected.

    Read more...

    Returns boolean

  • isResolved() may be used to verify if creating an instance of the class is resolved.

    Read more...

    Returns boolean

  • Loads the resources referenced by this class.

    Read more...

    Parameters

    • Optional signal: AbortSignal

    Returns Promise<any>

  • Parameters

    • propertyName: string

    Returns void

  • Parameters

    • name: "refresh"
    • eventHandler: FeatureLayerRefreshEventHandler

    Returns IHandle

  • Parameters

    • name: "edits"
    • eventHandler: FeatureLayerEditsEventHandler

    Returns IHandle

  • Parameters

    • name: "layerview-create"
    • eventHandler: FeatureLayerLayerviewCreateEventHandler

    Returns IHandle

  • Parameters

    • name: "layerview-create-error"
    • eventHandler: FeatureLayerLayerviewCreateErrorEventHandler

    Returns IHandle

  • Parameters

    • name: "layerview-destroy"
    • eventHandler: FeatureLayerLayerviewDestroyEventHandler

    Returns IHandle

  • Deprecated

    Since 4.25. Use addHandles(), removeHandles() and hasHandles() instead.

    Parameters

    • handles: IHandle | IHandle[]

    Returns void

  • Query information about attachments associated with features.

    Read more...

    Parameters

    • attachmentQuery: AttachmentQuery | AttachmentQueryProperties
    • Optional options: FeatureLayerBaseQueryAttachmentsOptions

    Returns Promise<any>

  • Executes a Query against the feature service and returns the Extent of features that satisfy the query.

    Read more...

    Parameters

    • Optional query: EsriQuery | QueryProperties
    • Optional options: FeatureLayerQueryExtentOptions

    Returns Promise<any>

  • Executes a Query against the feature service and returns the number of features that satisfy the query.

    Read more...

    Parameters

    • Optional query: EsriQuery | QueryProperties
    • Optional options: FeatureLayerQueryFeatureCountOptions

    Returns Promise<number>

  • Executes a Query against the feature service and returns a FeatureSet, which can be accessed using the .then() method once the promise resolves.

    Read more...

    Parameters

    • Optional query: EsriQuery | QueryProperties
    • Optional options: FeatureLayerQueryFeaturesOptions

    Returns Promise<FeatureSet>

  • Executes a Query against the feature service and returns an array of Object IDs for features that satisfy the input query.

    Read more...

    Parameters

    • Optional query: EsriQuery | QueryProperties
    • Optional options: FeatureLayerQueryObjectIdsOptions

    Returns Promise<number[]>

  • Executes a RelationshipQuery against the feature service and returns FeatureSets grouped by source layer or table objectIds.

    Read more...

    Parameters

    • relationshipQuery: RelationshipQuery | RelationshipQueryProperties
    • Optional options: FeatureLayerBaseQueryRelatedFeaturesOptions

    Returns Promise<any>

  • Executes a RelationshipQuery against the feature service and when resolved, it returns an object containing key value pairs.

    Read more...

    Parameters

    • relationshipQuery: RelationshipQuery | RelationshipQueryProperties
    • Optional options: FeatureLayerBaseQueryRelatedFeaturesCountOptions

    Returns Promise<any>

  • Executes a TopFeaturesQuery against a feature service and returns the count of features or records that satisfy the query.

    Read more...

    Parameters

    • topFeaturesQuery: TopFeaturesQuery | TopFeaturesQueryProperties
    • Optional options: FeatureLayerQueryTopFeatureCountOptions

    Returns Promise<number>

  • Executes a TopFeaturesQuery against a feature service and returns a FeatureSet once the promise resolves.

    Read more...

    Parameters

    • topFeaturesQuery: TopFeaturesQuery | TopFeaturesQueryProperties
    • Optional options: FeatureLayerQueryTopFeaturesOptions

    Returns Promise<FeatureSet>

  • Executes a TopFeaturesQuery against a feature service and returns the Extent of features that satisfy the query.

    Read more...

    Parameters

    • topFeaturesQuery: TopFeaturesQuery | TopFeaturesQueryProperties
    • Optional options: FeatureLayerQueryTopFeaturesExtentOptions

    Returns Promise<any>

  • Executes a TopFeaturesQuery against a feature service and returns an array of Object IDs of features that satisfy the query.

    Read more...

    Parameters

    • topFeaturesQuery: TopFeaturesQuery | TopFeaturesQueryProperties
    • Optional options: FeatureLayerQueryTopObjectIdsOptions

    Returns Promise<number[]>

  • Fetches all the data for the layer.

    Read more...

    Returns void

  • Type Parameters

    • T

    Parameters

    • Optional groupKey: Exclude<T, IHandle>

    Returns void

  • Saves the layer to its existing portal item in the Portal authenticated within the user's current session.

    Read more...

    Parameters

    • Optional options: FeatureLayerSaveOptions

    Returns Promise<PortalItem>

  • Saves the layer to a new portal item in the Portal authenticated within the user's current session.

    Read more...

    Parameters

    • portalItem: PortalItem | PortalItemProperties
    • Optional options: FeatureLayerSaveAsOptions

    Returns Promise<PortalItem>

  • Type Parameters

    • T

    Parameters

    • propertyName: string
    • value: T

    Returns EsriFeatureLayer

  • Parameters

    • props: HashMap<any>

    Returns EsriFeatureLayer

  • Updates an existing attachment for a feature.

    Read more...

    Parameters

    • feature: EsriGraphic
    • attachmentId: number
    • attachment: HTMLFormElement | FormData

    Returns Promise<FeatureEditResult>

  • Parameters

    • path: string | string[]
    • callback: WatchCallback
    • Optional sync: boolean

    Returns WatchHandle

  • when() may be leveraged once an instance of the class is created.

    Read more...

    Parameters

    • Optional callback: Function
    • Optional errback: Function

    Returns Promise<any>

Generated using TypeDoc