Types
import type { FieldType, FieldValueType, FieldFormatUnion, DomainUnion, ControlPoints } from "@arcgis/core/layers/support/types.js";

Type definitions

FieldType

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

Supported field types.

Type
"small-integer" | "integer" | "single" | "double" | "long" | "string" | "date" | "oid" | "geometry" | "blob" | "raster" | "guid" | "global-id" | "xml" | "big-integer" | "date-only" | "time-only" | "timestamp-offset"

FieldValueType

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

Supported field value types.

Type
"binary" | "coordinate" | "count-or-amount" | "currency" | "date-and-time" | "description" | "email-address" | "location-or-place-name" | "measurement" | "name-or-title" | "none" | "ordered-or-ranked" | "percentage-or-ratio" | "phone-number" | "type-or-category" | "unique-identifier"

FieldFormatUnion

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

Supported field formatting types.

DomainUnion

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

Supported domain types. Domains are used to constrain allowable values of a layer.

ControlPoints

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

Control points used for image-to-map transformations.

Type
[ ControlPoint, ControlPoint ] | [ ControlPoint, ControlPoint, ControlPoint ] | [ ControlPoint, ControlPoint, ControlPoint, ControlPoint ]

BasemapGroundLayer

Type definition
Supertypes
default

GroundLayerUnion

Type definition

PointPlacement

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

Supported point label placement types.

Type
"above-center" | "above-left" | "above-right" | "center-center" | "center-left" | "center-right" | "below-center" | "below-left" | "below-right"

PolylinePlacement

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

Supported polyline label placement types.

Type
"above-along" | "below-along" | "center-along"

PolygonPlacement

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

Supported polygon label placement types.

Type
"always-horizontal"

PlacementType3D

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

Supported 3D label placement types.

Type
"above-center" | "above-left" | "above-right" | "center-center" | "center-left" | "center-right" | "below-center" | "below-left" | "below-right"

SublayerCapabilities

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

Describes supported capabilities for a sublayer.

attachment

Property
Type
SublayerCapabilitiesAttachment
Since
ArcGIS Maps SDK for JavaScript 5.0

Describes attachment capabilities that can be performed on the features in the layer.

data

Property
Type
SublayerCapabilitiesData
Since
ArcGIS Maps SDK for JavaScript 5.0

Describes characteristics of the data in the layer.

operations

Property
Type
SublayerCapabilitiesOperations
Since
ArcGIS Maps SDK for JavaScript 5.0

Describes operations that can be performed on features in the layer.

queryRelated

Property
Type
SublayerCapabilitiesQueryRelated
Since
ArcGIS Maps SDK for JavaScript 5.0

Indicates if the layer's query operation supports querying features or records related to features in the layer.

SublayerCapabilitiesAttachment

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

Describes attachment-related capabilities for a sublayer.

supportsResize

Property
Type
boolean
Since
ArcGIS Maps SDK for JavaScript 5.0

Indicates if resized attachments are supported in the layer. This is useful for showing thumbnails in Popups.

SublayerCapabilitiesData

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

Describes data-related capabilities for a sublayer.

supportsAttachment

Property
Type
boolean
Since
ArcGIS Maps SDK for JavaScript 5.0

Indicates if attachments are enabled on the layer.

SublayerCapabilitiesOperations

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

Describes operation-related capabilities for a sublayer.

supportsQuery

Property
Type
boolean
Since
ArcGIS Maps SDK for JavaScript 5.0

Indicates if features in the layer can be queried.

supportsQueryAttachments

Property
Type
boolean
Since
ArcGIS Maps SDK for JavaScript 5.0

Indicates if the layer supports REST API queryAttachments operation. If false, queryAttachments() method can only return attachments for one feature at a time. If true, queryAttachments() can return attachments for array of AttachmentQuery.objectIds.

SublayerCapabilitiesQueryRelated

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

Query-related capabilities for a sublayer.

Supertypes
Omit<QueryRelatedCapabilities‚ "supportsCacheHint">

I3SGeometryType

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

Supported I3S geometry types.

Type
"point" | "mesh"

SceneServiceVersion

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

The version information for a scene service.

major

