IFeatureLayer

Interface

Feature layers can be created by referencing a layer from either a map service or a feature service or by specifying a feature collection object. Use a map service if you just want to retrieve geometries and attributes from the server and symbolize them yourself. Use a feature service if you want to take advantage of symbols from the service's source map document. Also, use a feature service if you plan on doing editing with the feature layer. Feature layers honor any feature templates configured in the source map document. Feature collection objects are used to create a feature layer based on the supplied definition.

Inheritance: IFeatureLayerILayerISupportsTime

Properties

Hide inherited properties
PropertyTypeNotes
string

A comma-separated string listing which editing operations are allowed on an editable feature service.

IDefinitionEditor

Stores interactive filters.

""

Indicates whether to allow a client to ignore popups defined by the service item.

any

A featureCollection object defining a layer of features whose geometry and attributes are either stored directly within the web map or with an item. Feature Collections can be created from CSVs, shapefiles, GPX, or map notes.

"route" | "markup" | "notes"

Indicates the type of features in the feature collection. If featureCollectionType is missing, it means the feature collection is a regular single-layer or multi-layer feature collection.

ILayerDefinition

A layerDefinition object defining the attribute schema and drawing information for the layer.

"ArcGISFeatureLayer"

String indicating the layer type.

"0" | "1" | "2"

0 is snapshot mode. 1 is on-demand mode. 2 is selection-only mode. Used with ArcGIS feature services and individual layers in ArcGIS map services.

IPopupInfo

A popupInfo object defining the content of popup windows when you click or query a feature.

number

Refresh interval of the layer in minutes. Non-zero value indicates automatic layer refresh at the specified interval. Value of 0 indicates auto refresh is not enabled.

""

Labels will display if this property is set to true and the layer also has a labelingInfo property associated with it. This property can get stored in the web map config and in the item/data.

timeAnimation
inherited
boolean

This property is applicable to layers that support time. If 'true', timeAnimation is enabled.

number[]

An array of sublayer ids that should appear visible. Used with feature layers that are based on feature collections.

capabilities

optional
Interface Property
capabilities: string

A comma-separated string listing which editing operations are allowed on an editable feature service.

definitionEditor

optional
Interface Property
definitionEditor: IDefinitionEditor

Stores interactive filters.

disablePopup

optional
Interface Property
disablePopup: ""

Indicates whether to allow a client to ignore popups defined by the service item.

featureCollection

optional
Interface Property
featureCollection: any

A featureCollection object defining a layer of features whose geometry and attributes are either stored directly within the web map or with an item. Feature Collections can be created from CSVs, shapefiles, GPX, or map notes.

featureCollectionType

optional
Interface Property
featureCollectionType: "route" | "markup" | "notes"

Indicates the type of features in the feature collection. If featureCollectionType is missing, it means the feature collection is a regular single-layer or multi-layer feature collection.

layerDefinition

optional
Interface Property
layerDefinition: ILayerDefinition

A layerDefinition object defining the attribute schema and drawing information for the layer.

layerType

Interface Property
layerType: "ArcGISFeatureLayer"

String indicating the layer type.

mode

optional
Interface Property
mode: "0" | "1" | "2"

0 is snapshot mode. 1 is on-demand mode. 2 is selection-only mode. Used with ArcGIS feature services and individual layers in ArcGIS map services.

popupInfo

optional
Interface Property
popupInfo: IPopupInfo

A popupInfo object defining the content of popup windows when you click or query a feature.

refreshInterval

optional
Interface Property
refreshInterval: number

Refresh interval of the layer in minutes. Non-zero value indicates automatic layer refresh at the specified interval. Value of 0 indicates auto refresh is not enabled.

showLabels

optional
Interface Property
showLabels: ""

Labels will display if this property is set to true and the layer also has a labelingInfo property associated with it. This property can get stored in the web map config and in the item/data.

timeAnimation

optionalinherited
Interface Property
timeAnimation: boolean

This property is applicable to layers that support time. If 'true', timeAnimation is enabled.

Inherited from ISupportsTime.timeAnimation

visibleLayers

optional
Interface Property
visibleLayers: number[]

An array of sublayer ids that should appear visible. Used with feature layers that are based on feature collections.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.