@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
70 lines (68 loc) • 6.22 kB
TypeScript
import type { JSONSupport } from "../../core/JSONSupport.js";
import type { SymbolUnion } from "../../symbols/types.js";
import type { WebStyleSymbolProperties } from "../../symbols/WebStyleSymbol.js";
import type { PolygonSymbol3DProperties } from "../../symbols/PolygonSymbol3D.js";
import type { PointSymbol3DProperties } from "../../symbols/PointSymbol3D.js";
import type { MeshSymbol3DProperties } from "../../symbols/MeshSymbol3D.js";
import type { LineSymbol3DProperties } from "../../symbols/LineSymbol3D.js";
import type { LabelSymbol3DProperties } from "../../symbols/LabelSymbol3D.js";
import type { CIMSymbolProperties } from "../../symbols/CIMSymbol.js";
import type { TextSymbolProperties } from "../../symbols/TextSymbol.js";
import type { SimpleMarkerSymbolProperties } from "../../symbols/SimpleMarkerSymbol.js";
import type { SimpleLineSymbolProperties } from "../../symbols/SimpleLineSymbol.js";
import type { SimpleFillSymbolProperties } from "../../symbols/SimpleFillSymbol.js";
import type { PictureMarkerSymbolProperties } from "../../symbols/PictureMarkerSymbol.js";
import type { PictureFillSymbolProperties } from "../../symbols/PictureFillSymbol.js";
export interface UniqueValueInfoProperties extends Partial<Pick<UniqueValueInfo, "label" | "value">> {
/**
* Defines the symbol used to render features with the provided [value](https://developers.arcgis.com/javascript/latest/references/core/renderers/support/UniqueValueInfo/#value).
*
* @see [Guide - Esri color ramps](https://developers.arcgis.com/javascript/latest/esri-color-ramps/)
* @see [Guide - Visualization best practices](https://developers.arcgis.com/javascript/latest/visualization-best-practices/)
*/
symbol?: (((PictureFillSymbolProperties & { type: "picture-fill" }) | (PictureMarkerSymbolProperties & { type: "picture-marker" }) | (SimpleFillSymbolProperties & { type: "simple-fill" }) | (SimpleLineSymbolProperties & { type: "simple-line" }) | (SimpleMarkerSymbolProperties & { type: "simple-marker" }) | (TextSymbolProperties & { type: "text" }) | (CIMSymbolProperties & { type: "cim" })) | ((LabelSymbol3DProperties & { type: "label-3d" }) | (LineSymbol3DProperties & { type: "line-3d" }) | (MeshSymbol3DProperties & { type: "mesh-3d" }) | (PointSymbol3DProperties & { type: "point-3d" }) | (PolygonSymbol3DProperties & { type: "polygon-3d" })) | (WebStyleSymbolProperties & { type: "web-style" })) | null;
}
/**
* Defines the categories of a [UniqueValueRenderer](https://developers.arcgis.com/javascript/latest/references/core/renderers/UniqueValueRenderer/).
* Each unique value info defines a [symbol](https://developers.arcgis.com/javascript/latest/references/core/renderers/support/UniqueValueInfo/#symbol) that should be used to represent features
* with a specific [value](https://developers.arcgis.com/javascript/latest/references/core/renderers/support/UniqueValueInfo/#value).
*
* The [UniqueValueRenderer](https://developers.arcgis.com/javascript/latest/references/core/renderers/UniqueValueRenderer/)
* determines the field or expression containing categorical data used for the rendering. Each
* feature is categorized with a symbol based on the value of its field as defined in the
* unique value info object.
*
* @since 4.0
* @see [UniqueValueRenderer](https://developers.arcgis.com/javascript/latest/references/core/renderers/UniqueValueRenderer/)
* @see [Guide - Esri color ramps](https://developers.arcgis.com/javascript/latest/esri-color-ramps/)
* @see [Guide - Visualization best practices](https://developers.arcgis.com/javascript/latest/visualization-best-practices/)
*/
export default class UniqueValueInfo extends JSONSupport {
constructor(properties?: UniqueValueInfoProperties);
/**
* Describes the [value](https://developers.arcgis.com/javascript/latest/references/core/renderers/support/UniqueValueInfo/#value) represented by the [symbol](https://developers.arcgis.com/javascript/latest/references/core/renderers/support/UniqueValueInfo/#symbol). This label will appear in the
* [Legend](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-legend/) next to the symbol representing the value.
* If no label is provided, then the raw [value](https://developers.arcgis.com/javascript/latest/references/core/renderers/support/UniqueValueInfo/#value) is displayed in the legend.
*/
accessor label: string | null | undefined;
/**
* Defines the symbol used to render features with the provided [value](https://developers.arcgis.com/javascript/latest/references/core/renderers/support/UniqueValueInfo/#value).
*
* @see [Guide - Esri color ramps](https://developers.arcgis.com/javascript/latest/esri-color-ramps/)
* @see [Guide - Visualization best practices](https://developers.arcgis.com/javascript/latest/visualization-best-practices/)
*/
get symbol(): SymbolUnion | null | undefined;
set symbol(value: (((PictureFillSymbolProperties & { type: "picture-fill" }) | (PictureMarkerSymbolProperties & { type: "picture-marker" }) | (SimpleFillSymbolProperties & { type: "simple-fill" }) | (SimpleLineSymbolProperties & { type: "simple-line" }) | (SimpleMarkerSymbolProperties & { type: "simple-marker" }) | (TextSymbolProperties & { type: "text" }) | (CIMSymbolProperties & { type: "cim" })) | ((LabelSymbol3DProperties & { type: "label-3d" }) | (LineSymbol3DProperties & { type: "line-3d" }) | (MeshSymbol3DProperties & { type: "mesh-3d" }) | (PointSymbol3DProperties & { type: "point-3d" }) | (PolygonSymbol3DProperties & { type: "polygon-3d" })) | (WebStyleSymbolProperties & { type: "web-style" })) | null | undefined);
/** Features with this value will be rendered with the given [symbol](https://developers.arcgis.com/javascript/latest/references/core/renderers/support/UniqueValueInfo/#symbol). */
accessor value: string | number;
/**
* Creates a deep clone of the unique value info object.
*
* @returns A deep clone of the unique value info object
* that invoked this method.
* @example
* // Creates a deep clone of the first unique value info in the renderer
* let firstInfo = renderer.uniqueValueInfos[0].clone();
*/
clone(): UniqueValueInfo;
}