Skip to content
Types
import type { TiledImagery } from "@arcgis/core/layers/mixins/TiledImagery.js";
Subclasses:
ImageryTileLayer, WCSLayer

TiledImagery is a mixin that adds common properties and methods to ImageryTileLayer and WCSLayer.

Properties

bandIds

Property
Type
number[] | null | undefined

Defines a band combination using 0-based band indexes.

Property
Type
string | null | undefined

The copyright text as defined by the service.

interpolation

Property
Type
RasterInterpolation

Defines how to interpolate pixel values. By default, this will be set to the service's resampling method, if it has one. If the service does not have a default resampling method, the bilinear resampling will be used in most cases, and nearest interpolation type will be used for thematic data source.

legendEnabled

Property
Type
boolean

Indicates whether the layer will be included in the legend.

Default value
true

multidimensionalDefinition

autocast Property
Type
DimensionalDefinition[] | null | undefined
Since
ArcGIS Maps SDK for JavaScript 4.20

The multidimensional definitions associated with the layer. Filters the layer by slicing data along defined variables and dimensions such as time, depth, altitude, etc. For example, you can display a particular variable such as temperature or salinity measured at a fixed dimension (e.g. time, depth).

See also
Examples
// set the `multidimensionalDefinition` to visualize a sea water
// temperature at -5000m on April 7th 2014.
const dimension = [
{
variableName: "temperature",
dimensionName: "Std_Time",
values: [1396828800000]
},
{
variableName: "temperature",
dimensionName:"Std_Z",
values:[-5000]
}
];
layer.multidimensionalDefinition = dimension;
// get the layer's multidimensionalDefinition and locate the
// Salinity dimension and filter the data by salinity.
const multidimensionalDefinition = layer.multidimensionalDefinition;
const variableName = "Salinity";
// filter the data by salinity dimension
multidimensionalDefinition.forEach((def) => def.variableName = variableName);
layer.multidimensionalDefinition = multidimensionalDefinition;
// update the statistics of the layer's stretch renderer.
const renderer = layer.renderer.clone();
const dimensions = layer.serviceRasterInfo.multidimensionalInfo;
// get the salinity variable's statistics
const salinity = dimensions.variables.find((variable) => variable.name === variableName);
renderer.customStatistics = salinity.statistics;
layer.renderer = renderer;

multidimensionalSubset

autocast Property
Type
MultidimensionalSubset | null | undefined
Since
ArcGIS Maps SDK for JavaScript 4.25

Represents a multidimensional subset of raster data. This includes subsets of both variables and dimensions. When the multidimensionalSubset is defined on a layer, the multidimensionalDefinition must be within the defined multidimensionalSubset, otherwise nothing will be displayed.

See also
Example
// set a multidimensionalSubset on the imagery tile layer
// so that users can only access wind magnitude and direction data
// between Jan 1 - 19, 2011.
const multidimensionalSubset = new MultidimensionalSubset({
subsetDefinitions: [
{
variableName: "wind_magdir",
dimensionName: "StdTime",
values: [1293876000000, 1295395200000], // 1/1/11 - 11/19/11
isSlice: false
}
]
});
layer.multidimensionalSubset = multidimensionalSubset;

renderer

autocast Property
Type
RasterRendererUnion | null | undefined

The renderer assigned to the layer. The renderer defines how to visualize pixels in the tile imagery layer. Depending on the renderer type, the pixels may be stretched across the color ramp, classified, have different symbols based on values, or show shaded reliefs.

See also

serviceRasterInfo

readonly Property
Type
RasterInfo | null | undefined
Since
ArcGIS Maps SDK for JavaScript 4.29

Raster information retrieved from tiled imagery data source.

spatialReference

readonly Property
Type
SpatialReference
Since
ArcGIS Maps SDK for JavaScript 4.33

The spatial reference of the layer.

timeExtent

Property
Type
TimeExtent | null | undefined
Since
ArcGIS Maps SDK for JavaScript 4.22

The layer's time extent. When the layer's useViewTime is false, the layer instructs the view to show data from the layer based on this time extent. If the useViewTime is true, and both layer and view time extents are set, then features that fall within the intersection of the view and layer time extents will be displayed. For example, if the layer's time extent is set to display features between 1970 and 1975 and the view has a time extent set to 1972-1980, the effective time on the feature layer will be 1972-1975.

Examples
if (!layer.useViewTime) {
if (layer.timeExtent) {
console.log("Current timeExtent:", layer.timeExtent.start, " - ", layer.timeExtent.end}
} else {
console.log("The layer will display data within the view's timeExtent.");
console.log("Current view.timeExtent:", view.timeExtent.start, " - ", view.timeExtent.end}
}
}
// set the timeExtent on the layer and useViewTime false
// In this case, the layer will honor its timeExtent and ignore
// the view's timeExtent
const layer = new ImageryTileLayer({
url: "https://tiledimageservices.arcgis.com/V6ZHFr6zdgNZuVG0/arcgis/rest/services/NLDAS2011_daily_wind_magdir/ImageServer",
timeExtent: {
start: new Date(2014, 4, 18),
end: new Date(2014, 4, 19)
},
useViewTime: false
});
// timeExtent is set on the layer and the view
// In this case, the layer will display features that fall
// within the intersection of view and layer time extents
// features within Jan 1, 1976 - Jan 1, 1981 will be displayed
const view = new MapView({
timeExtent: {
start: new Date(1976, 0, 1),
end: new Date(2002, 0, 1)
}
});
const layer = new FeatureLayer({
url: myUrl,
timeExtent: {
start: new Date(1974, 0, 1),
end: new Date(1981, 0, 1)
}
});

timeInfo

