@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
92 lines (90 loc) • 4.45 kB
TypeScript
import type Accessor from "../../core/Accessor.js";
import type Extent from "../../geometry/Extent.js";
import type SpatialReference from "../../geometry/SpatialReference.js";
import type { ExtentProperties } from "../../geometry/Extent.js";
import type { SpatialReferenceProperties } from "../../geometry/SpatialReference.js";
export interface ImageParametersProperties extends Partial<Pick<ImageParameters, "dpi" | "format" | "height" | "layerDefinitions" | "layerIds" | "layerOption" | "transparent" | "width">> {
/** Extent of map to be exported. */
extent?: ExtentProperties | null;
/** Spatial reference of exported image. */
imageSpatialReference?: SpatialReferenceProperties | null;
}
/**
* Represents the image parameter options used when calling
* [JobInfo.fetchResultImage()](https://developers.arcgis.com/javascript/latest/references/core/rest/support/JobInfo/#fetchResultImage)
* and [JobInfo.fetchResultMapImageLayer()](https://developers.arcgis.com/javascript/latest/references/core/rest/support/JobInfo/#fetchResultMapImageLayer).
*
* @since 4.24
* @see [JobInfo.fetchResultImage()](https://developers.arcgis.com/javascript/latest/references/core/rest/support/JobInfo/#fetchResultImage)
* @see [JobInfo.fetchResultMapImageLayer()](https://developers.arcgis.com/javascript/latest/references/core/rest/support/JobInfo/#fetchResultMapImageLayer)
*/
export default class ImageParameters extends Accessor {
constructor(properties?: ImageParametersProperties);
/** Dots per inch setting for [JobInfo.fetchResultMapImageLayer()](https://developers.arcgis.com/javascript/latest/references/core/rest/support/JobInfo/#fetchResultMapImageLayer). */
accessor dpi: number | null | undefined;
/** Extent of map to be exported. */
get extent(): Extent | null | undefined;
set extent(value: ExtentProperties | null | undefined);
/**
* Map image format.
*
* @example
* let imageParams = new ImageParameters();
* imageParams.format = "jpg";
*/
accessor format: "png" | "png8" | "png24" | "png32" | "jpg" | "pdf" | "bmp" | "gif" | "svg" | null | undefined;
/** Requested image height in pixels. */
accessor height: number | null | undefined;
/** Spatial reference of exported image. */
get imageSpatialReference(): SpatialReference | null | undefined;
set imageSpatialReference(value: SpatialReferenceProperties | null | undefined);
/**
* 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
* });
*/
accessor layerDefinitions: string[];
/**
* A list of layer IDs, that represent which layers to include in the exported map. Use
* in combination with [layerOption](https://developers.arcgis.com/javascript/latest/references/core/rest/support/ImageParameters/#layerOption) to specify how layer visibility is handled.
*
* @example
* let imageParams = new ImageParameters();
* imageParams.layerIds = [3,4,5];
* imageParams.layerOption = "show";
*/
accessor layerIds: number[] | null | undefined;
/**
* This property determines how the layers specified by [layerIds](https://developers.arcgis.com/javascript/latest/references/core/rest/support/ImageParameters/#layerIds) are treated.
*
* @example
* let imageParams = new ImageParameters();
* imageParams.layerOption = "show";
*/
accessor layerOption: "show" | "hide" | "include" | "exclude" | null | undefined;
/**
* Indicates whether or not the background of the dynamic image is transparent.
*
* @default true
*/
accessor transparent: boolean;
/** Requested image width in pixels. */
accessor width: number | null | undefined;
/**
* Converts an instance of this class to its ArcGIS portal JSON representation.
* See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/using-fromjson) topic in the Guide for more information.
*
* @returns The ArcGIS portal JSON representation of an instance of this class.
*/
toJSON(): any;
}