require(["esri/tasks/FindParameters"], function(FindParameters) { /* code goes here */ });
Description
(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.
Samples
Search for
samples that use this class.
Constructors
Properties
Constructor Details
Creates a new FindParameters object. The constructor takes no parameters.
Sample:
require([
"esri/tasks/FindParameters", ...
], function(FindParameters, ... ) {
var findParams = new FindParameters();
...
});
Property Details
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.
Known values: true | false
Default value: true
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)
Sample: params.geometryPrecision = 1;
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.
Sample:
findParams.layerDefinitions[2] = "POP1999 > 75000";
//The following syntax is supported when using a map service published with ArcGIS Server 10.
findParams.layerDefinitions[0] = "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.
Sample: findParams.layerIds = [0];
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".
Known values: true | false
Default value: false
Sample: 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.
Sample: findParams.searchFields = ["ADDRESS"];
The search string text that is searched across the layers and the fields as specified in the layers and searchFields parameters.
Sample:
findParams.searchText = searchText;
Where search text is defined in the HTML div
Find: <input type="text" id="searchText" value="th ave"></div>