# UseLongPressOptions

Options for [`useLongPress`](https://docs.mapcairn.com/api/map/useLongPress-function.md).

This is an interface exported by `@mapcairn/map`, checked against version 0.2.0.

## Signature

```ts
import type { UseLongPressOptions } from "@mapcairn/map";
 
interface UseLongPressOptions
```

## Properties

### getAdapter

```ts
readonly getAdapter: () => MapAdapter | null;
```

Returns the mounted adapter, or null while there is none.

### hostRef

```ts
readonly hostRef: RefObject<HTMLElement | null>;
```

The map region element; points are measured from its top-left corner.

### onLongPress

```ts
readonly onLongPress?: (event: MapLongPressEvent) => void;
```

Called once per long-press. Without it, presses are ignored.

## See also

- [`MapAdapter`](https://docs.mapcairn.com/api/core/MapAdapter.md)
- [`MapLongPressEvent`](https://docs.mapcairn.com/api/map/MapLongPressEvent.md)

Source: [packages/map/src/host/useLongPress.ts:29](https://github.com/MapCairn/mapcairn/blob/main/packages/map/src/host/useLongPress.ts#L29)
