# MapEvents

What a map reports, by event name. Payloads are plain data.

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

## Signature

```ts
import type { MapEvents } from "@mapcairn/sdk/browser";
 
interface MapEvents
```

## Properties

### click

```ts
readonly click: LatLng;
```

The map was clicked or tapped at this position.

### error

```ts
readonly error: MapEngineError | MountMapError;
```

The engine failed (`MapEngineError`), or the layers a page gave cannot all
be used (`MountMapError`): the function that loads them failed (kind
`layers-unavailable`), or a layer it returned was left out because it is
not valid or needs `services.layerSource` (kind `invalid-option`).

### featuretap

```ts
readonly featuretap: MapFeatureTap;
```

A point, shape or line of a layer was tapped. Not emitted while the measure, draw or directions tool is on.

### noticeaction

```ts
readonly noticeaction: NoticeAction;
```

The button of a notice the page worded was pressed: today the action of
`engineNotice`. What it does is the page's to decide. In releases after
`0.2.0`, not in `0.2.0` or any earlier release.

### viewchange

```ts
readonly viewchange: ViewState;
```

The map stopped moving: the view it now shows.

## See also

- [`LatLng`](https://docs.mapcairn.com/api/sdk/browser/LatLng.md)
- [`MapEngineError`](https://docs.mapcairn.com/api/sdk/browser/MapEngineError.md)
- [`MountMapError`](https://docs.mapcairn.com/api/sdk/browser/MountMapError.md)
- [`MapFeatureTap`](https://docs.mapcairn.com/api/sdk/browser/MapFeatureTap.md)
- [`NoticeAction`](https://docs.mapcairn.com/api/sdk/browser/NoticeAction.md)
- [`ViewState`](https://docs.mapcairn.com/api/sdk/browser/ViewState.md)
