AWFOverlayMetadata
Objective-C
@interface AWFOverlayMetadata : NSObject
Swift
class AWFOverlayMetadata : NSObject
An AWFOverlayMetadata object loads and stores additional information about an overlay, specifically a tile or
image overlay. This information consists of timestamps, dates and intervals that are available from the data source to
use when displaying the overlay on a map.
-
The layer type associated with the metadata.
Declaration
Objective-C
@property (nonatomic) AWFMapLayer _Nonnull layerType;Swift
var layerType: AWFMapLayer { get set } -
The array of available timestamps returned from the data source.
Declaration
Objective-C
@property (nonatomic, readonly, nullable) NSArray<NSNumber *> *times;Swift
var times: [NSNumber]? { get } -
The array of available dates returned from the data source.
Declaration
Objective-C
@property (nonatomic, readonly, nullable) NSArray<NSDate *> *dates;Swift
var dates: [Date]? { get } -
The array of available offset intervals returned from the data source.
Declaration
Objective-C
@property (nonatomic, readonly, nullable) NSArray<NSNumber *> *timeIntervals;Swift
var timeIntervals: [NSNumber]? { get } -
Initializes and returns a metadata object associated with the specified layer type.
Declaration
Objective-C
- (nonnull id)initWithLayerType:(nonnull AWFMapLayer)layerType;Swift
init(layerType: AWFMapLayer)Parameters
layerTypeThe
AWFLayerTypeassociated with the metadata.Return Value
The initialized metadata object.
-
Requests and stores the latest metadata from the data source for the associated layer type.
Declaration
Objective-C
- (void)getMetadataWithSuccess: (nonnull void (^)(NSArray<NSNumber *> *_Nullable, NSArray<NSDate *> *_Nullable))success failure:(nonnull void (^)(NSError *_Nullable))failure;Swift
func getWithSuccess(_ success: @escaping ([NSNumber]?, [Date]?) -> Void, failure: @escaping (Error?) -> Void)Parameters
successThe completion block to call when the metadata has been returned from the data source.
failureThe completion block to call when an error occurred while requesting the data.
-
Returns the most recent date available in the metadata.
Declaration
Objective-C
- (nullable NSDate *)latestDate;Swift
func latestDate() -> Date? -
Returns the time string associated with the most recent date available in the metadata.
Declaration
Objective-C
- (nullable NSString *)latestTimeString;Swift
func latestTimeString() -> String? -
Determines the closest available date in the metadata relative to the specified date.
Declaration
Objective-C
- (nullable NSDate *)dateClosestToDate:(nonnull NSDate *)date;Swift
func dateClosest(to date: Date) -> Date?Parameters
dateThe date to get the closest date for.
Return Value
The closest available date.
-
Determines the closest available timestamp string in the metadata relative to the specified date.
Declaration
Objective-C
- (nullable NSString *)timeStringClosestToDate:(nonnull NSDate *)date;Swift
func timeStringClosest(to date: Date) -> String?Parameters
dateThe date to get the closest timestamp string for.
Return Value
The closest available timestamp string.
-
Returns the timestamp string for the specified offset interval.
Declaration
Objective-C
- (nullable NSString *)timeStringForInterval:(NSInteger)interval;Swift
func timeString(forInterval interval: Int) -> String?Parameters
intervalThe offset interval to return the timestamp string for.
View on GitHub
AWFOverlayMetadata Class Reference