Property
Type
number
Since
ArcGIS Maps SDK for JavaScript 5.0

The major version of the scene layer.

minor

Property
Type
number
Since
ArcGIS Maps SDK for JavaScript 5.0

The minor version of the scene layer.

versionString

Property
Type
string
Since
ArcGIS Maps SDK for JavaScript 5.0

The complete version string of the scene layer.

SpriteInfo

Type definition
Since
ArcGIS Maps SDK for JavaScript 4.25

A description of each image contained in the sprite. It describes the dimension and pixel ratio of each image and its location within the sprite image. This information is saved in the JSON index file containing description of each image.

x

Property
Type
number
Since
ArcGIS Maps SDK for JavaScript 5.0

The x position of the upper-left corner of the sprite.

y

Property
Type
number
Since
ArcGIS Maps SDK for JavaScript 5.0

The y position of the upper-left corner of the sprite.

width

Property
Type
number
Since
ArcGIS Maps SDK for JavaScript 5.0

The width of the sprite.

height

Property
Type
number
Since
ArcGIS Maps SDK for JavaScript 5.0

The height of the sprite.

pixelRatio

Property
Type
number | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

The pixel ratio of the sprite.

sdf

Property
Type
boolean | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

Whether the sprite is SDF or not.

Image

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

Image containing sprite data when setting sprite source VectorTileLayer via its setSpriteSource().

See also

ImageObject

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

Defines an image object that can be used when setting SpriteSourceImageInfo.

width

Property
Type
number
Since
ArcGIS Maps SDK for JavaScript 5.0

The width of the sprite.

height

Property
Type
number
Since
ArcGIS Maps SDK for JavaScript 5.0

The height of the sprite.

data

Property
Type
ArrayBuffer
Since
ArcGIS Maps SDK for JavaScript 5.0

The image data for the sprite.

SpriteSourceUrlInfo

Type definition
Since
ArcGIS Maps SDK for JavaScript 4.25

The URL of the sprite source to be fetched when the VectorTileLayer.setSpriteSource() method is called.

type

Property
Type
"url"
Since
ArcGIS Maps SDK for JavaScript 5.0

For SpriteSourceUrlInfo the type is always "url".

spriteUrl

Property
Type
string
Since
ArcGIS Maps SDK for JavaScript 5.0

The sprite source url.

pixelRatio

Property
Type
number | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

The device pixel ratio used to fetch the appropriate sprite source.

spriteFormat

Property
Type
"png" | "webp" | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

The sprite image format.

Example
// update the layer's sprite resources by fetching sprite resources
// from the given url
const spriteUrl = "link-to-your-sprite-source";
vtLayer.setSpriteSource({
type: "url",
spriteUrl,
pixelRatio: window.devicePixelRatio
}).then((results)=>{
console.log("setSpriteSource results", results);
// do additional style updates here
// change the background layer's sprite
const sl = vtLayer.getStyleLayer("background");
sl.paint["background-pattern"] =
sl.paint["background-pattern"] === "Polygon" ? "Waves" : "Polygon";
vtLayer.setStyleLayer(sl);
});

SpriteSourceImageInfo

Type definition
Since
ArcGIS Maps SDK for JavaScript 4.25

Defines sprite source from an image and index json when the VectorTileLayer.setSpriteSource() method is called.

type

Property
Type
"image"
Since
ArcGIS Maps SDK for JavaScript 5.0

For SpriteSourceImageInfo the type is always "image".

spriteUrl

Property
Type
string | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

The sprite source url.

pixelRatio

Property
Type
number | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

The device pixel ratio of the sprite source.

spriteSource1x

Property
Type
SpriteSourceImageInfoSpriteSource1x | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

Sprite source for non high-DPI devices.

spriteSource2x

Property
Type
SpriteSourceImageInfoSpriteSource2x | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

Sprite source for high-DPI devices.

