# Class EventHelper

#### Hierarchy

- EventHelper

- Defined in src/misc/EventHelper.js:34

#####
Index

### Properties

listenerKeys_

### Methods

addListenerKey
clearListenerKey
initListenerKey_

## Properties

### listenerKeys_

listenerKeys_: any

- Defined in src/misc/EventHelper.js:38

## Methods

### addListenerKey

- addListenerKey(uid: string | number, key: EventsKey): void

- Utility method to add a listener key bound to a unique id. The key has to come from `ol.events`.

  #### Parameters

  - ##### uid: string | number

    Unique id.

  - ##### key: EventsKey

    Key.

  #### Returns void

  - Defined in src/misc/EventHelper.js:48

### clearListenerKey

- clearListenerKey(uid: string | number): void

- Clear all listener keys from the given unique id.

  #### Parameters

  - ##### uid: string | number

    Unique id.

  #### Returns void

  - Defined in src/misc/EventHelper.js:60

### initListenerKey_

- initListenerKey_(uid: string | number): void

- Utility method that does 2 things:

  - initialize the listener keys of a given uid with an array (if that key has not array set yet)
  - unlisten any events if the array already exists for the given uid and empty the array.

  #### Parameters

  - ##### uid: string | number

    Unique id.

  #### Returns void

  - Defined in src/misc/EventHelper.js:73

Generated using TypeDoc