---
title: "OnOptions | JavaScript maps SDK"
description: "Documentation for MapTiler SDK"
---

> For AI agents: a documentation index is available at [/llms.txt](https://docs.maptiler.com/llms.txt). Markdown versions of all pages are available by appending .md to any URL.

# Interface OnOptions

interface OnOptions {  
    [close](#close)?: readonly string\[\];  
    [highWaterMark](#highwatermark)?: number;  
    [lowWaterMark](#lowwatermark)?: number;  
    [signal](#signal)?: AbortSignal;  
}

#### Hierarchy ([View Summary](https://docs.maptiler.com/sdk-js/api-reference/hierarchy/#Externals.EventEmitter.OnOptions))

-   [Abortable](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.EventEmitter.Abortable/)
    -   OnOptions

##### Index

### Properties[](#properties)

[close?](#close) [highWaterMark?](#highwatermark) [lowWaterMark?](#lowwatermark) [signal?](#signal)

## Properties[](#properties-1)

### `Optional`close[](#close)

close?: readonly string\[\]

Names of events that will end the iteration.

### `Optional`highWaterMark[](#highwatermark)

highWaterMark?: number

The high watermark. The emitter is paused every time the size of events being buffered is higher than it. Supported only on emitters implementing `pause()` and `resume()` methods.

#### Default[](#default)

```typescript
Number.MAX_SAFE_INTEGER
```

### `Optional`lowWaterMark[](#lowwatermark)

lowWaterMark?: number

The low watermark. The emitter is resumed every time the size of events being buffered is lower than it. Supported only on emitters implementing `pause()` and `resume()` methods.

#### Default[](#default-1)

```typescript
1
```

### `Optional`signal[](#signal)

signal?: AbortSignal

Inherited from [Abortable](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.EventEmitter.Abortable/).[signal](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.EventEmitter.Abortable/#signal)
