AWFRasterMapLayer

Objective-C

@interface AWFRasterMapLayer : NSObject

Swift

class AWFRasterMapLayer : NSObject

An AWFRasterMapLayer object represents and manages a single Aeris Maps (AMP) raster layer for a weather map.

  • The raster layer type to use for the layer.

    Declaration

    Objective-C

    @property (nonatomic, readonly) AWFMapLayer _Nonnull layerType;

    Swift

    var layerType: AWFMapLayer { get }
  • The layer code to use for the layer. If layerType is set, this value will automatically be set to the coded string.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSString *_Nonnull layerKey;

    Swift

    var layerKey: String { get }
  • The blend mode to apply to the layer.

    Declaration

    Objective-C

    @property (nonatomic) AWFRasterBlendMode _Nonnull blendMode;

    Swift

    var blendMode: AWFRasterBlendMode { get set }
  • The forecast model type to use for the layer if it’s intended to be a future or forecast layer.

    Declaration

    Objective-C

    @property (nonatomic) int forecastModel;

    Swift

    var forecastModel: Int32 { get set }
  • The opacity of the layer.

    Declaration

    Objective-C

    @property (nonatomic) CGFloat alpha;

    Swift

    var alpha: CGFloat { get set }
  • The amount to blur the layer, which is a value from 0 meaning no blur (default) to 10. The higher the value, the greater the blur effect.

    Declaration

    Objective-C

    @property (nonatomic) CGFloat blurAmount;

    Swift

    var blurAmount: CGFloat { get set }
  • The mask to apply to the layer.

    Declaration

    Objective-C

    @property (nonatomic) AWFRasterMask _Nonnull mask;

    Swift

    var mask: AWFRasterMask { get set }
  • Declaration

    Objective-C

    @property (nonatomic, strong, readonly) NSArray<AWFRasterMapLayerFilter *> *_Nonnull filters;

    Swift

    var filters: [AWFRasterMapLayerFilter] { get }
  • A Boolean value indicating if this layer should use the dark style. This property is used specifically for text and overlay layers, such as data text and administrative overlay layers.

    Declaration

    Objective-C

    @property (nonatomic, getter=isDarkStyle) BOOL darkStyle;

    Swift

    var isDarkStyle: Bool { get set }
  • A Boolean value indicating if this layer should display the text information for the layer type.

    Note

    Not all layer types support text layers. Refer to the Aeris Maps Layers documetation for more information regarding the supported layers.

    Declaration

    Objective-C

    @property (nonatomic, getter=isTextLayer) BOOL textLayer;

    Swift

    var isTextLayer: Bool { get set }
  • A Boolean value indicating if this layer should use large text. This property is used only for text-specific layer types or layers where isTextLayer is YES.

    Declaration

    Objective-C

    @property (nonatomic, getter=isLargeText) BOOL largeText;

    Swift

    var isLargeText: Bool { get set }
  • A Boolean value indicating if this layer should display Metric values. This property is used only for text-specific layer types or layers where isTextLayer is YES.

    Declaration

    Objective-C

    @property (nonatomic, getter=isMetric) BOOL metric;

    Swift

    var isMetric: Bool { get set }
  • The Aeris Maps (AMP) string for this layer.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSString *valueString;

    Swift

    var valueString: String? { get }
  • Initializes and returns a newly allocated raster layer with the specified layer type.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithLayerType:(nonnull AWFMapLayer)layerType;

    Swift

    init(layerType: AWFMapLayer)

    Parameters

    layerType

    The layer type for the raster layer.

    Return Value

    An initialized raster layer object.

  • Initializes and returns a newly allocated raster layer with the specified AMP layer key.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithLayerKey:(nonnull NSString *)layerKey;

    Swift

    init(layerKey: String)

    Parameters

    layerKey

    The AMP layer key for the raster layer.

    Return Value

    An initialized raster layer object.

  • Initializes and returns a newly allocated raster layer with the specified layer type and forecast model.

    Note

    The forecast model value will only be used if the specified layer type corresponds to a future layer or supports future data.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithLayerType:(nonnull AWFMapLayer)layerType
                                forecastModel:(id)forecastModel;

    Swift

    init(layerType: AWFMapLayer, forecastModel: Any!)

    Parameters

    layerType

    The layer type for the raster layer.

    forecastModel

    The forecast model to use for the layer.

    Return Value

    An initialized raster layer object.

  • Initializes and returns a newly allocated raster layer with the specified layer type.

    Declaration

    Objective-C

    + (nonnull instancetype)layerWithLayerType:(nonnull AWFMapLayer)layerType;

    Parameters

    layerType

    The layer type for the raster layer.

    Return Value

    An initialized raster layer object.

  • Initializes and returns a newly allocated raster layer with the specified layer type and forecast model.

    Note

    The forecast model value will only be used if the specified layer type corresponds to a future layer or supports future data.

    Declaration

    Objective-C

    + (nonnull instancetype)layerWithLayerType:(nonnull AWFMapLayer)layerType
                                 forecastModel:(id)forecastModel;

    Parameters

    layerType

    The layer type for the raster layer.

    forecastModel

    The forecast model to use for the layer.

    Return Value

    An initialized raster layer object.

  • Initializes and returns a newly allocated raster layer with the specified AMP layer key.

    Declaration

    Objective-C

    + (nonnull instancetype)layerWithLayerKey:(nonnull NSString *)layerKey;

    Parameters

    layerKey

    The AMP layer key for the raster layer.

    Return Value

    An initialized raster layer object.

  • Adds a filter to the raster layer.

    Declaration

    Objective-C

    - (void)addFilter:(nonnull AWFRasterMapLayerFilter *)filter;

    Swift

    func addFilter(_ filter: AWFRasterMapLayerFilter)

    Parameters

    filter

    The filter to add.

  • Removes a filter from the layer.

    Declaration

    Objective-C

    - (void)removeFilter:(nonnull AWFRasterMapLayerFilter *)filter;

    Swift

    func removeFilter(_ filter: AWFRasterMapLayerFilter)

    Parameters

    filter

    The filter to remove.

Class Utility Methods

  • Returns a dictionary containing the default titles for all supported raster layers.

    Declaration

    Objective-C

    + (nonnull NSDictionary<AWFMapLayer, NSString *> *)layerTitles;

    Swift

    class func layerTitles() -> [AWFMapLayer : String]
  • Returns whether or not the future raster layer requires a forecast model.

    Declaration

    Objective-C

    + (BOOL)futureLayerRequiresModel:(nonnull NSString *)layerKey;

    Swift

    class func futureLayerRequiresModel(_ layerKey: String) -> Bool

    Parameters

    layerKey

    The future raster layer key.

  • Returns the weather data type associated with the specified layer type.

    Declaration

    Objective-C

    + (id)weatherDataTypeForLayerType:(nonnull AWFMapLayer)layerType;

    Swift

    class func weatherDataType(forLayerType layerType: AWFMapLayer) -> Any!

    Parameters

    layerType

    The layer type to use