AWFTileSource
Objective-C
@interface AWFTileSource
: AWFMapContentSource <AWFTileDataSource, AWFTimeDependent,
AWFAnimatableOverlay, AWFImageAnimationDataSource>
Swift
class AWFTileSource : AWFMapContentSource, AWFTileDataSource, AWFTimeDependent, AWFAnimatableOverlay, AWFImageAnimationDataSource
An AWFTileSource
object is a map content source that represents and manages a tile resources on a map.
-
The template for generating tile URLs (read-only).
Declaration
Objective-C
@property (nonatomic, readonly) NSString *_Nonnull URLTemplate;
Swift
var urlTemplate: String { get }
-
The amount of transparency to apply to the overlay.
Declaration
Objective-C
@property (nonatomic) CGFloat alpha;
Swift
var alpha: CGFloat { get set }
-
Declaration
Objective-C
@property (nonatomic, readonly) AWFOverlayMetadata *_Nonnull metadata;
Swift
var metadata: AWFOverlayMetadata { get }
-
Current date of the data being used in the content source.
Declaration
Objective-C
@property (nonatomic, strong, nullable) NSDate *date;
Swift
var date: Date? { get set }
-
The time offset string relative to now being used with the content source.
Declaration
Objective-C
@property (nonatomic, strong, nullable) NSString *offset;
Swift
var offset: String? { get set }
-
A Boolean value that determine whether the data being maintained by this content source represents data in the future. Default value is
NO
.Declaration
Objective-C
@property (nonatomic) BOOL isFutureLayer;
Swift
var isFutureLayer: Bool { get set }
-
A Boolean value that determines whether the layer should always remain visible regardless of its past/future state. Default value is
NO
.Declaration
Objective-C
@property (nonatomic) BOOL shouldAlwaysShow;
Swift
var shouldAlwaysShow: Bool { get set }
-
The animation object associated with the content source.
Declaration
Objective-C
@property (nonatomic, strong) AWFImageAnimation *_Nonnull animation;
Swift
var animation: AWFImageAnimation { get set }
-
The maximum number of intervals to show during an animation.
Declaration
Objective-C
@property (nonatomic) NSInteger maximumIntervalsForAnimation;
Swift
var maximumIntervalsForAnimation: Int { get set }
-
Returns whether higher-quality raster overlay imagery should be requested for retina devices. Note that enabling this will result in sightly 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 animation imagery should be requested for retina devices. Note that enabling this will result in sightly longer response times for raster tiles and animation data requests. The default is
NO
.Declaration
Objective-C
@property (nonatomic) BOOL shouldUseRetinaImageryForAnimation;
Swift
var shouldUseRetinaImageryForAnimation: Bool { get set }
-
Initializes and returns a tile overlay object using the specified tile-access template.
Declaration
Objective-C
- (nonnull id)initWithURLTemplate:(nonnull NSString *)URLTemplate;
Swift
init(urlTemplate URLTemplate: String)
Parameters
URLTemplate
A string that can be used to build a URL to access tile images. The string specified can use the placeholder values
{x}
,{y}
,{z}
,{scale}
and{time}
as stand-ins for the x and y tile indexes, zoom level, resolution of the tile image and timestamp.Return Value
An initialized tile overlay object.
-
Returns the URL for the specified tile path structure.
Declaration
Objective-C
- (nonnull NSURL *)URLForTilePath:(nonnull AWFTileOverlayPath *)path;
Swift
func url(forTilePath path: AWFTileOverlayPath) -> URL
Parameters
path
The path structure that identifies the specific tile.
Return Value
The URL to use to retrive the tile.
-
Returns the URL for the specified tile path structure, optionally scaled for the current device screen scale.
Declaration
Objective-C
- (nonnull NSURL *)URLForTilePath:(nonnull AWFTileOverlayPath *)path scaledForScreen:(BOOL)scaledForScreen;
Swift
func url(forTilePath path: AWFTileOverlayPath, scaledForScreen: Bool) -> URL
Parameters
path
The path structure that identifies the specific tile
scaledForScreen
Whether the url should be adjusted to account for the device screen scale
Return Value
The URL to use to retrive the tile
-
Returns the tile URL for the region defined by the specified coordinate bounds, image size and time string for the data relative to the current time.
Declaration
Objective-C
- (nonnull NSURL *)URLForBounds:(nonnull AWFMapCoordinateBounds *)bounds size:(CGSize)size timestamp:(nonnull NSString *)timestamp;
Swift
func url(for bounds: AWFMapCoordinateBounds, size: CGSize, timestamp: String) -> URL
Parameters
bounds
The region’s coordinate bounds.
size
The image size.
timestamp
The time string to use for the data.
-
Returns the tile URL for the region defined by the specified coordinate bounds, image size and time string for the data relative to the current time. The URL can optionally be adjusted to account for the device screen scale.
Declaration
Objective-C
- (nonnull NSURL *)URLForBounds:(nonnull AWFMapCoordinateBounds *)bounds size:(CGSize)size timestamp:(nonnull NSString *)timestamp scaledForScreen:(BOOL)scaledForScreen;
Swift
func url(for bounds: AWFMapCoordinateBounds, size: CGSize, timestamp: String, scaledForScreen: Bool) -> URL
Parameters
bounds
The region’s coordinate bounds.
size
The image size.
timestamp
The time string to use for the data.
scaledForScreen
Whether the url should be adjusted to account for the device screen scale
-
Cancels any active requests removes any cached data.
Declaration
Objective-C
- (void)reset;
Swift
func reset()