# Class IdentifyService

Allows identifying features by geometry.

#### Hierarchy (view full)

- InitializableBase
  - IdentifyService

#####
Index

### Constructors

constructor

### Properties

@eventTypes
providers

### Accessors

failureMode
isDestroyed
isInitialized

### Methods

_getSerializableProperties
_initializableChildCollections
_initializeChildren
_onDestroy
_onInitialize
_postInitialize
_toPropertyDef
assignProperties
assignPropertiesAsync
count
destroy
finishAssignProperties
getDefault
getDefaults
getSerializableProperties
identify
initialize
isSupported
toJSON

##
Constructors

### constructor

- new IdentifyService(_properties?): IdentifyService

- #### Parameters

  - `Optional`_properties: InitializableBaseProperties

  #### Returns IdentifyService

  Inherited from InitializableBase.constructor

##
Properties

### @eventTypes

@eventTypes: InitializableBaseEvents

#### Deprecated

Do not directly reference this property. Use EventNames and EventTypes helpers from @arcgis/core/Evented.

Inherited from InitializableBase.@eventTypes

### `Readonly` providers

providers: Collection<IdentifyProvider> = ...

Providers that implement the identify functionality. The collection is initially populated with built-in Geocortex providers, however providers can be added or removed. The order is significant -- the first registered provider that is able to handle a given data/FeatureSource!FeatureSource will be used for that source (see tasks/identify/IdentifyProvider!IdentifyProvider.isSupported).

##
Accessors

### failureMode

- get failureMode(): FailureMode

- Determines how a parent object should handle initialization failure in this object. The default is "warn".

  - `"error"`: support/InitializeError!InitializeError is thrown.
  - `"warn"`: Message is logged and support/InitializableBase!InitializeWarningEvent is raised.
  - `"ignore"`: support/InitializableBase!InitializeWarningEvent is raised.

  #### Returns FailureMode

  Inherited from InitializableBase.failureMode

- set failureMode(value): void

- #### Parameters

  - value: FailureMode

  #### Returns void

  Inherited from InitializableBase.failureMode

### isDestroyed

- get isDestroyed(): boolean

- See support/InitializableBase!Initializable.isDestroyed.

  #### Returns boolean

  Inherited from InitializableBase.isDestroyed

### isInitialized

- get isInitialized(): boolean

- See support/InitializableBase!Initializable.isInitialized.

  #### Returns boolean

  Inherited from InitializableBase.isInitialized

##
Methods

### `Protected`_getSerializableProperties

- _getSerializableProperties(): PropertyDefs<InitializableBaseProperties>

- The property keys and their metadata that are used to implement serializing and deserializing the class instance.

  #### Returns PropertyDefs<InitializableBaseProperties>

  Inherited from InitializableBase._getSerializableProperties

### `Protected`_initializableChildCollections

- _initializableChildCollections(): IterableIterator<Collection<InitializableBase<InitializableBaseProperties>>, any, any>

- Collections of child items to initialize. Items that fail to initialize are removed from the collection.

  #### Returns IterableIterator<Collection<InitializableBase<InitializableBaseProperties>>, any, any>

  Inherited from InitializableBase._initializableChildCollections

### `Protected`_initializeChildren

- _initializeChildren(): Promise<void>

- Initializes child entities.

  #### Returns Promise<void>

  Inherited from InitializableBase._initializeChildren

### `Protected`_onDestroy

- _onDestroy(): Promise<void>

- Called to perform cleanup. Subclasses should override this method rather than destroy() to perform custom cleanup.

  #### Returns Promise<void>

  Inherited from InitializableBase._onDestroy

### `Protected`_onInitialize

- _onInitialize(): Promise<void>

- Called to perform initialization of the support/InitializableBase!InitializableBase. Subclasses should override this method rather than initialize() to perform custom initialization.

  #### Returns Promise<void>

  Overrides InitializableBase._onInitialize

### `Protected`_postInitialize

- _postInitialize(): Promise<void>

- Called after normal initialization. Note: Child items are initialized before this is called.

  #### Returns Promise<void>

  Inherited from InitializableBase._postInitialize

### `Protected`_toPropertyDef

- _toPropertyDef<T>(def): PropertyDef<T>

- Converts the value to a PropertyDef object.

  #### Type Parameters

  - T

  #### Parameters

  - def: PropertyDefSerializeMode | PropertyDefSerializeMode[] | PropertyDef<T>

    The value to convert.

  #### Returns PropertyDef<T>

  Inherited from InitializableBase._toPropertyDef

### assignProperties

- assignProperties(properties): void

- #### Parameters

  - properties: Partial<InitializableBaseProperties>

  #### Returns void

  #### Inherit Doc

  Inherited from InitializableBase.assignProperties

### assignPropertiesAsync

- assignPropertiesAsync(properties): Promise<void>

- #### Parameters

  - properties: Partial<InitializableBaseProperties>

  #### Returns Promise<void>

  #### Inherit Doc

  Inherited from InitializableBase.assignPropertiesAsync

### count

- count(sources, geometry, options?): AsyncIterable<CountResult, any, any>

- Counts the features that intersect a given geometry.

  #### Parameters

  - sources: Iterable<FeatureSource, any, any> | Collection<FeatureSource>

    The feature sources to identify.

  - geometry: GeometryUnion

    The geometry to match.

  - `Optional` options: IdentifyOptions

    Options that affect the identify operation.

  #### Returns AsyncIterable<CountResult, any, any>

  An iterator of tasks/CountResult!CountResult containing count results. If the operation is canceled, the returned iterator might end prematurely and reject with an instance of support/Cancellable!Cancellation, though it may still succeed and return all count results.

