Contents

annotationForMapFeature

The method MapKit JS calls when the framework creates a map feature annotation.

Declaration

annotationForMapFeature?: (
        mapFeatureAnnotation: MapFeatureAnnotation,
    ) => Annotation | undefined;

Discussion

You can choose to return the annotation the method provides with modified properties, or provide a new annotation to represent the map feature. If an annotation doesn’t return, MapKit JS uses the default annotation.