Instance Property

selectedAnnotation

The annotation that is selected.

Declaration

attribute mapkit.Annotation selectedAnnotation;

Discussion

The value of selectedAnnotation is either:

  • a mapkit.Annotation object, if one is selected, or

  • null, if no annotations are selected.

An annotation is selected if its selected property is true. To deselect all annotations, set this attribute to null.

To select an annotation that is already part of the map, set this attribute to the desired annotation.

When the selected annotation is removed from the map (as an effect of removeAnnotation, removeAnnotations, or setting a new set of annotations with the annotations property), it is deselected before being removed.

See Also

Annotating the Map

annotations

An array of all the annotations on the map.

annotationForCluster

A delegate method for modifying an annotation that represents a group of annotations that are combined into a cluster.

annotationsInMapRect

Returns the list of annotation objects located in the specified map rectangle.

addAnnotation

Adds an annotation to the map.

addAnnotations

Adds multiple annotations to the map.

removeAnnotation

Removes an annotation from the map.

removeAnnotations

Removes multiple annotations from the map.