AWFWeatherLayer

Objective-C

@interface AWFWeatherLayer : NSObject

Swift

class AWFWeatherLayer : NSObject

The AWFWeatherLayer class provides utility methods for working with layer types. This class is intended to be a static class and should not be instantiated as separate instances.

  • Returns a dictionary that maps each {@link AWFLayerType} to its display name.

    Declaration

    Objective-C

    + (nonnull NSDictionary<NSString *, NSString *> *)names;

    Swift

    class func names() -> [String : String]
  • Returns the layer name for the specified layer type.

    Declaration

    Objective-C

    + (nonnull NSString *)nameForLayerType:(nonnull AWFMapLayer)layerType;

    Swift

    class func name(forLayerType layerType: AWFMapLayer) -> String

    Parameters

    layerType

    The layer type.

    Return Value

    The layer name for the code.

  • Returns the map content type for the specified layer type (e.g. tile, point, shape, etc).

    Declaration

    Objective-C

    + (AWFMapContentType)contentTypeForLayerType:(nonnull AWFMapLayer)layerType;

    Swift

    class func contentType(forLayerType layerType: AWFMapLayer) -> AWFMapContentType

    Parameters

    layerType

    The layer type to return the map content type for.

    Return Value

    The map content type for the layer type.

  • Returns the layer types used to modify the specified layer type (e.g. different accumulated precipitation periods).

    Declaration

    Objective-C

    + (nonnull NSArray<AWFMapLayer> *)modifierLayersForLayerType:
        (nonnull AWFMapLayer)layerType;

    Swift

    class func modifierLayers(forLayerType layerType: AWFMapLayer) -> [AWFMapLayer]

    Parameters

    layerType

    The layer type to the return the modifier layer types for.

    Return Value

    The modifier layer types, if any.

  • Returns a dictionary of all of the supported layer types.

    The returned dictionary contains three objects, one for each data layer category (e.g. “tile”, “point” and “polygon”). Each of these category objects contains an array of dictionarys, one for each layer type within the category, and includes the overlay’s code, type and name:

    {@"type": @(AWFLayerTypeRadar), @"code": @"radar", @"name": @"Radar"}

    This dictionary of supported layer types is often used to dynamically generate menus or listings of the available overlays {@link AWFWeatherMap} supports.

    Declaration

    Objective-C

    + (nonnull NSDictionary<NSString *, NSDictionary *> *)layersByGroup;

    Swift

    class func layersByGroup() -> [String : [AnyHashable : Any]]

    Return Value

    The dictionary of supported layer types.

  • Returns whether the specified string is a valid layer code.

    Declaration

    Objective-C

    + (BOOL)isValidLayer:(nonnull NSString *)code;

    Swift

    class func isValidLayer(_ code: String) -> Bool
  • Returns whether the specified layer type is a raster layer.

    Declaration

    Objective-C

    + (BOOL)isRaster:(nonnull AWFMapLayer)layerType;

    Swift

    class func isRaster(_ layerType: AWFMapLayer) -> Bool
  • Returns whether the specified layer type is a raster tile layer.

    Declaration

    Objective-C

    + (BOOL)isTile:(nonnull AWFMapLayer)layerType;

    Swift

    class func isTile(_ layerType: AWFMapLayer) -> Bool
  • Returns whether the specified layer type is a point data layer.

    Declaration

    Objective-C

    + (BOOL)isPoint:(nonnull AWFMapLayer)layerType;

    Swift

    class func isPoint(_ layerType: AWFMapLayer) -> Bool
  • Returns whether the specified layer type is a shape/polygon layer.

    Declaration

    Objective-C

    + (BOOL)isShape:(nonnull AWFMapLayer)layerType;

    Swift

    class func isShape(_ layerType: AWFMapLayer) -> Bool
  • Returns whether the specified layer type is a text layer.

    Declaration

    Objective-C

    + (BOOL)isLabel:(nonnull AWFMapLayer)layerType;

    Swift

    class func isLabel(_ layerType: AWFMapLayer) -> Bool
  • Returns whether the specified layer type is a base map layer.

    Declaration

    Objective-C

    + (BOOL)isBase:(nonnull AWFMapLayer)layerType;

    Swift

    class func isBase(_ layerType: AWFMapLayer) -> Bool
  • Returns whether the specified layer type is a map overlay layer.

    Declaration

    Objective-C

    + (BOOL)isOverlay:(nonnull AWFMapLayer)layerType;

    Swift

    class func isOverlay(_ layerType: AWFMapLayer) -> Bool
  • Returns whether the specified layer type is a surface data layer. A layer is considered surface data if it’s raster data covers much of the map, such as temperatures or wind speeds.

    Declaration

    Objective-C

    + (BOOL)isSurfaceData:(nonnull AWFMapLayer)layerType;

    Swift

    class func isSurfaceData(_ layerType: AWFMapLayer) -> Bool
  • Returns whether the specified layer type is an overlay mask layer.

    Declaration

    Objective-C

    + (BOOL)isMask:(nonnull AWFMapLayer)layerType;

    Swift

    class func isMask(_ layerType: AWFMapLayer) -> Bool
  • Returns whether the specified layer type is an Aeris Maps (AMP) layer.

    Declaration

    Objective-C

    + (BOOL)isAmp:(nonnull AWFMapLayer)layerType;

    Swift

    class func isAmp(_ layerType: AWFMapLayer) -> Bool
  • Returns whether the specified layer type represents current data or data in the past.

    Declaration

    Objective-C

    + (BOOL)isPast:(nonnull AWFMapLayer)layerType;

    Swift

    class func isPast(_ layerType: AWFMapLayer) -> Bool
  • Returns whether the specified layer type can also represent data in the past, such as surface temperatures or radar.

    Declaration

    Objective-C

    + (BOOL)hasPast:(nonnull AWFMapLayer)layerType;

    Swift

    class func hasPast(_ layerType: AWFMapLayer) -> Bool
  • Returns whether the specified layer type represents data in the future, such as future radar or forecast temperatures.

    Declaration

    Objective-C

    + (BOOL)isFuture:(nonnull AWFMapLayer)layerType;

    Swift

    class func isFuture(_ layerType: AWFMapLayer) -> Bool
  • Returns whether the specified layer type can also represent data in the future, such as radar/future radar.

    Declaration

    Objective-C

    + (BOOL)hasFuture:(nonnull AWFMapLayer)layerType;

    Swift

    class func hasFuture(_ layerType: AWFMapLayer) -> Bool
  • Returns whether the specified layer type contains modifiers.

    Declaration

    Objective-C

    + (BOOL)hasModifiers:(nonnull AWFMapLayer)layerType;

    Swift

    class func hasModifiers(_ layerType: AWFMapLayer) -> Bool
  • Returns the future layer type associated with the specified layer type. If the specified layer type does not support future data, nil will be returned.

    Declaration

    Objective-C

    + (nullable AWFMapLayer)futureLayerForLayer:(nonnull AWFMapLayer)layerType;

    Swift

    class func futureLayer(forLayer layerType: AWFMapLayer) -> AWFMapLayer?
  • Covnerts a string to the associated map layer type value.

    Declaration

    Objective-C

    + (nullable AWFMapLayer)convertToLayerType:(nonnull NSString *)code;

    Swift

    class func convert(toLayerType code: String) -> AWFMapLayer?