Hide Table of Contents
esri/dijit/util
esri/layer/pixelFilters
esri/process
esri/support
esri/workers
Class: FindParameters

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

NameSummary
new FindParameters()Creates a new FindParameters object.

Properties

NameTypeSummary
containsBooleanThe contains parameter determines whether to look for an exact match of the search text or not.
dynamicLayerInfosDynamicLayerInfo[]An array of DynamicLayerInfos used to change the layer ordering or redefine the map.
geometryPrecisionNumberSpecifies the number of decimal places for the geometries returned by the query operation.
layerDefinitionsString[]Array of layer definition expressions that allows you to filter the features of individual layers.
layerIdsNumber[]The layers to perform the find operation on.
maxAllowableOffsetNumberThe maximum allowable offset used for generalizing geometries returned by the find operation.
outSpatialReferenceSpatialReferenceThe spatial reference of the output geometries.
returnGeometryBooleanIf "true", the result set include the geometry associated with each result.
searchFieldsString[]The names of the fields of a layer to search.
searchTextStringThe search string text that is searched across the layers and the fields as specified in the layers and searchFields parameters.
Constructor Details

new FindParameters()

Creates a new FindParameters object. The constructor takes no parameters.
Sample:
require([
  "esri/tasks/FindParameters", ... 
], function(FindParameters, ... ) {
  var findParams = new FindParameters();
  ...
});
Property Details

<Boolean> contains

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

<DynamicLayerInfo[]> dynamicLayerInfos

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)

<Number> geometryPrecision

Specifies the number of decimal places for the geometries returned by the query operation. (Added at v3.14)
Sample:
params.geometryPrecision = 1;

<String[]> layerDefinitions

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:%'";

<Number[]> layerIds

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];

<Number> maxAllowableOffset

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)

<SpatialReference> outSpatialReference

The spatial reference of the output geometries. If outSpatialReference is not specified, the output geometries are returned in the spatial reference of the map. See Projected Coordinate Systems and Geographic Coordinate Systems for the list of supported spatial references.

<Boolean> returnGeometry

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;

<String[]> searchFields

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"];

<String> searchText

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>
Show Modal