# Interface LayerDefinitionJson

The LayerDefinition object defines the attribute schema and drawing information for a layer drawn using client-side graphics. This could include a feature collection, a CSV file referenced through the web, or a single layer in an ArcGIS map service. Also used for dynamic layers.

See https://developers.arcgis.com/web-map-specification/objects/layerDefinition/ https://developers.arcgis.com/web-scene-specification/objects/layerDefinition/.

interface LayerDefinitionJson {
allowGeometryUpdates?: boolean;
capabilities?: string;
copyrightText?: string;
currentVersion?: number;
defaultVisibility?: boolean;
definitionEditor?: DefinitionEditorJson;
definitionExpression?: string;
description?: string;
displayField?: string;
drawingInfo?: DrawingInfoJson;
elevationInfo?: ElevationInfoJson;
extent?: ExtentJson;
featureReduction?: FeatureReductionJson;
fieldOverrides?: FieldOverrideJson[];
fields?: FieldJson[];
floorInfo?: {
floorField: string;
};
geometryType?: string;
globalIdField?: string;
hasAttachments?: boolean;
hasM?: boolean;
hasStaticData?: boolean;
hasZ?: boolean;
htmlPopupType?: "esriServerHTMLPopupTypeAsHTMLText" | "esriServerHTMLPopupTypeAsURL" | "esriServerHTMLPopupTypeNone";
id?: string | number;
isDataVersioned?: boolean;
maxRecordCount?: number;
maxScale?: number;
minScale?: number;
name?: string;
objectIdField?: string;
orderBy?: OrderByClauseJson[];
overrideSymbols?: boolean;
rangeInfos?: RangeInfoJson[];
source?: DynamicDataLayerJson | DynamicMapLayerJson;
spatialReference?: SpatialReferenceJson;
supportedQueryFormats?: string;
supportsAdvancedQueries?: boolean;
supportsAttachmentsByUploadId?: boolean;
supportsCalculate?: boolean;
supportsRollbackOnFailureParameter?: boolean;
supportsStatistics?: boolean;
supportsValidateSql?: boolean;
templates?: TemplateJson[];
timeInfo?: LayerTimeInfoJson;
type?: string;
typeIdField?: string;
types?: TypeJson[];
visibilityField?: string;
}

#####
Index

### Properties

allowGeometryUpdates?
capabilities?
copyrightText?
currentVersion?
defaultVisibility?
definitionEditor?
definitionExpression?
description?
displayField?
drawingInfo?
elevationInfo?
extent?
featureReduction?
fieldOverrides?
fields?
floorInfo?
geometryType?
globalIdField?
hasAttachments?
hasM?
hasStaticData?
hasZ?
htmlPopupType?
id?
isDataVersioned?
maxRecordCount?
maxScale?
minScale?
name?
objectIdField?
orderBy?
overrideSymbols?
rangeInfos?
source?
spatialReference?
supportedQueryFormats?
supportsAdvancedQueries?
supportsAttachmentsByUploadId?
supportsCalculate?
supportsRollbackOnFailureParameter?
supportsStatistics?
supportsValidateSql?
templates?
timeInfo?
type?
typeIdField?
types?
visibilityField?

##
Properties

### `Optional` allowGeometryUpdates

allowGeometryUpdates?: boolean

Boolean value indicating whether the geometry of the features in the layer can be edited.

### `Optional` capabilities

capabilities?: string

A comma-separated string listing which editing operations are allowed on an editable feature service. Available operations include: Create | Delete | Query | Update | Editing.

### `Optional` copyrightText

copyrightText?: string

String value for the copyright text information for the layer.

### `Optional` currentVersion

currentVersion?: number

Numeric value indicating the server version of the layer.

### `Optional` defaultVisibility

defaultVisibility?: boolean

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

### `Optional` definitionEditor

definitionEditor?: DefinitionEditorJson

Stores interactive filters.

### `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` description

description?: string

String value of the layer as defined in the map service.

### `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.

### `Optional` drawingInfo

drawingInfo?: DrawingInfoJson

A drawingInfo object containing drawing, labeling, and transparency information for the layer.

### `Optional` elevationInfo

elevationInfo?: ElevationInfoJson

Specifies how graphics are placed on the vertical axis (z). This property may only be used in a SceneView.

### `Optional` extent

extent?: ExtentJson

