Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Properties

Optional defaultVisibility

defaultVisibility: boolean

Boolean value indicating whether the layer's visibility is turned on.

Optional definitionExpression

definitionExpression: string

An optional SQL-based definition expression that narrows down the data to be displayed in the layer. Used with ArcGIS Server map services.

Optional displayField

displayField: string

The name of the field that best summarizes the feature. Values from this field are used by default as the titles for pop-up windows.

drawingInfo

drawingInfo: DrawingInfo

Optional featureReduction

featureReduction: FeatureReduction

Feature reductions declutter the screen by hiding features that would otherwise intersect with other features on screen.

Optional fields

fields: Field[]

An array of Field objects containing information about the attribute fields for the feature collection or layer.

Optional geometryType

geometryType: string

The type of geometry used in the layer definition. One of the GeometryType constants.

Optional hasAttachments

hasAttachments: boolean

Indicates whether attachments should be loaded for the layer.

Optional maxScale

maxScale: number

A number representing the maximum scale at which the layer definition will be applied. The number is the scale's denominator; thus, a value of 2400 represents a scale of 1/2,400. A value of 0 indicates that the layer definition will be applied no matter how far you zoom in.

Optional maximumTrackPoints

maximumTrackPoints: number

How many positions to draw on the map for stream layer items

Optional minScale

minScale: number

A number representing the minimum scale at which the layer definition will be applied. The number is the scale's denominator; thus, a value of 2400 represents a scale of 1/2,400.

Optional name

name: string

A string containing a unique name for the layer that could be displayed in a legend.

Optional objectIdField

objectIdField: string

Indicates the name of the object ID field in the dataset.

Optional source

source: object

An object indicating the layerDefinition's layer source.

Type declaration

  • Optional mapLayerId?: number
  • type: string

Optional templates

templates: Template[]

An array of template objects describing features that can be created in this layer. Templates are used with map notes, other feature collections, and editable web-based CSV layers. They are not used with ArcGIS feature services, which already have feature templates defined in the service.

Templates are defined as a property of the layer definition when there are no types defined; otherwise, templates are defined as properties of the types.

Optional type

type: string

Indicates whether the layerDefinition applies to a "Feature Layer" or a "Table".

Optional typeIdField

typeIdField: string

The name of the field holding the type ID for the features, if types exist for the dataset. Each available type has an ID, and each feature's typeIdField can be read to determine the type for each feature.

Optional types

types: Type[]

An array of Type objects available for the dataset. This is used when the typeIdField is populated.

Types contain information about the combinations of attributes that are allowed for features in the dataset. Each feature in the dataset can have a type, indicated in its typeIdField.