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

# calloutElementForAnnotation(annotation)

Returns an element representing a custom callout.

## Declaration

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

## Parameters

- `annotation`: The annotation for the callout.

## Return Value

Return Value This method returns a DOM element to use as the callout element in place of the standard callout bubble. This callout element populates with the information to display, including the information from the annotation.

## Discussion

Discussion If you don’t prevent the callout from appearing, MapKit JS calls this method on the annotation’s callout delegate (if the delegate is an object and its calloutElementForAnnotation(annotation) property is a function) with the annotation as a parameter.

## See Also

### Providing elements

- [calloutContentForAnnotation(annotation)](mapkitjs/annotationcalloutdelegate/calloutcontentforannotation.md)
- [calloutLeftAccessoryForAnnotation(annotation)](mapkitjs/annotationcalloutdelegate/calloutleftaccessoryforannotation.md)
- [calloutRightAccessoryForAnnotation(annotation)](mapkitjs/annotationcalloutdelegate/calloutrightaccessoryforannotation.md)
