<!--
{
  "availability" : [
    "MapKit JS: 5.0.0 - 6.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "MapKitJS",
  "identifier" : "/documentation/MapKitJS/MapKitEventListener",
  "metadataVersion" : "0.1.0",
  "role" : "Type",
  "symbol" : {
    "kind" : "Type",
    "modules" : [
      "MapKit JS"
    ],
    "preciseIdentifier" : "type/mapkit.MapKitEventListener"
  },
  "title" : "MapKitEventListener"
}
-->

# MapKitEventListener

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

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

## Discussion

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

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)