@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
40 lines (38 loc) • 2.46 kB
TypeScript
/**
* Performs an identify operation on the layers of a map service exposed by the ArcGIS
* Server REST API. Use [IdentifyParameters](https://developers.arcgis.com/javascript/latest/references/core/rest/support/IdentifyParameters/) to set the parameters
* for the identify operation and [IdentifyResult](https://developers.arcgis.com/javascript/latest/references/core/rest/support/IdentifyResult/) to work with
* the results.
*
* > [!WARNING]
* >
* > **Known Limitations**
* >
* > The identify operation is currently not supported if attempting to be used
* > in a 3D [SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/)
*
* @since 4.19
* @see [IdentifyParameters](https://developers.arcgis.com/javascript/latest/references/core/rest/support/IdentifyParameters/)
* @see [IdentifyResult](https://developers.arcgis.com/javascript/latest/references/core/rest/support/IdentifyResult/)
* @see [Identify - ArcGIS Server REST API](https://developers.arcgis.com/rest/services-reference/identify-map-service-.htm)
* @see [Sample - Identify](https://developers.arcgis.com/javascript/latest/sample-code/identify/)
*/
import type IdentifyParameters from "./support/IdentifyParameters.js";
import type IdentifyResult from "./support/IdentifyResult.js";
import type { RequestOptions } from "../request/types.js";
/** The results returned from the [identify()](https://developers.arcgis.com/javascript/latest/references/core/rest/identify/#identify) operation. */
export interface IdentifyResults {
/** An array of objects containing the result features of the Identify task. */
results: IdentifyResult[];
/** Included in the response only if the result exceeded the transfer limit. */
exceededTransferLimit?: boolean;
}
/**
* Sends a request to the ArcGIS REST map service resource to identify features based on the
* [IdentifyParameters](https://developers.arcgis.com/javascript/latest/references/core/rest/support/IdentifyParameters/) specified.
*
* @param url - URL to the ArcGIS Server REST resource that represents a map service.
* @param params - Specifies the criteria used to identify the features.
* @param requestOptions - Additional [options](https://developers.arcgis.com/javascript/latest/references/core/request/#request) to be used for the data request.
*/
export function identify(url: string, params: IdentifyParameters, requestOptions?: RequestOptions): Promise<IdentifyResults>;