AWFMapStrategyDelegate
Objective-C
@protocol AWFMapStrategyDelegate <NSObject>
Swift
protocol AWFMapStrategyDelegate : NSObjectProtocol
The AWFMapStrategyDelegate
protocol defines a set of optional methods that you can use to receive messages
related to the internal map view being managed by a map strategy.
-
Tells the delegate that the map view is about to change its visible region.
Declaration
Objective-C
- (void)mapStrategy:(nonnull id<AWFMapStrategy>)strategy regionWillChangeFromBounds:(nonnull AWFMapCoordinateBounds *)bounds;
Swift
optional func mapStrategy(_ strategy: AWFMapStrategy, regionWillChangeFrom bounds: AWFMapCoordinateBounds)
Parameters
strategy
The map strategy managing the map view.
bounds
The visible bounds of the map view before the region change.
-
Tells the delegate that the map view has changed its visible region.
Declaration
Objective-C
- (void)mapStrategy:(nonnull id<AWFMapStrategy>)strategy regionDidChangeToBounds:(nonnull AWFMapCoordinateBounds *)bounds;
Swift
optional func mapStrategy(_ strategy: AWFMapStrategy, regionDidChangeTo bounds: AWFMapCoordinateBounds)
Parameters
strategy
The map strategy managing the map view.
bounds
The visible bounds of the map view after the region change.
-
Tells the delegate that a polygon overlay was tapped on the map.
Declaration
Objective-C
- (void)mapStrategy:(nonnull id<AWFMapStrategy>)strategy didTapPolygon:(nonnull id)polygon atCoordinate:(CLLocationCoordinate2D)coordinate;
Swift
optional func mapStrategy(_ strategy: AWFMapStrategy, didTapPolygon polygon: Any, at coordinate: CLLocationCoordinate2D)
Parameters
strategy
The map strategy managing the map view.
polygon
The polygon overlay that was tapped.
coordinate
The map coordinate at which the tap was detected.
-
Tells the delegate that an overlay was added to the map view.
Declaration
Objective-C
- (void)mapStrategy:(nonnull id<AWFMapStrategy>)strategy didAddOverlay:(nonnull id)overlay;
Swift
optional func mapStrategy(_ strategy: AWFMapStrategy, didAddOverlay overlay: Any)
Parameters
strategy
The map strategy that added the overlay.
overlay
The overlay that was added.
-
Tells the delegate that the map’s callout is about to be displayed for a selected annotation, allowing the delegate to prepare the map for any map region changes that may occur to accomodate the callout’s view.
Declaration
Objective-C
- (void)mapStrategyWillDisplayCallout:(nonnull id<AWFMapStrategy>)strategy;
Swift
optional func mapStrategyWillDisplayCallout(_ strategy: AWFMapStrategy)
Parameters
strategy
The map strategy that is managing the callout.