UNPKG

@arcgis/core

Version:

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

74 lines (71 loc) 1.91 kB
/** * Utilities for creating a SelectionOperation class instance. * * @internal * @internal */ import type { MapViewOrSceneView } from "../../views/MapViewOrSceneView.js"; /** * @internal * @internal */ export type SelectionOperationType = "add" | "remove" | "replace"; /** * @internal * @internal */ export interface OperationOptions { /** * The tool to create ("point", "polygon", "circle", or "rectangle"). Defaults to "rectangle" if not specified. * * @internal */ createTool?: "point" | "polygon" | "circle" | "rectangle"; /** * The operation mode ("click", "freehand", or "hybrid"). * * @internal */ mode?: "click" | "freehand" | "hybrid"; /** * An optional, unique name used to distinguish an operation. * * @internal */ name?: "rectangle" | "lasso" | "point" | string; /** * Whether the final selection should update the current selection manager. * * @internal */ persistSelection?: boolean; /** * Whether the selected graphics should include geometries. Defaults to true if not specified. * * @internal */ returnGeometry?: boolean; /** * Whether to select on complete. Defaults to true if not specified. * * @internal */ selectOnComplete?: boolean; /** * The type of selection operation ("add", "remove" or "replace"). Defaults to "add" if not specified. * * @internal */ type?: SelectionOperationType; } /** * Factory method for creating a SelectionOperation instance. * * @param view - The view instance. * @param sources - An array of source layers. * @param options - Additional tool- and selection-related options for the SelectionOperation. * @returns The created SelectionOperation instance. * @internal * @internal */ export function createSelectionOperation(view: MapViewOrSceneView, sources: any[] | null | undefined, options?: OperationOptions): any;