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: ImageParameters Accessor
Since: ArcGIS Maps SDK for JavaScript 4.24

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

See also

Constructors

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 Working with Properties topic.
Show inherited properties Hide inherited properties
Name Type Summary Class
String

The name of the class.

more details
Accessor
Number

Dots per inch setting for JobInfo.fetchResultMapImageLayer().

more details
ImageParameters
Extent

Extent of map to be exported.

more details
ImageParameters
String

Map image format.

more details
ImageParameters
Number

Requested image height in pixels.

more details
ImageParameters
SpatialReference

Spatial reference of exported image.

more details
ImageParameters
String[]

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

more details
ImageParameters
Number[]

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

more details
ImageParameters
String

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

more details
ImageParameters
Boolean

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

more details
ImageParameters
Number

Requested image width in pixels.

more details
ImageParameters

Property Details

declaredClass Stringreadonly inherited

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

dpi Number

Dots per inch setting for JobInfo.fetchResultMapImageLayer().

extent Extent

Extent of map to be exported.

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 Number

Requested image height in pixels.

imageSpatialReference SpatialReference

Spatial reference of exported image.

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 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 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 Boolean

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

Default Value:true
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.

more details
Accessor
Boolean

Returns true if a named group of handles exist.

more details
Accessor

Removes a group of handles owned by the object.

more details
Accessor
Object

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

more details
ImageParameters

Method Details

addHandles(handleOrHandles, groupKey)inherited
Since: ArcGIS Maps SDK for JavaScript 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(groupKey){Boolean}inherited
Since: ArcGIS Maps SDK for JavaScript 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(groupKey)inherited
Since: ArcGIS Maps SDK for JavaScript 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(){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.