Property
Type
TimeInfo | null | undefined
Since
ArcGIS Maps SDK for JavaScript 4.22

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

timeOffset

Property
Type
TimeInterval | null | undefined
Since
ArcGIS Maps SDK for JavaScript 4.22

A temporary offset of the time data based on a certain TimeInterval. This allows users to overlay features from two or more time-aware layers with different time extents. For example, if a layer has data recorded for the year 1970, an offset value of 2 years would temporarily shift the data to 1972. You can then overlay this data with data recorded in 1972. A time offset can be used for display purposes only. The query and selection are not affected by the offset.

Example
// Offset a CSV Layer containing hurricanes from 2015 so that they appear in 2019 (+4 years).
let layer = new CSVLayer({
url: `hurricanes-and-storms-2015.csv`,
timeOffset: {
value: 4,
unit: "years"
},
timeInfo: {
startField: "ISO_time"
},
renderer: {
type: "simple",
symbol: {
type: "simple-marker",
size: 6,
color: "red",
outline: {
width: 0.5,
color: "black"
}
}
}
});

useViewTime

Property
Type
boolean
Since
ArcGIS Maps SDK for JavaScript 4.22

Determines if the layer will update its temporal data based on the view's View.timeExtent. When false, the layer will display its temporal data based on the layer's timeExtent, regardless of changes to the view. If both view and layer time extents are set while this property is true, then the features that fall within the intersection of the view and layer time extents will be displayed. For example, if a layer's time extent is set to display features between 1970 and 1975 and the view has a time extent set to 1972-1980, the effective time on the feature layer will be 1972-1975.

Default value
true
Example
if (featureLayer.useViewTime) {
console.log("Displaying data between:", view.timeExtent.start, " - ", view.timeExtent.end);
}

Methods

MethodSignatureClass
fetchPixels(extent: Extent, width: number, height: number, options?: FetchRasterOptions): Promise<any>
getSamples(parameters: ImageSampleParameters | ImageSampleParametersProperties, requestOptions?: RequestOptions): Promise<ImageSampleResult>
identify(point: Point | PointProperties, options?: RasterIdentifyOptions): Promise<RasterIdentifyResult>

fetchPixels

Method
Signature
fetchPixels (extent: Extent, width: number, height: number, options?: FetchRasterOptions): Promise<any>
Since
ArcGIS Maps SDK for JavaScript 4.19

Fetches pixels for a given extent.

Parameters
ParameterTypeDescriptionRequired
extent

The extent of the image to export.

width

The width of the image in pixels.

height

The height of the image in pixels.

options

The parameter options is an object with the following properties.

Returns
Promise<any>

Resolves to an object containing the parameters of the exported pixels including PixelBlock. The pixelBlock contains the value of each pixel in the image.

getSamples

Method
Signature
getSamples (parameters: ImageSampleParameters | ImageSampleParametersProperties, requestOptions?: RequestOptions): Promise<ImageSampleResult>
Since
ArcGIS Maps SDK for JavaScript 4.33

Returns sample point locations, pixel values and corresponding resolutions of the source data for a given geometry. When the input geometry is a Polyline, Extent, or Polygon, the sampling is based on ImageSampleParameters.sampleCount or ImageSampleParameters.sampleDistance parameters. When the geometry is a Point or Multipoint, the point or points are used directly.

The number of sample locations in the response is based on the sampleDistance or sampleCount parameter and the maximum is 1000.

Parameters
ParameterTypeDescriptionRequired
parameters

The parameters used in the getSamples operation.

requestOptions

Additional options to be used for the data request (will override requestOptions defined during construction).

Returns
Promise<ImageSampleResult>

When resolved, ImageSampleResult is returned containing an array of ImageSamples.

Example
// get all sample points along a polyline
// at the specified sample distance and pixel size
const param = {
geometry: polyline
returnFirstValueOnly: false,
interpolation: "nearest",
// unit of the geometry's spatial reference is used
sampleDistance: 30,
outFields: ["*"]
};
imageryLayer.getSamples(param).then((results) => {
// use the getSamples results as needed.
console.log(results);
})
.catch(function(error){
console.log(error)
})

identify

Method
Signature
identify (point: Point | PointProperties, options?: RasterIdentifyOptions): Promise<RasterIdentifyResult>

Identify pixel values at a given location. This method identifies the content of an image service for the input location and in a specified dimensional definition.

Starting at version 4.25, the identify method returns pixel values from specific dimensional definitions for a transposed multidimensional service referenced in an ImageryTileLayer. Set the transposedVariableName parameter along with the multidimensionalDefinition to get pixel values from specific dimensional slices. To get pixel values from all dimensional slices, just set the transposedVariableName. The ImageryTileLayer's serviceRasterInfo.hasMultidimensionalTranspose property must be true when setting the transposedVariableName parameter.

See also
Parameters
ParameterTypeDescriptionRequired
point

Input point that defines the location to be identified.

options

Optional settings for the identify request. At version 4.25, the transposedVariableName was added to get pixel values from specific dimensional definitions if the ImageryTileLayer references a transposed multidimensional image service. Set the transposedVariableName and multidimensionalDefinition get pixel values for the specified dimensional definitions from a transposed multidimensional service. If multidimensionalDefinition is not specified, pixel values will be returned from all the dimensional slices.

Returns
Promise<RasterIdentifyResult>

Returns a promise that resolves to a RasterIdentifyResult containing a location and pixel values. The identify returns a value for only one slice at a time for WCSLayer.identify() and for non-transposed multidimensional ImageryTileLayer.identify(). If the transposedVariableName parameter is set for the transposed multidimensional ImageryTileLayer, the result returns all pixel values from all multidimensional slices.