OSAnnotation Protocol Reference
| Conforms to | NSObject |
| Declared in | OSAnnotation.h |
Overview
The OSAnnotation protocol is used with OSAnnotationView to add annotations to an OSMapView.
To use this protocol, adopt it in classes which represent points of interest. A class that adopts this protocol must implement the coordinate property.
For simple use cases, consider using OSPointAnnotation instead of defining a new class.
Tasks
Specifying co-ordinates
-
coordinateThe center point of the annotation, as a CLLocationCoordinate2D. The implementation of this property must be KVO-compliant. If gridPoint is implemented and returns a valid OSGridPoint, it is used in preference to the coordinate.
property required method -
gridPointThe center point of the annotation, as an OSGridPoint. The implementation of this property must be KVO-compliant. If this returns a valid OSGridPoint, it is used instead of the coordinate.
property
Metadata
Dragging annotations
-
– setCoordinate:Called after an annotation is dragged, unless the object responds to setGridPoint:.
-
– setGridPoint:Called in preference to setCoordinate:.
Properties
coordinate
The center point of the annotation, as a CLLocationCoordinate2D. The implementation of this property must be KVO-compliant. If gridPoint is implemented and returns a valid OSGridPoint, it is used in preference to the coordinate.
@property (nonatomic, readonly) CLLocationCoordinate2D coordinateDeclared In
OSAnnotation.hgridPoint
The center point of the annotation, as an OSGridPoint. The implementation of this property must be KVO-compliant. If this returns a valid OSGridPoint, it is used instead of the coordinate.
@property (nonatomic, readonly) OSGridPoint gridPointDeclared In
OSAnnotation.hsubtitle
The subtitle of the annotation.
@property (nonatomic, readonly, copy) NSString *subtitleDeclared In
OSAnnotation.hInstance Methods
setCoordinate:
Called after an annotation is dragged, unless the object responds to setGridPoint:.
- (void)setCoordinate:(CLLocationCoordinate2D)newCoordinateDeclared In
OSAnnotation.hsetGridPoint:
Called in preference to setCoordinate:.
- (void)setGridPoint:(OSGridPoint)gridPointDeclared In
OSAnnotation.h