Example
// set sprites source from an image info directly on the layer
fetchSprites(spriteUrl, pixelRatio).then((params) => {
vtLayer.setSpriteSource(params).then((results)=>{
console.log("setSpriteInfo results", results);
const sl = vtLayer.getStyleLayer("background");
sl.paint["background-pattern"] =
sl.paint["background-pattern"] === "Polygon" ? "Waves" : "Polygon";
vtLayer.setStyleLayer(sl);
});
});
async function fetchSprites(url, pixelRatio) {
// get the index and image files from specified location
const jsonUrl = `${url}${pixelRatio > 1.25 ? "@2x" : ""}.json`;
const imageUrl = `${url}${pixelRatio > 1.25 ? "@2x" : ""}.png`;
const [jsonResult, imageResult] = await Promise.all([
esriRequest(jsonUrl, { responseType: "json" }),
esriRequest(imageUrl, { responseType: "image" })
]);
// load the appropriate files depending on device pixel ratio
const spriteSource = `spriteSource${pixelRatio > 1.25 ? "2" : "1"}x`;
return new SpriteSourceImageInfo({
type: "image",
[spriteSource]: {
image: imageResult.data,
json: jsonResult.data
},
spriteUrl: url
});
}

SpriteSourceImageInfoSpriteSource1x

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

Image containing sprite data for non high-DPI devices when setting sprite source VectorTileLayer via its setSpriteSource().

image

Property
Type
Image
Since
ArcGIS Maps SDK for JavaScript 5.0

Image containing sprite data for non high-DPI devices.

json

Property
Type
Record<string, SpriteInfo | undefined>
Since
ArcGIS Maps SDK for JavaScript 5.0

The JSON representation of an index file containing a description of each image in the sprite for non high-DPI devices.

SpriteSourceImageInfoSpriteSource2x

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

Image containing sprite data for high-DPI devices when setting sprite source VectorTileLayer via its setSpriteSource().

image

Property
Type
Image
Since
ArcGIS Maps SDK for JavaScript 5.0

Image containing sprite data for high-DPI devices.

json

Property
Type
Record<string, SpriteInfo | undefined>
Since
ArcGIS Maps SDK for JavaScript 5.0

The JSON representation of an index file containing a description of each image in the sprite for high-DPI devices.

SpriteSourceInfo

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

The sprite source info is used to set the sprites in the VectorTileLayer's currentStyleInfo.style. The user can set the sprite source from a URL to fetch the sprite resources or from the image info to set the sprite resources directly on the layer.

StreamConnectionStatus

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

The status of the Web Socket connection with the stream service. This property can be watched to see if the connection is lost unexpectedly.

See also
Type
"disconnected" | "connected"

BaseCapabilities

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

Base editing capability flags.

enabled

Property
Type
boolean
Since
ArcGIS Maps SDK for JavaScript 5.0

Indicates whether a specific operation or capability is enabled on the editable layer.

OwnerAdminCapabilities

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

Editing capabilities that account for owner/admin privileges.

Supertypes
BaseCapabilities

reliesOnOwnerAdminPrivileges

Property
Type
boolean
Since
ArcGIS Maps SDK for JavaScript 5.0

Indicates when editing is enabled and is only due to administrative permissions. It returns false for any users if editing is generally enabled.

CreateCapabilities

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

Specific permissions for create operations. It takes into account the Editor's layerInfo settings.

attributes

Property
Type
boolean
Since
ArcGIS Maps SDK for JavaScript 5.0

Indicates whether attributes can be created on the editable layer.

geometry

Property
Type
boolean
Since
ArcGIS Maps SDK for JavaScript 5.0

Indicates whether a geometry can be created on the editable layer.

attachments

Property
Type
AttachmentCapabilities
Since
ArcGIS Maps SDK for JavaScript 5.0

The editing capabilities for attachments.

UpdateCapabilities

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

Specific permissions for update operations. It takes into account the Editor's layerInfo settings.

attributes

Property
Type
boolean
Since
ArcGIS Maps SDK for JavaScript 5.0

Indicates whether attributes can be updated on the editable layer.

geometry

Property
Type
boolean
Since
ArcGIS Maps SDK for JavaScript 5.0

Indicates whether a geometry can be updated on the editable layer.

attachments

Property
Type
UpdateAttachmentCapabilities
Since
ArcGIS Maps SDK for JavaScript 5.0

The editing capabilities for attachments.

DeleteCapabilities

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

Specific permissions for delete operations. It takes into account the Editor's layerInfo settings.

