---
title: calloutContentForAnnotation(annotation)
framework: mapkitjs
role: symbol
role_heading: Interface Method
path: mapkitjs/annotationcalloutdelegate/calloutcontentforannotation
---

# calloutContentForAnnotation(annotation)

Returns custom content for the callout bubble.

## Declaration

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

## Parameters

- `annotation`: The annotation for the callout.

## Return Value

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

## Discussion

Discussion You can use this method to provide custom content inside the callout bubble without replacing the whole element, as in calloutElementForAnnotation(annotation). When MapKit JS creates a callout for a selected annotation and the annotation’s callout delegate has no calloutElementForAnnotation(annotation) method, the framework calls calloutContentForAnnotation(annotation) method instead — if it’s defined — on the delegate with the annotation as a parameter.

## See Also

### Providing elements

- [calloutElementForAnnotation(annotation)](mapkitjs/annotationcalloutdelegate/calloutelementforannotation.md)
- [calloutLeftAccessoryForAnnotation(annotation)](mapkitjs/annotationcalloutdelegate/calloutleftaccessoryforannotation.md)
- [calloutRightAccessoryForAnnotation(annotation)](mapkitjs/annotationcalloutdelegate/calloutrightaccessoryforannotation.md)