- count(mapExtension, geometry, options?): AsyncIterable<CountResult, any, any>

- Count the features that intersect a given geometry.

  #### Parameters

  - mapExtension: MapExtension

    The extension of the map to identify.

  - geometry: GeometryUnion

    The geometry to match.

  - `Optional` options: IdentifyOptions

    Options that affect the identify operation.

  #### Returns AsyncIterable<CountResult, any, any>

  An iterator of tasks/CountResult!CountResult containing count results. If the operation is canceled, the returned iterator might end prematurely and reject with an instance of support/Cancellable!Cancellation, though it may still succeed and return all count results.

- count(map, geometry, options?): AsyncIterable<CountResult, any, any>

- Count the features that intersect a given geometry.

  #### Parameters

  - map: Map

    The map to identify.

  - geometry: GeometryUnion

    The geometry to match.

  - `Optional` options: IdentifyOptions

    Options that affect the identify operation.

  #### Returns AsyncIterable<CountResult, any, any>

  An iterator of tasks/CountResult!CountResult containing count results. If the operation is canceled, the returned iterator might end prematurely and reject with an instance of support/Cancellable!Cancellation, though it may still succeed and return all count results.

### destroy

- destroy(): Promise<void>

- A clean-up function that should get called whenever the item is disposed of.

  #### Returns Promise<void>

  Inherited from InitializableBase.destroy

### finishAssignProperties

- finishAssignProperties(): Promise<void>

- #### Returns Promise<void>

  #### Inherit Doc

  Inherited from InitializableBase.finishAssignProperties

### getDefault

- getDefault<K>(key): InitializableBaseProperties[K]

- #### Type Parameters

  - K extends "failureMode"

  #### Parameters

  - key: K

  #### Returns InitializableBaseProperties[K]

  #### Inherit Doc

  Inherited from InitializableBase.getDefault

### getDefaults

- getDefaults(): InitializableBaseProperties

- #### Returns InitializableBaseProperties

  #### Inherit Doc

  Inherited from InitializableBase.getDefaults

### getSerializableProperties

- getSerializableProperties(serializeMode?): PropertyDefs<InitializableBaseProperties>

- Returns the serializable properties.

  #### Parameters

  - `Optional` serializeMode: SerializeMode

    Optional. If specified, only properties that support the given serialization mode will be returned.

  #### Returns PropertyDefs<InitializableBaseProperties>

  Inherited from InitializableBase.getSerializableProperties

### identify

- identify(sources, geometry, options?): AsyncIterable<Feature, any, any>

- Identifies features that intersect a given geometry.

  #### Parameters

  - sources: Iterable<FeatureSource, any, any> | Collection<FeatureSource>

    The feature sources to identify.

  - geometry: GeometryUnion | GeometryUnion[]

    The geometry to match.

  - `Optional` options: IdentifyOptions

    Options that affect the identify operation.

  #### Returns AsyncIterable<Feature, any, any>

  An iterator of data/FeatureSet!FeatureSet containing identify results. If the operation is canceled, the returned iterator might end prematurely and reject with an instance of support/Cancellable!Cancellation, though it may still succeed and return all results.

- identify(mapExtension, geometry, options?): AsyncIterable<Feature, any, any>

- Identifies features that intersect a given geometry.

  #### Parameters

  - mapExtension: MapExtension

    The extension of the map to identify.

  - geometry: GeometryUnion | GeometryUnion[]

    The geometry to match.

  - `Optional` options: IdentifyOptions

    Options that affect the identify operation.

  #### Returns AsyncIterable<Feature, any, any>

  An iterator of data/FeatureSet!FeatureSet containing identify results. If the operation is canceled, the returned iterator might end prematurely and reject with an instance of support/Cancellable!Cancellation, though it may still succeed and return all results.

- identify(map, geometry, options?): AsyncIterable<Feature, any, any>

- Identifies features that intersect a given geometry.

  #### Parameters

  - map: Map

    The map to identify.

  - geometry: GeometryUnion | GeometryUnion[]

    The geometry to match.

  - `Optional` options: IdentifyOptions

    Options that affect the identify operation.

  #### Returns AsyncIterable<Feature, any, any>

  An iterator of data/FeatureSet!FeatureSet containing identify results. If the operation is canceled, the returned iterator might end prematurely and reject with an instance of support/Cancellable!Cancellation, though it may still succeed and return all results.

### initialize

- initialize(): Promise<void>

- Initializes the item.

  #### Returns Promise<void>

  Inherited from InitializableBase.initialize

### isSupported

- isSupported(source, geometry, options?): boolean

- Determines whether this service supports identify operations for the given source, i.e. whether there is at least one registered provider for that source.

  #### Parameters

  - source: FeatureSource

    The source to check.

  - geometry: GeometryUnion

    The geometry to check.

  - `Optional` options: IdentifyOptions

    The options to check.

  #### Returns boolean

### toJSON

- toJSON(serializeMode?): InitializableBaseProperties

- #### Parameters

  - serializeMode: SerializeMode = "all"

  #### Returns InitializableBaseProperties

  #### Inherit Doc

  Inherited from InitializableBase.toJSON