require(["esri/rest/support/ImageParameters"], (ImageParameters) => { /* code goes here */ });
import ImageParameters from "@arcgis/core/rest/support/ImageParameters.js";
esri/rest/support/ImageParameters
Represents the image parameter options used when calling JobInfo.fetchResultImage() and JobInfo.fetchResultMapImageLayer().
Constructors
-
new ImageParameters(properties)
-
Parameterproperties Objectoptional
See the properties for a list of all the properties that may be passed into the constructor.
Property Overview
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
-
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"
Examplelet imageParams = new ImageParameters(); imageParams.format = "jpg";
-
height Number
-
Requested image height in pixels.
-
imageSpatialReference SpatialReference
-
Spatial reference of exported image.
-
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.
Examplelet 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 });
-
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.
Examplelet 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"
Examplelet 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
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)inheritedSince: 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();
ParametershandleOrHandles WatchHandle|WatchHandle[]Handles marked for removal once the object is destroyed.
groupKey *optionalKey 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.
-
Since: ArcGIS Maps SDK for JavaScript 4.25
-
Returns true if a named group of handles exist.
ParametergroupKey *optionalA group key.
ReturnsType 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)inheritedSince: ArcGIS Maps SDK for JavaScript 4.25
-
Removes a group of handles owned by the object.
ParametergroupKey *optionalA group key or an array or collection of group keys to remove.
Exampleobj.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.
ReturnsType Description Object The ArcGIS portal JSON representation of an instance of this class.