Skip to content
import ImageParameters from "@arcgis/core/rest/support/ImageParameters.js";
Inheritance:
ImageParametersAccessor
Since
ArcGIS Maps SDK for JavaScript 4.24

Represents the image parameter options used when calling JobInfo.fetchResultImage() and JobInfo.fetchResultMapImageLayer().

See also

Constructors

Constructor

Constructor
Parameters
ParameterTypeDescriptionRequired
properties
See the properties table for a list of all the properties that may be passed into the constructor.

Properties

Any properties can be set, retrieved or listened to. See the Watch for changes topic.
PropertyTypeClass
declaredClass
readonly inherited
dpi
"png" | "png8" | "png24" | "png32" | "jpg" | "pdf" | "bmp" | "gif" | "svg" | null | undefined
string[]
"show" | "hide" | "include" | "exclude" | null | undefined

declaredClass

readonlyinherited Property
Type
string
Inherited from: Accessor

The name of the class. The declared class name is formatted as esri.folder.className.

dpi

Property
Type
number | null | undefined

Dots per inch setting for JobInfo.fetchResultMapImageLayer().

extent

autocast Property
Type
Extent | null | undefined

Extent of map to be exported.

format

Property
Type
"png" | "png8" | "png24" | "png32" | "jpg" | "pdf" | "bmp" | "gif" | "svg" | null | undefined

Map image format.

Example
let imageParams = new ImageParameters();
imageParams.format = "jpg";

height

Property
Type
number | null | undefined

Requested image height in pixels.

imageSpatialReference

autocast Property
Type
SpatialReference | null | undefined

Spatial reference of exported image.

layerDefinitions

Property
Type
string[]

Array of layer definition expressions that allows you to filter the features of individual layers in the exported map image. Layer definitions with semicolons or colons are supported if using a map service published using ArcGIS Server 10 or later.

Example
let layerDefs = [];
layerDefs[5] = "STATE_NAME='Kansas'";
layerDefs[4] = "STATE_NAME='Kansas' and POP2007>25000";
layerDefs[3] = "STATE_NAME='Kansas' and POP2007>25000";
let imageParams = new ImageParameters({
layerDefinitions: layerDefs
});

layerIds

Property
Type
number[] | null | undefined

A list of layer IDs, that represent which layers to include in the exported map. Use in combination with layerOption to specify how layer visibility is handled.

Example
let imageParams = new ImageParameters();
imageParams.layerIds = [3,4,5];
imageParams.layerOption = "show";

layerOption

Property
Type
"show" | "hide" | "include" | "exclude" | null | undefined

This property determines how the layers specified by layerIds are treated.

Example
let imageParams = new ImageParameters();
imageParams.layerOption = "show";

transparent

Property
Type
boolean

Indicates whether or not the background of the dynamic image is transparent.

Default value
true

width

Property
Type
number | null | undefined

Requested image width in pixels.

Methods

MethodSignatureClass
toJSON(): any

toJSON

Method
Signature
toJSON (): any

Converts an instance of this class to its ArcGIS portal JSON representation. See the Using fromJSON() topic in the Guide for more information.

Returns
any

The ArcGIS portal JSON representation of an instance of this class.