AWFAnnotation
Objective-C
@protocol AWFAnnotation <AWFDataRepresentable>
Swift
protocol AWFAnnotation : AWFDataRepresentable
The AWFAnnotation
protocol represents an annotation object on a weather map and provides the common set of properties and methods for
annotation items across different mapping libraries.
-
The string containing the annotation’s title.
Declaration
Objective-C
@property (nonatomic, copy, nullable) NSString *title;
Swift
var title: String? { get set }
-
The string containing the annotation’s subtitle.
Declaration
Objective-C
@property (nonatomic, copy, nullable) NSString *subtitle;
Swift
var subtitle: String? { get set }
-
The center point (specified as a map coordinate) of the annotation.
Declaration
Objective-C
@property (nonatomic, readonly) CLLocationCoordinate2D coordinate;
Swift
var coordinate: CLLocationCoordinate2D { get }
-
A Boolean value indicating whether the annotation belongs to a timeline animation.
Declaration
Objective-C
@property (nonatomic) BOOL belongsToTimelineAnimation;
Swift
var belongsToTimelineAnimation: Bool { get set }
-
Initializes and returns a newly allocated annotation object for the specified
coordinate
. *Declaration
Objective-C
- (nonnull instancetype)initWithCoordinate:(CLLocationCoordinate2D)coordinate;
Swift
init(coordinate: CLLocationCoordinate2D)
Parameters
coordinate
The coordinate of the annotation *
Return Value
An initialized annotation or
nil
if the object couldn’t be created. -
Initializes and returns a newly allocated annotation object for the specified
coordinate
andmodelObject
. *Declaration
Objective-C
- (nonnull instancetype)initWithCoordinate:(CLLocationCoordinate2D)coordinate modelObject:(id)object;
Swift
init(coordinate: CLLocationCoordinate2D, modelObject object: Any!)
Parameters
coordinate
The coordinate of the annoation
object
The model object the annotation represents *
Return Value
An initialized annotation or
nil
if the object couldn’t be created.