import ImageParameters from "@arcgis/core/rest/support/ImageParameters.js";const ImageParameters = await $arcgis.import("@arcgis/core/rest/support/ImageParameters.js");- Inheritance:
- ImageParameters→
Accessor
- Since
- ArcGIS Maps SDK for JavaScript 4.24
Represents the image parameter options used when calling JobInfo.fetchResultImage() and JobInfo.fetchResultMapImageLayer().
Constructors
Constructor
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| properties | | |
Properties
| Property | Type | Class |
|---|---|---|
declaredClass readonly inherited | ||
| | ||
| | ||
| | ||
| | ||
| | ||
string[] | | |
| | ||
| | ||
| | ||
| |
dpi
Dots per inch setting for JobInfo.fetchResultMapImageLayer().
imageSpatialReference
- Type
- SpatialReference | null | undefined
Spatial reference of exported image.
layerDefinitions
- 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
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"; transparent
- Type
- boolean
Indicates whether or not the background of the dynamic image is transparent.
- Default value
- true
Methods
| Method | Signature | Class |
|---|---|---|
toJSON(): any | |
toJSON
- 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.