# Class FeatureOverlay

Provides a featureOverlay used by the FeatureOverlayManager.

Example of initialization: const featureOverlay = new FeatureOverlay(manager, index);

#### Param: manager

The feature overlay manager.

#### Param: index

This feature overlay's index.

- Defined in src/map/FeatureOverlay.ts:43

#####
Index

### Constructors

constructor

### Properties

index_
listenerKeys_
manager_

### Methods

addFeature
clear
handleFeatureAdd_
handleFeatureRemove_
isEmpty
removeFeature
setFeatures
setStyle

## Constructors

### constructor

- new FeatureOverlay(manager, index): FeatureOverlay

- #### Parameters

  - manager: FeatureOverlayMgr
  - index: number

  #### Returns FeatureOverlay

  - Defined in src/map/FeatureOverlay.ts:50

## Properties

### index_

index_: number

- Defined in src/map/FeatureOverlay.ts:46

### listenerKeys_

listenerKeys_: EventsKey[]

- Defined in src/map/FeatureOverlay.ts:48

### manager_

manager_: FeatureOverlayMgr

- Defined in src/map/FeatureOverlay.ts:44

## Methods

### addFeature

- addFeature(feature): void

- Add a feature to the feature overlay.

  #### Parameters

  - feature: Feature<Geometry>

    The feature to add.

  #### Returns void

  - Defined in src/map/FeatureOverlay.ts:61

### clear

- clear(): void

- Remove all the features from the feature overlay.

  #### Returns void

  - Defined in src/map/FeatureOverlay.ts:86

### handleFeatureAdd_

- handleFeatureAdd_(evt): void

- #### Parameters

  - evt: Event | BaseEvent

    Feature collection event.

  #### Returns void

  - Defined in src/map/FeatureOverlay.ts:131

### handleFeatureRemove_

- handleFeatureRemove_(evt): void

- #### Parameters

  - evt: Event | BaseEvent

    Feature collection event.

  #### Returns void

  - Defined in src/map/FeatureOverlay.ts:141

### isEmpty

- isEmpty(): boolean

- Check if featureOverlay has no features.

  #### Returns boolean

  True if there is no features. False otherwise.

  - Defined in src/map/FeatureOverlay.ts:79

### removeFeature

- removeFeature(feature): void

- Remove a feature from the feature overlay.

  #### Parameters

  - feature: Feature<Geometry>

    The feature to remove.

  #### Returns void

  - Defined in src/map/FeatureOverlay.ts:70

### setFeatures

- setFeatures(features): void

- Configure this feature overlay with a feature collection. Features added to the collection are also added to the overlay. Same for removal. If you configure the feature overlay with a feature collection you will use the collection to add and remove features instead of using the overlay's `addFeature`, `removeFeature` and `clear` functions.

  #### Parameters

  - features: Collection<Feature<Geometry>>

    Feature collection.

  #### Returns void

  - Defined in src/map/FeatureOverlay.ts:99

### setStyle

- setStyle(style): void

- Set a style for the feature overlay.

  #### Parameters

  - style: Style | Style[] | StyleFunction

    Style.

  #### Returns void

  - Defined in src/map/FeatureOverlay.ts:124

Generated using TypeDoc