calloutElementForAnnotation(annotation)
Returns an element representing a custom callout.
Declaration
calloutElementForAnnotation?(annotation: Annotation): HTMLElement;Parameters
- annotation:
The annotation for the callout.
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
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.