ImageParameters

AMD: require(["esri/rest/support/ImageParameters"], (ImageParameters) => { /* code goes here */ });
ESM: import ImageParameters from "@arcgis/core/rest/support/ImageParameters.js";
Class: esri/rest/support/ImageParameters
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

ImageParameters

Constructor
new ImageParameters(properties)
Parameter
properties Object
optional

See the properties for a list of all the properties that may be passed into the constructor.

Property Overview

Any properties can be set, retrieved or listened to. See the Watch for changes topic.
Show inherited properties Hide inherited properties
Name Type Summary Class

The name of the class.

Accessor

Dots per inch setting for JobInfo.fetchResultMapImageLayer().

ImageParameters

Extent of map to be exported.

ImageParameters

Map image format.

ImageParameters

Requested image height in pixels.

ImageParameters

Spatial reference of exported image.

ImageParameters

Array of layer definition expressions that allows you to filter the features of individual layers in the exported map image.

ImageParameters

A list of layer IDs, that represent which layers to include in the exported map.

ImageParameters

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

ImageParameters

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

ImageParameters

Requested image width in pixels.

ImageParameters

Property Details

declaredClass

Inherited
Property
declaredClass Stringreadonly
Inherited from Accessor

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

dpi

Property
dpi Number

Dots per inch setting for JobInfo.fetchResultMapImageLayer().

extent

Property
extent Extent

Extent of map to be exported.

format

Property
format String

Map image format.

Possible Values:"png" |"png8" |"png24" |"png32" |"jpg" |"pdf" |"bmp" |"gif" |"svg"

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

height

Property
height Number

Requested image height in pixels.

imageSpatialReference

Property
imageSpatialReference SpatialReference

Spatial reference of exported image.

layerDefinitions

Property
layerDefinitions 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
layerIds Number[]

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
layerOption String

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

Possible Values:"show" |"hide" |"include" |"exclude"

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

transparent

Property
transparent Boolean

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

Default Value:true

width

Property
width Number

Requested image width in pixels.

Method Overview

Show inherited methods Hide inherited methods
Name Return Type Summary Class

Adds one or more handles which are to be tied to the lifecycle of the object.

Accessor

Returns true if a named group of handles exist.

Accessor

Removes a group of handles owned by the object.

Accessor

Converts an instance of this class to its ArcGIS portal JSON representation.

ImageParameters

Method Details

addHandles

Inherited
Method
addHandles(handleOrHandles, groupKey)
Inherited from Accessor
Since: ArcGIS Maps SDK for JavaScript 4.25 Accessor since 4.0, addHandles added at 4.25.

Adds one or more handles which are to be tied to the lifecycle of the object. The handles will be removed when the object is destroyed.

// Manually manage handles
const handle = reactiveUtils.when(
  () => !view.updating,
  () => {
    wkidSelect.disabled = false;
  },
  { once: true }
);

this.addHandles(handle);

// Destroy the object
this.destroy();
Parameters
handleOrHandles WatchHandle|WatchHandle[]

Handles marked for removal once the object is destroyed.

groupKey *
optional

Key identifying the group to which the handles should be added. All the handles in the group can later be removed with Accessor.removeHandles(). If no key is provided the handles are added to a default group.

hasHandles

Inherited
Method
hasHandles(groupKey){Boolean}
Inherited from Accessor
Since: ArcGIS Maps SDK for JavaScript 4.25 Accessor since 4.0, hasHandles added at 4.25.

Returns true if a named group of handles exist.

Parameter
groupKey *
optional

A group key.

Returns
Type Description
Boolean Returns true if a named group of handles exist.
Example
// Remove a named group of handles if they exist.
if (obj.hasHandles("watch-view-updates")) {
  obj.removeHandles("watch-view-updates");
}

removeHandles

Inherited
Method
removeHandles(groupKey)
Inherited from Accessor
Since: ArcGIS Maps SDK for JavaScript 4.25 Accessor since 4.0, removeHandles added at 4.25.

Removes a group of handles owned by the object.

Parameter
groupKey *
optional

A group key or an array or collection of group keys to remove.

Example
obj.removeHandles(); // removes handles from default group

obj.removeHandles("handle-group");
obj.removeHandles("other-handle-group");

toJSON

Method
toJSON(){Object}

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

Returns
Type Description
Object The ArcGIS portal JSON representation of an instance of this class.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.