require(["esri/rest/find"], (find) => { /* code goes here */ });
import * as find from "@arcgis/core/rest/find.js";
esri/rest/find
Search a map service exposed by the ArcGIS Server REST API based on a string value. The search can be conducted on a single field of a single layer, on many fields of a layer, or on many fields of many layers.
Use FindParameters to set the parameters of the method. The result will be an instance of FindResult.
Known Limitations
The find operation is currently not supported if attempting to be used:
- in a 3D SceneView
- with dynamic layers
- See also
Method Overview
Name | Return Type | Summary | Function |
---|---|---|---|
Promise<Object> | Sends a request to the ArcGIS REST map service resource to perform a search based on the input params. | find |
Method Details
-
find
find(url, params, requestOptions){Promise<Object>}
-
Sends a request to the ArcGIS REST map service resource to perform a search based on the input params.
ParametersReturnsType Description Promise<Object> Resolves to an object with the following properties: Property Type Description results FindResult[] An array of objects containing the result features of the find() method. exceededTransferLimit Boolean exceededTransferLimit is included in the response only if the result exceeded the transfer limit. Examplelet params = new FindParameters({ layerIds: [0], searchFields: ["areaname"], outSpatialReference: { wkid: 4326 }, returnGeometry: true }); find(url, params).then(function(results){ // Results contain FindResults of search });