Skip to main content

Find

Task for finding features by searching text values across multiple fields and layers in ArcGIS Map Services.

Constructor

new Find(options: FindOptions)
ArgumentTypeDescription
optionsFindOptionsConfiguration options for the find operation

Options

OptionTypeDefaultDescription
urlstringRequired MapService URL
searchTextstringRequired Text to search for
searchFieldsArray<string>Fields to search in
layersArray<number>Layers to search
containsbooleantrueWhether to find partial matches
returnGeometrybooleanfalseInclude feature geometry
maxAllowableOffsetnumberGeometry simplification
geometryPrecisionnumberDecimal places for geometry
dynamicLayersArray<object>Dynamic layer definitions
returnFieldNamebooleanfalseReturn field names with values
returnUnformattedValuesbooleanfalseReturn raw field values
tokenstringAuthentication token

Chainable Methods

All methods return the task instance for chaining:

find.text('California').in(['STATE_NAME']).layers([0, 1])
MethodDescription
text(searchText)Set text to search for
in(fields)Set fields to search in
layers(layerIds)Set layers to search
contains(boolean)Enable/disable partial matching
returnGeometry(boolean)Include geometry in results
returnFieldName(boolean)Include field names
token(token)Set authentication token

Execution Methods

.run()

Execute the find operation with current parameters.

Returns: Promise<FeatureCollection>


## Advanced Usage Examples