<!--
{
  "availability" : [
    "MapKit JS: 5.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MapKitJS",
  "identifier" : "/documentation/MapKitJS/AnnotationCalloutDelegate/calloutContentForAnnotation",
  "metadataVersion" : "0.1.0",
  "role" : "Interface Method",
  "symbol" : {
    "kind" : "Interface Method",
    "modules" : [
      "MapKit JS"
    ],
    "preciseIdentifier" : "structm/mapkit.AnnotationCalloutDelegate/calloutContentForAnnotation"
  },
  "title" : "calloutContentForAnnotation(annotation)"
}
-->

# calloutContentForAnnotation(annotation)

Returns custom content for the callout bubble.

```
calloutContentForAnnotation?(annotation: Annotation): HTMLElement;
```

## Parameters

`annotation`

The annotation for the callout.

## Return Value

The method returns a DOM element, MapKit JS adds as a subelement of the callout bubble.

## Discussion

You can use this method to provide custom content inside the callout bubble without replacing the whole element, as in [`calloutElementForAnnotation(annotation)`](/documentation/MapKitJS/AnnotationCalloutDelegate/calloutElementForAnnotation).

When MapKit JS creates a callout for a selected annotation and the annotation’s callout delegate has no [`calloutElementForAnnotation(annotation)`](/documentation/MapKitJS/AnnotationCalloutDelegate/calloutElementForAnnotation) method, the framework calls [`calloutContentForAnnotation(annotation)`](/documentation/MapKitJS/AnnotationCalloutDelegate/calloutContentForAnnotation) method instead — if it’s defined — on the delegate with the annotation as a parameter.

---

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)