AWFAmpTileSourceProvider
Objective-C
@interface AWFAmpTileSourceProvider : NSObject
Swift
class AWFAmpTileSourceProvider : NSObject
An AWFAmpTileSourceProvider
instance is responsible for managing all raster and text layers and layer options for the Aeris Maps Platform (AMP).
-
The current timestamp to use for image requests.
Declaration
Objective-C
@property (nonatomic, strong) NSDate *_Nonnull timestamp;
Swift
var timestamp: Date { get set }
-
Forecast model to use for future layers.
Declaration
Objective-C
@property (nonatomic) int forecastModelType;
Swift
var forecastModelType: Int32 { get set }
-
The maximum number of frames that should be loaded for an animation.
Declaration
Objective-C
@property (nonatomic) NSUInteger maximumIntervalsForAnimation;
Swift
var maximumIntervalsForAnimation: UInt { get set }
-
The tile data layer used for managing past and current imagery.
Declaration
Objective-C
@property (nonatomic, strong, readonly) AWFAmpTileSource *_Nonnull tileLayer;
Swift
var tileLayer: AWFAmpTileSource { get }
-
The tile data layer used for managing past and current text imagery.
Declaration
Objective-C
@property (nonatomic, strong, readonly) AWFAmpTileSource *_Nonnull textTileLayer;
Swift
var textTileLayer: AWFAmpTileSource { get }
-
The tile data layer used for managing future imagery.
Declaration
Objective-C
@property (nonatomic, strong, readonly) AWFAmpTileSource *_Nonnull futureTileLayer;
Swift
var futureTileLayer: AWFAmpTileSource { get }
-
The tile data layer used for managing future text imager.
Declaration
Objective-C
@property (nonatomic, strong, readonly) AWFAmpTileSource *_Nonnull futureTextTileLayer;
Swift
var futureTextTileLayer: AWFAmpTileSource { get }
-
Returns whether higher-quality raster overlay imagery should be requested for retina devices. Note that enabling this will result in slightly longer response times for raster tiles and animation data requests. The default is
YES
.Declaration
Objective-C
@property (nonatomic) BOOL shouldUseRetinaImagery;
Swift
var shouldUseRetinaImagery: Bool { get set }
-
Returns whether higher-quality raster overlay imagery should be requested for retina devices for animations. Note that enabling this will result in slightly longer response times for raster tiles and animation data requests. The default is
YES
.Declaration
Objective-C
@property (nonatomic) BOOL shouldUseRetinaImageryForAnimation;
Swift
var shouldUseRetinaImageryForAnimation: Bool { get set }
-
Returns the AMP layer metadata for all supported layers.
Declaration
Objective-C
@property (nonatomic, strong, readonly) AWFMapLayersMetadata *_Nonnull layerMetadata;
Swift
var layerMetadata: AWFMapLayersMetadata { get }
-
The object that acts as the delegate of the tile source provider.
The delegate must adopt the
AWFAmpTileSourceProviderDelegate
protocol.Declaration
Objective-C
@property (nonatomic, weak, nullable) id<AWFAmpTileSourceProviderDelegate> delegate;
Swift
weak var delegate: AWFAmpTileSourceProviderDelegate? { get set }
-
Initializes and returns a newly allocated provider with the specified weather map.
Declaration
Objective-C
- (nonnull instancetype)initWithWeatherMap:(nonnull AWFWeatherMap *)weatherMap;
Swift
init(weatherMap: AWFWeatherMap)
Parameters
weatherMap
The weather map associated with the provider.
Return Value
An allocated provider.
-
Adds a new raster map layer at the top of the layer stack.
Declaration
Objective-C
- (void)addRasterLayer:(nonnull AWFRasterMapLayer *)layer;
Swift
func addRasterLayer(_ layer: AWFRasterMapLayer)
Parameters
layer
The raster layer to add.
-
Adds an array of raster map layers to the top of the layer stack.
Declaration
Objective-C
- (void)addRasterLayers:(nonnull NSArray<AWFRasterMapLayer *> *)layers;
Swift
func addRasterLayers(_ layers: [AWFRasterMapLayer])
Parameters
layers
The raster map layers to add
-
Adds a new raster map layer at the specified index.
If the specified index is greater than the total number of active layers, then the layer will be added to the top of the layer stack.
Declaration
Objective-C
- (void)addRasterLayer:(nonnull AWFRasterMapLayer *)layer atIndex:(NSInteger)index;
Swift
func addRasterLayer(_ layer: AWFRasterMapLayer, at index: Int)
Parameters
layer
The raster layer to add.
index
The index into which to insert the layer.
-
Adds a new raster map layer above the specified existing layer.
Declaration
Objective-C
- (void)addRasterLayer:(nonnull AWFRasterMapLayer *)layer aboveLayer:(nonnull AWFRasterMapLayer *)otherLayer;
Swift
func addRasterLayer(_ layer: AWFRasterMapLayer, above otherLayer: AWFRasterMapLayer)
Parameters
layer
The raster layer to add
otherLayer
The reference raster layer used to determine the position
-
Adds a new raster map layer below the specified existing layer.
Declaration
Objective-C
- (void)addRasterLayer:(nonnull AWFRasterMapLayer *)layer belowLayer:(nonnull AWFRasterMapLayer *)otherLayer;
Swift
func addRasterLayer(_ layer: AWFRasterMapLayer, below otherLayer: AWFRasterMapLayer)
Parameters
layer
The raster layer to add
otherLayer
The reference raster layer used to determine the position
-
Adds a new raster map layer below all existing layers in the collection.
Declaration
Objective-C
- (void)addRasterLayerBelowAllLayers:(nonnull AWFRasterMapLayer *)layer;
Swift
func addRasterLayer(belowAllLayers layer: AWFRasterMapLayer)
Parameters
layer
The raster layer to add
-
Changes the position of the specified layer by moving it above all other layers.
Declaration
Objective-C
- (void)bringRasterLayerToTop:(nonnull AWFRasterMapLayer *)layer;
Swift
func bringRasterLayer(toTop layer: AWFRasterMapLayer)
Parameters
layer
The raster layer to move
-
Changes the position of the specified layer by moving it below all other layers.
Declaration
Objective-C
- (void)pushRasterLayerToBottom:(nonnull AWFRasterMapLayer *)layer;
Swift
func pushRasterLayer(toBottom layer: AWFRasterMapLayer)
Parameters
layer
The raster layer to move
-
Changes the position of a layer by moving it to the specified index.
If the provided index is greater than the total number of layers currently in the collection, then the layer will just be moved to the top of the layer collection.
Declaration
Objective-C
- (void)moveRasterLayer:(nonnull AWFRasterMapLayer *)layer toIndex:(NSInteger)index;
Swift
func moveRasterLayer(_ layer: AWFRasterMapLayer, to index: Int)
Parameters
layer
The raster layer to move
index
The destination index
-
Changes the position of a layer by moving it above another reference layer.
If the reference layer does not exist in the collection, then this method will not change the current position of the specified layer.
Declaration
Objective-C
- (void)moveRasterLayer:(nonnull AWFRasterMapLayer *)layer aboveLayer:(nonnull AWFRasterMapLayer *)otherLayer;
Swift
func moveRasterLayer(_ layer: AWFRasterMapLayer, above otherLayer: AWFRasterMapLayer)
Parameters
layer
The raster layer to move
otherLayer
The reference raster layer used to determine the position
-
Changes th eposition of a layer by moving it below another reference layer.
If the reference layer does not exist in the collection, then this method will not change the current position of the specified layer.
Declaration
Objective-C
- (void)moveRasterLayer:(nonnull AWFRasterMapLayer *)layer belowLayer:(nonnull AWFRasterMapLayer *)otherLayer;
Swift
func moveRasterLayer(_ layer: AWFRasterMapLayer, below otherLayer: AWFRasterMapLayer)
Parameters
layer
The raster layer to move
otherLayer
The reference raster layer used to determine the position
-
Removes a raster map layer.
Declaration
Objective-C
- (void)removeRasterLayer:(nonnull AWFRasterMapLayer *)layer;
Swift
func removeRasterLayer(_ layer: AWFRasterMapLayer)
Parameters
layer
The raster layer to remove.
-
Removes an array of raster map layers.
Declaration
Objective-C
- (void)removeRasterLayers:(nonnull NSArray<AWFRasterMapLayer *> *)layers;
Swift
func removeRasterLayers(_ layers: [AWFRasterMapLayer])
Parameters
layers
The raster map layers to remove
-
Returns whether the provider contains the specified layer type.
Declaration
Objective-C
- (BOOL)containsLayerType:(nonnull AWFMapLayer)layerType;
Swift
func containsLayerType(_ layerType: AWFMapLayer) -> Bool
Parameters
layerType
The layer type to search for.
Return Value
YES
if the provider contains the layer type, otherwiseNO
. -
Returns whether the provider contains the specified raster layer.
Declaration
Objective-C
- (BOOL)containsRasterLayer:(nonnull AWFRasterMapLayer *)layer;
Swift
func containsRasterLayer(_ layer: AWFRasterMapLayer) -> Bool
Parameters
layer
The raster layer to search for
Return Value
YES
if the provider contains the raster layer, otherwiseNO
. -
Returns the raster map layer instance for the specified layer type.
If the provider does not contain the layer type, then
nil
will be returned.Declaration
Objective-C
- (nullable AWFRasterMapLayer *)rasterLayerForLayerType: (nonnull AWFMapLayer)layerType;
Swift
func rasterLayer(forLayerType layerType: AWFMapLayer) -> AWFRasterMapLayer?
Parameters
layerType
The layer type to return the raster map layer for.
Return Value
The raster map layer if it exists, otherwise
nil
. -
Adds a text map layer at the top of the layer stack.
Declaration
Objective-C
- (void)addTextLayer:(nonnull AWFRasterMapLayer *)layer;
Swift
func addTextLayer(_ layer: AWFRasterMapLayer)
Parameters
layer
The text layer to add.
-
Adds a text map layer for the specified raster layer.
Note
Not all raster layers support text layers. If the provided raster layer does not contain a text layer, this method will not add a new layer to the provider.
Declaration
Objective-C
- (void)addTextLayerForRasterLayer:(nonnull AWFRasterMapLayer *)layer;
Swift
func addTextLayer(forRasterLayer layer: AWFRasterMapLayer)
Parameters
layer
The layer to add a new text layer for.
-
Removes a text map layer.
Declaration
Objective-C
- (void)removeTextLayer:(nonnull AWFRasterMapLayer *)layer;
Swift
func removeTextLayer(_ layer: AWFRasterMapLayer)
Parameters
layer
The text map layer to remove.
-
Removes the text map layer associated with the specified raster map layer, if any.
Declaration
Objective-C
- (void)removeTextLayerForRasterLayer:(nonnull AWFRasterMapLayer *)layer;
Swift
func removeTextLayer(forRasterLayer layer: AWFRasterMapLayer)
Parameters
layer
The raster map layer to remove the text layer for.
-
Returns the text map layer instance for the specified layer type.
If the provider does not contain the layer type or a text map layer for the layer type, then
nil
will be returned.Declaration
Objective-C
- (nullable AWFRasterMapLayer *)textLayerForLayerType: (nonnull AWFMapLayer)layerType;
Swift
func textLayer(forLayerType layerType: AWFMapLayer) -> AWFRasterMapLayer?
Parameters
layerType
The layer type to return the text map layer for.
Return Value
The text map layer if it exists, otherwise
nil
. -
Updates the current date and time for all layers.
Declaration
Objective-C
- (void)updateLayersForDate:(nonnull NSDate *)date;
Swift
func updateLayers(for date: Date)
Parameters
date
The new date to use.
-
Tells the receiver that the animation intervals need to be updated on internal layer instances.
Declaration
Objective-C
- (void)setNeedsAnimationIntervalUpdate;
Swift
func setNeedsAnimationIntervalUpdate()