AWFShapeSource

Objective-C

@interface AWFShapeSource : AWFMapContentSource <AWFStylable>

Swift

class 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 (nonatomic, strong, readonly, nullable) NSArray<id<AWFPolygon>> *polygons;
  • The polylines being managed by the content source (readonly).

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly, nullable) NSArray<id<AWFPolyline>> *polylines;
  • The combined polygons and polylines managed by this content source (readonly).

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSArray *overlays;

    Swift

    var overlays: [Any]? { get }
  • The options to use when requesting data for the overlay.

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) AWFWeatherRequestOptions *requestOptions
  • The request action to use when requesting data for the content source.

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) 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 (nonatomic, strong, nullable) id style;

    Swift

    var style: Any? { get set }
  • The legend style used when rendering polygons for the content source.

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) 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:(nonnull AWFMapCoordinateBounds *)bounds
                     results:(nonnull void (^)(NSArray *_Nonnull,
                                               NSError *_Nonnull))results;

    Swift

    func load(forMapBounds bounds: AWFMapCoordinateBounds, results: @escaping ([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:(nonnull AWFMapCoordinateBounds *)bounds
                    fromDate:(nonnull NSDate *)fromDate
                      toDate:(nonnull NSDate *)toDate
                     results:(nonnull void (^)(NSArray *_Nonnull,
                                               NSError *_Nonnull))results;

    Swift

    func load(forMapBounds bounds: AWFMapCoordinateBounds, from fromDate: Date, to toDate: Date, results: @escaping ([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 time

    toDate

    The ending date to use for the request, or nil to use the current date and time

    results

    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:(nonnull void (^)(NSArray *_Nonnull,
                                                    NSError *_Nonnull))results;

    Swift

    func loadForMap(results: @escaping ([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()