(Added at v1.0)
This data object is used as the findParameters argument to FindTask.execute method. It specifies the search criteria for a find operation.
Search for samples
that use this class.
Creates a new FindParameters object. The constructor takes no parameters.
var findParams = new esri.tasks.FindParameters();
The contains parameter determines whether to look for an exact match of the search text or not. If true, searches for a value that contains the searchText provided.
This is a case-insensitive search. If false, searches for an exact match of the searchText string. The exact match is case-sensitive.
true | false
An array of DynamicLayerInfos used to change the layer ordering or redefine the map. When set the find operation will perform the find against the dynamic layers. (Added at v2.7)
Specifies the number of decimal places for the geometries returned by the query operation. (Added at v3.14)
Array of layer definition expressions that allows you to filter the features of individual layers. Layer definitions with semicolons or colons are supported if using a map service published using ArcGIS Server 10.
findParams.layerDefinitions = "POP1999 > 75000";
//The following syntax is supported when using a map service published with ArcGIS Server 10.
findParams.layerDefinitions = "REQ_TIME like '07:%'";
The layers to perform the find operation on. The layers are specified as a comma-separated list of layer ids. The list of ids is returned in ArcGISDynamicMapServiceLayer layerInfos
findParams.layerIds = ;
The maximum allowable offset used for generalizing geometries returned by the find operation. The offset is in the units of the spatialReference. If a spatialReference is not defined the spatial reference of the map is used. (Added at v2.0)
If "true", the result set include the geometry associated with each result. The default is "false".
true | false
findParams.returnGeometry = false;
The names of the fields of a layer to search. The fields are specified as a comma-separated list of field names. If this parameter is not specified, all fields are searched.
findParams.searchFields = ["ADDRESS"];
The search string text that is searched across the layers and the fields as specified in the layers and searchFields parameters.
findParams.searchText = searchText;
Where search text is defined in the HTML div
Find: <input type="text" id="searchText" value="th ave"></div>