import type { SelectableParentLayerUnion, SelectableLayerSourceUnion, SelectionSource, SelectableViewUnion, SelectorGeometry } from "@arcgis/core/views/selection/types.js";- Since
- ArcGIS Maps SDK for JavaScript 5.0
Types and interfaces for feature selection in layers and views.
Type definitions
SelectableParentLayerUnion
- Since
- ArcGIS Maps SDK for JavaScript 5.1
Types of parent layers that include potential sources from which selections may be determined. Sublayers are typically included in SelectableLayer or SelectionSource.
SelectableLayerSourceUnion
- Since
- ArcGIS Maps SDK for JavaScript 5.1
Layer source types from which selections can be determined.
SelectionSource
- Since
- ArcGIS Maps SDK for JavaScript 5.1
Types of sources from which selections can be determined.
SelectableViewUnion
- Since
- ArcGIS Maps SDK for JavaScript 5.1
Types of views supported by a selection operation.
- Type
- MapViewOrSceneView | LinkChartView
SelectorGeometry
- Since
- ArcGIS Maps SDK for JavaScript 5.1
Types of geometries that can be used to determine selections.
- Type
- Extent | Multipoint | Point | Polygon | Polyline
SelectionToolName
- Since
- ArcGIS Maps SDK for JavaScript 5.1
Types used to identify a specific selection tool by name.
- Type
- "lasso" | "rectangle" | "point" | string
SelectionIdentifier
An identifier used to represent a selected feature in a layer. This can either be a Graphic (for layers with graphics) or an object ID (for layers with object IDs).
SelectionOperationType
- Since
- ArcGIS Maps SDK for JavaScript 5.1
Types of selection operations.
- Type
- "add" | "remove" | "replace"
LayerSelection
A simple object representing the selected features in a layer.
selection
- Type
- SelectionIdentifier[]
The selected features in the layer. The selection identifiers can either be Graphics or object IDs depending on the capabilities of the layer.
LayerSelectionChange
An object storing the changes in selection for a given layer.
- Supertypes
- LayerSelection
added
- Type
- SelectionIdentifier[] | undefined
The features that were added to the selection for the layer.
removed
- Type
- SelectionIdentifier[] | undefined
The features that were removed from the selection for the layer.
LayerFeatureSet
An object representing the selected features in a layer, including the layer and the feature set containing the selected features.
SelectableLayerType
The types of layers that can be selected.
- Type
- "csv" | "feature" | "geojson" | "parquet" | "graphics" | "knowledge-graph" | "knowledge-graph-sublayer" | "map-image" | "ogc-feature" | "stream" | "wfs" | "sublayer" | "subtype-sublayer" | "subtype-group"
SelectableLayerBase
The underlying base type for selectable layers which contains common properties and methods for both layers with graphics and layers with object IDs.
- Supertypes
- default ‚ LoadableMixin
renderer
- Type
- RendererUnion | null | undefined
Optional: The renderer assigned to the layer.
getFeatureTitle
- Signature
-
getFeatureTitle (graphic: Graphic, options?: FeatureTitleOptions): Promise<string>
Optional: Gets the title for a specific feature represented by a graphic.
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| graphic | The graphic for which to get the title. | | |
| options | The options for getting the feature title. | |
SelectableLayerWithObjectIds
This applies only to layer types that support object IDs.
- Supertypes
- SelectableLayerBase
fieldsIndex
- Type
- FieldsIndex<Field>
A fields index for a specific field in the layer. This helps to quickly look up field information by field name.
createQuery
- Signature
-
createQuery (): Query
Creates a new query object for the layer.
- Returns
- Query
A new query object for the layer.
queryFeatures
- Signature
-
queryFeatures (query?: Query, requestOptions?: RequestOptions): Promise<FeatureSet>
Queries features from the layer based on the provided query parameters.
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| query | The query parameters. | | |
| requestOptions | Additional options for the request. | |
- Returns
- Promise<FeatureSet>
A promise that resolves to the feature set containing the queried features.
SelectableLayer
A selectable layer which can either be layers containing object IDs or layers with graphics.
SelectableLayerViewBase
- Since
- ArcGIS Maps SDK for JavaScript 5.1
The underlying base type for selectable layer views which contains common properties and methods for both layer views with graphics and layer views with object IDs.
- Supertypes
- default
layer
- Type
- SelectableLayer
- Since
- ArcGIS Maps SDK for JavaScript 5.1
A reference to the layer associated with the layer view.
updating
- Type
- boolean
- Since
- ArcGIS Maps SDK for JavaScript 5.1
Indicates the layer view is currently updating.
view
- Type
- View
- Since
- ArcGIS Maps SDK for JavaScript 5.1
A reference to the view associated with the layer view.
SelectableLayerViewWithGraphics
- Since
- ArcGIS Maps SDK for JavaScript 5.1
Layer view type narrowed to those that contain graphics.
- Supertypes
- SelectableLayerViewBase
layer
- Type
- GraphicsLayer
- Since
- ArcGIS Maps SDK for JavaScript 5.1
A reference to the graphics layer associated with the layer view.
queryGraphics
- Type
- () => Promise<Collection<Graphic>>
- Since
- ArcGIS Maps SDK for JavaScript 5.1
Queries for graphics from the layer view.
SelectableLayerViewWithObjectIds
- Since
- ArcGIS Maps SDK for JavaScript 5.1
Layer view type narrowed to those that support Object IDs.
- Supertypes
- SelectableLayerViewBase
createQuery
- Signature
-
createQuery (): Query
- Since
- ArcGIS Maps SDK for JavaScript 5.1
Creates a new query object for the layer view.
- Returns
- Query
A new query object for the layer view.
queryFeatures
- Signature
-
queryFeatures (query?: Query, requestOptions?: RequestOptions): Promise<FeatureSet>
- Since
- ArcGIS Maps SDK for JavaScript 5.1
Queries features from the layer view based on the provided query parameters.
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| query | The query parameters. | | |
| requestOptions | Additional options for the request. | |
- Returns
- Promise<FeatureSet>
A promise that resolves to the feature set containing the queried features.
SelectableLayerView
- Since
- ArcGIS Maps SDK for JavaScript 5.1
A selectable layer view which can either be layer views containing object IDs or layer views with graphics.
SelectionOperationEvents
- Since
- ArcGIS Maps SDK for JavaScript 5.1
Types of events emitted by a selection operation.
SelectionCompleteEventInfo
- Since
- ArcGIS Maps SDK for JavaScript 5.1
aborted
- Type
- boolean
- Since
- ArcGIS Maps SDK for JavaScript 5.1
Indicates the selection operation was cancelled.
selection
- Type
- Graphic[]
- Since
- ArcGIS Maps SDK for JavaScript 5.1
Reference to the current working selection set.
toolName
- Type
- SelectionToolName
- Since
- ArcGIS Maps SDK for JavaScript 5.1
Indicates the selection tool used by the selection operation.
SelectionChangeEventInfo
- Since
- ArcGIS Maps SDK for JavaScript 5.1
Information shared by selection operation events.
SelectionOperationCreateTool
- Since
- ArcGIS Maps SDK for JavaScript 5.1
Reference to the type of sketch creation tool used by the selection operation.
- Supertypes
- Extract<CreateTool‚ "point" | "polygon" | "circle" | "rectangle">