---
title: MapKitEventListener
framework: mapkitjs
role: symbol
role_heading: Type
path: mapkitjs/mapkiteventlistener
---

# MapKitEventListener

A type alias that represents a function or an object that receives a MapKit event.

## Declaration

```data
type MapKitEventListener<T extends MapKitEvent = MapKitEvent> =
    | ((event: T) => void)
    | {
          handleEvent(event: T): void;
      };
```

## Discussion

Discussion You can specify the event listener as either a function or an object with a handleEvent method.

## See Also

### Deprecated

- [MapKitEvent](mapkitjs/mapkitevent.md)
- [MapKitEventTarget](mapkitjs/mapkiteventtarget.md)