AttachmentCapabilities

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

The editing capabilities for attachments.

Supertypes
BaseCapabilities

UpdateAttachmentCapabilities

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

Capabilities for updating attachments.

RelationshipCapabilities

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

Specific permissions for relationship operations. It takes into account the Editor's layerInfo settings.

Supertypes
BaseCapabilities

ExifInfo

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

An array of Exchangeable image file format information for the attachment. You must set the attachment query's AttachmentQuery.returnMetadata to true to get the exif info associated with the attachment.

name

Property
Type
string
Since
ArcGIS Maps SDK for JavaScript 5.0

The file name.

tags

Property
Type
ExifTag[] | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

Array of tag objects containing the following properties:

ExifTag

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

A tag describing an EXIF metadata value.

name

Property
Type
string
Since
ArcGIS Maps SDK for JavaScript 5.0

The tag name.

description

Property
Type
string
Since
ArcGIS Maps SDK for JavaScript 5.0

The tag description.

value

Property
Type
any
Since
ArcGIS Maps SDK for JavaScript 5.0

The value of the tag.

ParquetGeometryEncodingUnion

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

Supported Parquet geometry encoding types.

CreateElevationSamplerOptions

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

Options for creating an elevation sampler.

Supertypes
AbortOptions

noDataValue

Property
Type
number | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

The value that appears in the resulting geometry when there is no data available.

Default value
0

demResolution

Property
Type
ElevationQueryDemResolution | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

Controls the horizontal resolution (cell size) in meters from which elevation data is sampled (defaults to auto). See the table below for more details on the different settings.

demResolutionDescription
autoAutomatically chooses an appropriate resolution for each coordinate of the input geometry. The current implementation will try to use the finest available resolution given that the total required number of tile requests does not exceed a certain maximum amount (currently 20). Note that this may result in values being sampled from different resolutions.
finest-contiguousSample elevation from the finest available resolution (cell size) across the entire geometry.
{number}Sample elevation from the resolution closest to the specified resolution (in meters).
Default value
auto

ElevationQueryOptions

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

Options for querying elevation.

returnSampleInfo

Property
Type
boolean | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

Indicates whether to return additional sample information for each sampled coordinate.

Default value
false

ElevationQueryDemResolution

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

Resolution options for elevation queries.

Type
number | "finest-contiguous" | "auto"

ElevationQueryGeometry

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

Supported geometries to query elevation for.

ElevationQueryResult

Type definition
Type parameters
<GeometryType>
Since
ArcGIS Maps SDK for JavaScript 5.0

Object returned when ElevationLayer.queryElevation(), Ground.queryElevation(), or Ground.queryElevation() promise resolves:

geometry

Property
Type
GeometryType
Since
ArcGIS Maps SDK for JavaScript 5.0

The geometry with sampled z-values.

sampleInfo

Property
Type
ElevationQuerySampleInfo[] | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

Contains additional information about how the geometry was sampled. This property is present depending on whether the user set options.returnSampleInfo = true, for each coordinate in the geometry.

noDataValue

Property
Type
number | null | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

The value used when there is no data available.

ElevationQuerySampleInfo

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

Sampling metadata returned with elevation query results.

demResolution

Property
Type
number
Since
ArcGIS Maps SDK for JavaScript 5.0

The resolution at which the z-value was sampled. If no data was available for sampling for a given coordinate, the dem resolution value will be -1 for that coordinate.

source

Property
Type
GroundLayerUnion | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

The elevation source from which the data for the corresponding coordinate was sampled.

ElevationTileData

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

Describes elevation contained in the pixels that comprise an elevation tile.

values

readonly Property
Type
ArrayLike<number>
Since
ArcGIS Maps SDK for JavaScript 5.0

The elevation values of each pixel in the tile.

width

readonly Property
Type
number
Since
ArcGIS Maps SDK for JavaScript 5.0

The width of the tile in pixels.

height

readonly Property
Type
number
Since
ArcGIS Maps SDK for JavaScript 5.0

The height of the tile in pixels.

noDataValue

readonly Property
Type
number
Since
ArcGIS Maps SDK for JavaScript 5.0

Indicating the pixel values where no elevation data is present.