The rectangular map extent that should be requested from the service, given in the format [[xmin, ymin],[xmax,ymax]].

### `Optional` featureReduction

featureReduction?: FeatureReductionJson

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

### `Optional` fieldOverrides

fieldOverrides?: FieldOverrideJson[]

The layer-specific overrides of field properties. Used by SubtypeGroupLayer to modify field information for each subtype. Any field missing from this array should be hidden.

### `Optional` fields

fields?: FieldJson[]

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

### `Optional` floorInfo

floorInfo?: {
floorField: string;
}

Contains floor-awareness information for the layer. See https://developers.arcgis.com/web-map-specification/objects/layerFloorInfo/.

#### Type declaration

- ##### floorField: string

  The name of the attribute field that contains a floor's level ID used for floor filtering.

### `Optional` geometryType

geometryType?: string

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

### `Optional` globalIdField

globalIdField?: string

The unique identifier for a feature or table row within a geodatabase.

### `Optional` hasAttachments

hasAttachments?: boolean

Indicates whether attachments should be loaded for the layer.

### `Optional` hasM

hasM?: boolean

Boolean value indicating whether layer has M values.

### `Optional` hasStaticData

hasStaticData?: boolean

Boolean value indicating whether data changes. True if it does not.

### `Optional` hasZ

hasZ?: boolean

Boolean value indicating whether layer has Z values.

### `Optional` htmlPopupType

htmlPopupType?: "esriServerHTMLPopupTypeAsHTMLText" | "esriServerHTMLPopupTypeAsURL" | "esriServerHTMLPopupTypeNone"

String value indicating the HTML popup type. Possible values are listed in the htmlPopupType table below.

### `Optional` id

id?: string | number

The identifier assigned to the layer.

### `Optional` isDataVersioned

isDataVersioned?: boolean

Boolean value indicating whether the data is versioned.

### `Optional` maxRecordCount

maxRecordCount?: number

Numeric value indicating the maximum number of records that will be returned at once for a query.

### `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` 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` orderBy

orderBy?: OrderByClauseJson[]

Determines the display order of features on the map.

### `Optional` overrideSymbols

overrideSymbols?: boolean

Dictates whether a client can support having an end user modify symbols on individual features.

### `Optional` rangeInfos

rangeInfos?: RangeInfoJson[]

Indicates range information.

### `Optional` source

source?: DynamicDataLayerJson | DynamicMapLayerJson

An object indicating the layerDefinition's layer source. See https://developers.arcgis.com/web-map-specification/objects/source/ https://developers.arcgis.com/web-scene-specification/objects/source/.

### `Optional` spatialReference

spatialReference?: SpatialReferenceJson

An object containing the WKID or WKT identifying the spatial reference of the layer's geometry.

### `Optional` supportedQueryFormats

supportedQueryFormats?: string

String value indicating the output formats that are supported in a query.

### `Optional` supportsAdvancedQueries

supportsAdvancedQueries?: boolean

Boolean value indicating whether the layer supports orderByFields in a query operation.

### `Optional` supportsAttachmentsByUploadId

supportsAttachmentsByUploadId?: boolean

Boolean value indicating whether the layer supports uploading attachments with the Uploads operation. This can be then used in the Add Attachment and Update Attachment operations.

### `Optional` supportsCalculate

supportsCalculate?: boolean

Boolean value indicating whether the layer supports the Calculate REST operation when updating features.

### `Optional` supportsRollbackOnFailureParameter

supportsRollbackOnFailureParameter?: boolean

Boolean value indicating whether the layer supports rolling back edits made on a feature layer if some of the edits fail.

### `Optional` supportsStatistics

supportsStatistics?: boolean

Boolean value indicating whether feature layer query operations support statistical functions.

### `Optional` supportsValidateSql

supportsValidateSql?: boolean

Boolean value indicating whether the validateSQL operation is supported across a feature service layer.

### `Optional` templates

templates?: TemplateJson[]

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` timeInfo

timeInfo?: LayerTimeInfoJson

The time info metadata of the layer. May be set for feature layers inside a feature collection item.

### `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?: TypeJson[]

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.

### `Optional` visibilityField

visibilityField?: string

String value indicating the attribute field that is used to control the visibility of a feature. If applicable, when rendering a feature the client should use this field to control visibility. The field's values are 0 = do not display, 1 = display.