annotationForMapFeature
The method MapKit JS calls when the framework creates a map feature annotation.
Declaration
get annotationForMapFeature():
| ((
mapFeatureAnnotation: MapFeatureAnnotation,
) => Annotation | undefined)
| undefined;
set annotationForMapFeature(
value:
| ((
mapFeatureAnnotation: MapFeatureAnnotation,
) => Annotation | undefined)
| 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.