AWFWeatherMapDelegate
Objective-C
@protocol AWFWeatherMapDelegate <NSObject>
Swift
protocol AWFWeatherMapDelegate : NSObjectProtocol
The AWFWeatherMapDelegate
protocol defines a set of optional methods that you can use to receive messages related
to updates or changes to the weather map.
This protocol does not receive the standard map view delegate messages that are provided with the specific mapping SDK the
associated weather map uses (e.g., MKMapViewDelegate
for Apple’s MapKit).
-
Tells the delegate the map view is about to change its visible region.
Declaration
Objective-C
- (void)weatherMap:(nonnull AWFWeatherMap *)weatherMap willChangeFromBounds:(nonnull AWFMapCoordinateBounds *)bounds;
Swift
optional func weatherMap(_ weatherMap: AWFWeatherMap, willChangeFrom bounds: AWFMapCoordinateBounds)
Parameters
weatherMap
The weather map that will change its bounds
bounds
The current coordinate bounds of the visible map region
-
Tells the delegate the map view has changed its visible region.
Declaration
Objective-C
- (void)weatherMap:(nonnull AWFWeatherMap *)weatherMap didChangeToBounds:(nonnull AWFMapCoordinateBounds *)bounds;
Swift
optional func weatherMap(_ weatherMap: AWFWeatherMap, didChangeTo bounds: AWFMapCoordinateBounds)
Parameters
weatherMap
The weather map that changed its bounds
bounds
The new coordinate bounds of the visible map region
-
Tells the delegate a map content source was added to the map.
Declaration
Objective-C
- (void)weatherMap:(nonnull AWFWeatherMap *)weatherMap didAddSource:(nonnull AWFMapContentSource *)source;
Swift
optional func weatherMap(_ weatherMap: AWFWeatherMap, didAdd source: AWFMapContentSource)
Parameters
weatherMap
The weather map that added the layer type.
source
The map data source that was added to the map.
-
Tells the delegate a map content source was removed from the map.
Declaration
Objective-C
- (void)weatherMap:(nonnull AWFWeatherMap *)weatherMap didRemoveSource:(nonnull AWFMapContentSource *)source;
Swift
optional func weatherMap(_ weatherMap: AWFWeatherMap, didRemove source: AWFMapContentSource)
Parameters
weatherMap
The weather map that removed the layer type.
source
The map data source that was removed from the map.
-
Tells the delegate an layer type was added to the map.
Declaration
Objective-C
- (void)weatherMap:(nonnull AWFWeatherMap *)weatherMap didAddLayerForType:(nonnull AWFMapLayer)layerType;
Swift
optional func weatherMap(_ weatherMap: AWFWeatherMap, didAddLayerForType layerType: AWFMapLayer)
Parameters
weatherMap
The weather map that added the layer type.
layerType
The {@link AWFLayerType} that was added to the map.
-
Tells the delegate an layer type was removed from the map.
Declaration
Objective-C
- (void)weatherMap:(nonnull AWFWeatherMap *)weatherMap didRemoveLayerForType:(nonnull AWFMapLayer)layerType;
Swift
optional func weatherMap(_ weatherMap: AWFWeatherMap, didRemoveLayerForType layerType: AWFMapLayer)
Parameters
weatherMap
The weather map that removed the layer type.
layerType
The {@link AWFLayerType} that was removed from the map.
-
Tells the delegate the timeline range changed.
Declaration
Objective-C
- (void)weatherMap:(nonnull AWFWeatherMap *)weatherMap didUpdateTimelineRangeFromDate:(nonnull NSDate *)fromDate toDate:(nonnull NSDate *)toDate;
Swift
optional func weatherMap(_ weatherMap: AWFWeatherMap, didUpdateTimelineRangeFrom fromDate: Date, to toDate: Date)
Parameters
weatherMap
The weather map whose timeline was changed
fromDate
The start date of the timeline
toDate
The end date of the timeline
-
Tells the delegate that the weather map started animating active overlay.
Declaration
Objective-C
- (void)weatherMapDidStartAnimating:(nonnull AWFWeatherMap *)weatherMap;
Swift
optional func weatherMapDidStartAnimating(_ weatherMap: AWFWeatherMap)
Parameters
weatherMap
The weather map that started animating.
-
Tells the delegate that the weather map stopped animating active overlays.
Declaration
Objective-C
- (void)weatherMapDidStopAnimating:(nonnull AWFWeatherMap *)weatherMap;
Swift
optional func weatherMapDidStopAnimating(_ weatherMap: AWFWeatherMap)
Parameters
weatherMap
The weather map that stopped animating.
-
Tells the delegate that the weather map reset the animation. This typically happens only when the animation’s start and/or end dates change.
Declaration
Objective-C
- (void)weatherMapDidResetAnimation:(nonnull AWFWeatherMap *)weatherMap;
Swift
optional func weatherMapDidResetAnimation(_ weatherMap: AWFWeatherMap)
Parameters
weatherMap
The weather map that reset the animation
-
Tells the delegate that the weather map did update its animation to the specified date.
Declaration
Objective-C
- (void)weatherMap:(nonnull AWFWeatherMap *)weatherMap animationDidUpdateToDate:(nonnull NSDate *)date;
Swift
optional func weatherMap(_ weatherMap: AWFWeatherMap, animationDidUpdateTo date: Date)
Parameters
weatherMap
The weather map whose animation updated.
date
The date to which the animation updated.
-
Tells the delegate the weather map started loading data required for the animation.
Declaration
Objective-C
- (void)weatherMapDidStartLoadingAnimationData: (nonnull AWFWeatherMap *)weatherMap;
Swift
optional func weatherMapDidStartLoadingAnimationData(_ weatherMap: AWFWeatherMap)
Parameters
weatherMap
The weather map that started loading data.
-
Tells the delegate the weather map failed to perform a data request associated with an animation.
Declaration
Objective-C
- (void)weatherMap:(nonnull AWFWeatherMap *)weatherMap didFailToPerformAnimationRequestForData:(nonnull NSDictionary *)data error:(nonnull NSError *)error;
Swift
optional func weatherMap(_ weatherMap: AWFWeatherMap, didFailToPerformAnimationRequestForData data: [AnyHashable : Any], error: Error)
Parameters
weatherMap
The weather map that requested the animation data
data
The data parameters associated with the request
error
The error that occurred
-
Tells the delegate the weather map failed to load the data associated with an animation.
Declaration
Objective-C
- (void)weatherMap:(nonnull AWFWeatherMap *)weatherMap didFailLoadingAnimationData:(nonnull NSError *)error;
Swift
optional func weatherMap(_ weatherMap: AWFWeatherMap, didFailLoadingAnimationData error: Error)
Parameters
weatherMap
The weather map that requested the animation data
error
The error that occurred
-
Tells the delegate the weather map finished loading all data required for the animation.
Declaration
Objective-C
- (void)weatherMapDidFinishLoadingAnimationData: (nonnull AWFWeatherMap *)weatherMap;
Swift
optional func weatherMapDidFinishLoadingAnimationData(_ weatherMap: AWFWeatherMap)
Parameters
weatherMap
The weather map that finished loading data.
-
Tells the delegate the weather map cancelled loading data required for the animation.
Declaration
Objective-C
- (void)weatherMapDidCancelLoadingAnimationData: (nonnull AWFWeatherMap *)weatherMap;
Swift
optional func weatherMapDidCancelLoadingAnimationData(_ weatherMap: AWFWeatherMap)
Parameters
weatherMap
The weather map that cancelled loading data
-
Tells the delegate that the loading process for the weather map’s animation was updated.
Declaration
Objective-C
- (void)weatherMap:(nonnull AWFWeatherMap *)weatherMap didUpdateAnimationDataLoadingProgress:(NSInteger)totalLoaded total:(NSInteger)total error:(nullable NSError *)error;
Swift
optional func weatherMap(_ weatherMap: AWFWeatherMap, didUpdateAnimationDataLoadingProgress totalLoaded: Int, total: Int, error: Error?)
Parameters
weatherMap
The weather map whose loading process changed.
totalLoaded
The total number of data requests that have completed.
total
The total number of data requests required for the animation.
-
Tells the delegate that a long press gesture started at the specified map coordinate.
Declaration
Objective-C
- (void)weatherMap:(nonnull AWFWeatherMap *)weatherMap didStartLongPressGestureAtCoordinate:(CLLocationCoordinate2D)coordinate;
Swift
optional func weatherMap(_ weatherMap: AWFWeatherMap, didStartLongPressGestureAt coordinate: CLLocationCoordinate2D)
Parameters
weatherMap
The weather map receiving the gesture
coordinate
The map coordinate where the gesture started
-
Tells the delegate that a long press gesture completed at the specified map coordinate
Declaration
Objective-C
- (void)weatherMap:(nonnull AWFWeatherMap *)weatherMap didReceiveLongPressGestureAtCoordinate:(CLLocationCoordinate2D)coordinate;
Swift
optional func weatherMap(_ weatherMap: AWFWeatherMap, didReceiveLongPressGestureAt coordinate: CLLocationCoordinate2D)
Parameters
weatherMap
The weather map receiving the gesture
coordinate
The map coordinate where the gesture occurred
-
Tells the delegate that the long press gesture was cancelled before completing.
Declaration
Objective-C
- (void)weatherMapDidCancelLongPressGesture:(nonnull AWFWeatherMap *)weatherMap;
Swift
optional func weatherMapDidCancelLongPressGesture(_ weatherMap: AWFWeatherMap)
Parameters
weatherMap
The weather map receiving the gesture
-
Tells the delegate that an
AWFPolygon
was tapped on the map.Declaration
Objective-C
- (void)weatherMap:(nonnull AWFWeatherMap *)weatherMap didTapPolygon:(nonnull id<AWFPolygon>)polygon atCoordinate:(CLLocationCoordinate2D)coordinate;
Parameters
weatherMap
The weather map containing the polygon
polygon
The polygon that was tapped
coordinate
The map coordinate where the tap occurred
-
Tells the delegate that the weather map is about to present a callout view for the specified annotation.
Declaration
Objective-C
- (void)weatherMap:(nonnull AWFWeatherMap *)weatherMap willPresentCalloutView:(nonnull AWFCalloutView *)calloutView forAnnotation:(nonnull id)annotation;
Swift
optional func weatherMap(_ weatherMap: AWFWeatherMap, willPresent calloutView: AWFCalloutView, forAnnotation annotation: Any)
Parameters
weatherMap
The weather map presenting the callout
calloutView
The callout view
annotation
The annotation from which the callout will present from
-
Tells the delegate that the weather map has presented a callout view for the specified annotation.
Declaration
Objective-C
- (void)weatherMap:(nonnull AWFWeatherMap *)weatherMap didPresentCalloutView:(nonnull AWFCalloutView *)calloutView forAnnotation:(nonnull id)annotation;
Swift
optional func weatherMap(_ weatherMap: AWFWeatherMap, didPresent calloutView: AWFCalloutView, forAnnotation annotation: Any)
Parameters
weatherMap
The weather map that presented the callout
calloutView
The callout view
annotation
The annotation from which the callout was presented from
-
Tells the delegate that the weather map is about to dismiss a callout view for the specified annotation.
Declaration
Objective-C
- (void)weatherMap:(nonnull AWFWeatherMap *)weatherMap willDismissCalloutView:(nonnull AWFCalloutView *)calloutView forAnnotation:(nonnull id)annotation;
Swift
optional func weatherMap(_ weatherMap: AWFWeatherMap, willDismiss calloutView: AWFCalloutView, forAnnotation annotation: Any)
Parameters
weatherMap
The weather map that will dismiss the callout
calloutView
The callout view
annotation
The annotation from which the callout was presented from
-
Tells the delegate that the weather map has dismissed a callout view for the specified annotation.
Declaration
Objective-C
- (void)weatherMap:(nonnull AWFWeatherMap *)weatherMap didDismissCalloutView:(nonnull AWFCalloutView *)calloutView forAnnotation:(nonnull id)annotation;
Swift
optional func weatherMap(_ weatherMap: AWFWeatherMap, didDismiss calloutView: AWFCalloutView, forAnnotation annotation: Any)
Parameters
weatherMap
The weather map that dismissed the callout
calloutView
The callout view
annotation
The annotation from which the callout was presented from
-
Tells the delegate that an accessory view was tapped for the displayed callout view.
Declaration
Objective-C
- (void)weatherMap:(nonnull AWFWeatherMap *)weatherMap calloutAccessoryControlTapped:(nonnull UIControl *)control;
Swift
optional func weatherMap(_ weatherMap: AWFWeatherMap, calloutAccessoryControlTapped control: UIControl)
Parameters
weatherMap
The weather map containing the callout view
control
The accessory view that was tapped