UNPKG

@arcgis/core

Version:

ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API

48 lines (46 loc) 4.96 kB
import type { ClonableMixin } from "../../core/Clonable.js"; import type { JSONSupport } from "../../core/JSONSupport.js"; import type { RasterRendererUnion } from "./raster/types.js"; import type { VectorFieldRendererProperties } from "../VectorFieldRenderer.js"; import type { UniqueValueRendererProperties } from "../UniqueValueRenderer.js"; import type { RasterStretchRendererProperties } from "../RasterStretchRenderer.js"; import type { RasterShadedReliefRendererProperties } from "../RasterShadedReliefRenderer.js"; import type { RasterColormapRendererProperties } from "../RasterColormapRenderer.js"; import type { FlowRendererProperties } from "../FlowRenderer.js"; import type { ClassBreaksRendererProperties } from "../ClassBreaksRenderer.js"; export interface RasterPresetRendererProperties extends Partial<Pick<RasterPresetRenderer, "bandIds" | "method" | "name" | "value">> { /** The raster renderer associated with the selected [value](https://developers.arcgis.com/javascript/latest/references/core/renderers/support/RasterPresetRenderer/#value) and [method](https://developers.arcgis.com/javascript/latest/references/core/renderers/support/RasterPresetRenderer/#method). */ renderer?: ((ClassBreaksRendererProperties & { type: "class-breaks" }) | (FlowRendererProperties & { type: "flow" }) | (RasterColormapRendererProperties & { type: "raster-colormap" }) | (RasterShadedReliefRendererProperties & { type: "raster-shaded-relief" }) | (RasterStretchRendererProperties & { type: "raster-stretch" }) | (UniqueValueRendererProperties & { type: "unique-value" }) | (VectorFieldRendererProperties & { type: "vector-field" })); } /** * Defines a predefined raster renderer associated with an [ImageryLayer.presetRenderers](https://developers.arcgis.com/javascript/latest/references/core/layers/ImageryLayer/#presetRenderers) or [ImageryTileLayer.presetRenderers](https://developers.arcgis.com/javascript/latest/references/core/layers/ImageryTileLayer/#presetRenderers). * A raster layer may contain a data source of [multidimensional data](https://developers.arcgis.com/javascript/latest/references/core/layers/ImageryLayer/#multidimensionaldata) with multiple variables. * These different variables often require different types of default symbology, which can be preconfigured individually and saved with the layer. * This means you don't have to redefine the symbology each time you select a different variable. * The predefined raster renderers can also be used as a general list of renderers available for clients, without a variable or raster function templates. * * @since 4.31 * @see [ImageryLayer.presetRenderers](https://developers.arcgis.com/javascript/latest/references/core/layers/ImageryLayer/#presetRenderers) * @see [ImageryTileLayer.presetRenderers](https://developers.arcgis.com/javascript/latest/references/core/layers/ImageryTileLayer/#presetRenderers) */ export default class RasterPresetRenderer extends RasterPresetRendererSuperclass { constructor(properties?: RasterPresetRendererProperties); /** The band ids associated with the raster renderer. */ accessor bandIds: number[]; /** * Specifies how to match the [renderer](https://developers.arcgis.com/javascript/latest/references/core/renderers/support/RasterPresetRenderer/#renderer). The matching method can be based on a variable, a raster function template, or no specific method. * Example workflow in a client app: When changing a multidimensional variable, the client can find the corresponding preset renderer with the method * "variable" and the value as the variable name, then set it on the layer. * * @default "none" */ accessor method: "raster-function-template" | "variable" | "none"; /** The name of the preset renderer. */ accessor name: string; /** The raster renderer associated with the selected [value](https://developers.arcgis.com/javascript/latest/references/core/renderers/support/RasterPresetRenderer/#value) and [method](https://developers.arcgis.com/javascript/latest/references/core/renderers/support/RasterPresetRenderer/#method). */ get renderer(): RasterRendererUnion; set renderer(value: ((ClassBreaksRendererProperties & { type: "class-breaks" }) | (FlowRendererProperties & { type: "flow" }) | (RasterColormapRendererProperties & { type: "raster-colormap" }) | (RasterShadedReliefRendererProperties & { type: "raster-shaded-relief" }) | (RasterStretchRendererProperties & { type: "raster-stretch" }) | (UniqueValueRendererProperties & { type: "unique-value" }) | (VectorFieldRendererProperties & { type: "vector-field" }))); /** The corresponding value of selected [method](https://developers.arcgis.com/javascript/latest/references/core/renderers/support/RasterPresetRenderer/#method). It can be a multidimensional variable name or a raster function template name. */ accessor value: string; } declare const RasterPresetRendererSuperclass: typeof JSONSupport & typeof ClonableMixin