AWFAnnotation

@protocol AWFAnnotation <NSObject>

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 (readwrite, copy, nonatomic, nullable) NSString *title;

    Swift

    var title: String? { get set }
  • The string containing the annotation’s subtitle.

    Declaration

    Objective-C

    @property (readwrite, copy, nonatomic, nullable) NSString *subtitle;

    Swift

    var subtitle: String? { get set }
  • The center point (specified as a map coordinate) of the annotation.

    Declaration

    Objective-C

    @property (readonly, nonatomic) CLLocationCoordinate2D coordinate;

    Swift

    var coordinate: CLLocationCoordinate2D { get }
  • The model object associated with the annotation, which is used for styling and callout information.

    Declaration

    Objective-C

    @property (readonly, nonatomic, strong, nullable) AWFWeatherObject *modelObject

    Swift

    var modelObject: UnsafeMutablePointer<Int32>? { get }
  • A Boolean value indicating whether the annotation belongs to a timeline animation.

    Declaration

    Objective-C

    @property (assign, readwrite, 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 and modelObject. *

    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.