Class: FindParametersE-mail This TopicPrintable VersionGive Us Feedback

Description

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.  

Class hierarchy

esri.tasks.FindParameters

Constructor

Constructor Description
esri.tasks.FindParameters() Creates a new FindParameters object. The constructor takes no parameters.

Properties

Property Type Description
contains Boolean

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.

dynamicLayerInfos 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.
layerDefinitions String[] Array of layer definition expressions that allows you to filter the features of individual layers. Layer definitions with semicolons or colons are supported at version 2.0 if using a map service published using ArcGIS Server 10.
layerIds Number[] 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 ArcGISMapServiceLayer layerInfos.
maxAllowableOffset Number 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.
outSpatialReference SpatialReference The spatial reference of the output geometries. If outSR 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.
returnGeometry Boolean If "true", the result set include the geometry associated with each result. The default is "false".
searchFields String[] 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.
searchText String The search string text that is searched across the layers and the fields as specified in the layers and searchFields parameters.
Constructor Detail

esri.tasks.FindParameters()

Creates a new FindParameters object. The constructor takes no parameters.
Code snippets:
findParams = new esri.tasks.FindParameters();
Properties Detail

<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

<DynamicLayerInfos[]> 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. (As of v2.7)

<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 at version 2.0 if using a map service published using ArcGIS Server 10.
Code snippets:
findParams.layerDefinitions[2] = "POP1999 > 75000";
//The following syntax is supported at version 2.0 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 ArcGISMapServiceLayer layerInfos.
Code snippets:
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. (As of v2.0)

<SpatialReference> outSpatialReference

The spatial reference of the output geometries. If outSR 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
Code snippets:
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.
Code snippets:
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.
Code snippets:
findParams.searchText = searchText;
//Where search text is defined in the HTML div
Find: