AWFShapeSource
@interface AWFShapeSource : AWFMapContentSource <AWFStylable>
An AWFShapeSource
object represents a map content source that maintains shape/polygon data on a map.
-
The polygons being managed by the content source (readonly).
Declaration
Objective-C
@property (readonly, strong, nonatomic) NSArray *polygons;
Swift
var polygons: [Any]! { get }
-
The options to use when requesting data for the overlay.
Declaration
Objective-C
@property (nonatomic, strong) AWFWeatherRequestOptions *requestOptions
Swift
var requestOptions: UnsafeMutablePointer<Int32>! { get set }
-
The request action to use when requesting data for the content source.
Declaration
Objective-C
@property (readwrite, copy, nonatomic) NSString *requestAction;
Swift
var requestAction: String! { get set }
-
The style to use when rendering polygons for this content source on the weather map.
Declaration
Objective-C
@property (readwrite, strong, nonatomic) id style;
Swift
var style: Any! { get set }
-
The legend style used when rendering polygons for the content source.
Declaration
Objective-C
@property (readwrite, strong, nonatomic) AWFLegendStyle *legendStyle;
Swift
var legendStyle: AWFLegendStyle! { get set }
-
Requests data for the overlay within the region described by the specified coordinate bounds.
Declaration
Objective-C
- (void)loadForMapBounds:(AWFMapCoordinateBounds *)bounds results:(void (^)(NSArray *, NSError *))results;
Swift
func load(forMapBounds bounds: AWFMapCoordinateBounds!, results: (([Any]?, Error?) -> Void)!)
Parameters
bounds
The coordinate bounds to request data for.
results
The completion block when the request finishes or fails.
-
Requests data for the overlay within the region described the the specified coordinate bounds and the date range.
Declaration
Objective-C
- (void)loadForMapBounds:(AWFMapCoordinateBounds *)bounds fromDate:(NSDate *)fromDate toDate:(NSDate *)toDate results:(void (^)(NSArray *, NSError *))results;
Swift
func load(forMapBounds bounds: AWFMapCoordinateBounds!, from fromDate: Date!, to toDate: Date!, results: (([Any]?, Error?) -> Void)!)
Parameters
bounds
The coordinate bounds to request data for
fromDate
The starting date to use for the request, or
nil
to use the current date and timetoDate
The ending date to use for the request, or
nil
to use the current date and timeresults
The completion block when the request finishes or fails
-
Requests data for the overlay using a search request and the specified
requestOptions
.Declaration
Objective-C
- (void)loadForMapWithResults:(void (^)(NSArray *, NSError *))results;
Swift
func loadForMap(results: (([Any]?, Error?) -> Void)!)
Parameters
results
The completion block when the request completes or fails.
-
Cancels any active requests and prepared for a new request.
Declaration
Objective-C
- (void)reset;
Swift
func reset()