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
-
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 |
---|---|---|---|
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
-
dpi
dpi Number
-
Dots per inch setting for JobInfo.fetchResultMapImageLayer().
-
extent
extent Extent
-
Extent of map to be exported.
-
format
format String
-
Map image format.
Possible Values:"png" |"png8" |"png24" |"png32" |"jpg" |"pdf" |"bmp" |"gif" |"svg"
Examplelet imageParams = new ImageParameters(); imageParams.format = "jpg";
-
height
height Number
-
Requested image height in pixels.
-
imageSpatialReference
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";
-
transparent
transparent Boolean
-
Indicates whether or not the background of the dynamic image is transparent.
- Default Value:true
-
width
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. | 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
-
Inherited from Accessor
Since: ArcGIS Maps SDK for JavaScript 4.25Accessor 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();
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.
-
hasHandles
InheritedMethodhasHandles(groupKey){Boolean}
Inherited from AccessorSince: ArcGIS Maps SDK for JavaScript 4.25Accessor since 4.0, hasHandles added at 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"); }
-
Inherited from Accessor
Since: ArcGIS Maps SDK for JavaScript 4.25Accessor since 4.0, removeHandles added at 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
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.