Protocol: MKAnnotation
Overview
The MKAnnotation protocol is used to provide annotation-related information to a map view. To use this protocol, you adopt it in any custom objects that store or represent annotation data. Each object then serves as the source of information about a single map annotation and provides critical information, such as the annotation’s location on the map. Annotation objects do not provide the visual representation of the annotation but typically coordinate (in conjunction with the map view’s delegate) the creation of an appropriate MKAnnotationView object to handle the display.The center point (specified as a map coordinate) of the annotation. (required) (read-only)The string containing the annotation’s subtitle.The string containing the annotation’s title.Sets the new center point of the annotation.
Instance Attribute Summary (collapse)
-
- coordinate
readonly
The center point (specified as a map coordinate) of the annotation.
-
- subtitle
readonly
The string containing the annotation’s subtitle.
-
- title
readonly
The string containing the annotation’s title.
Instance Method Summary (collapse)
-
- setCoordinate:
Sets the new center point of the annotation.
Instance Attribute Details
- (CLLocationCoordinate2D) coordinate (readonly)
The center point (specified as a map coordinate) of the annotation. (required) (read-only)
- (String) subtitle (readonly)
The string containing the annotation’s subtitle. This string is displayed in the callout for the associated annotation view.
- (String) title (readonly)
The string containing the annotation’s title. Although this property is optional, if you support the selection of annotations in your map view, you are expected to provide this property. This string is displayed in the callout for the associated annotation view.
Instance Method Details
- (Object) setCoordinate(newCoordinate)
Sets the new center point of the annotation. Annotations that support dragging should implement this method to update the position of the annotation.