MSFAnimatedRasterTileLayer
Objective-C
@interface MSFAnimatedRasterTileLayer : MSFCustomRasterTileLayer
Swift
class MSFAnimatedRasterTileLayer : MSFCustomRasterTileLayer
A loop of time steps, e.g. a weather radar, each a tile of its own ({time} in an HTTPTileDataSource URL). A step and the next are drawn in one pass and mixed in the shader; see docs/features/animated-raster.md. Experimental.
-
Constructs an AnimatedRasterTileLayer object from a raster data source.
Declaration
Objective-C
- (id)initWithDataSource:(MSFTileDataSource *)dataSource;Swift
init!(dataSource: MSFTileDataSource!)Parameters
dataSourceThe raster data source, e.g. an HTTPTileDataSource with {time} in its URL, optionally behind a cache. The layer gives it the timestamps.
-
Returns the timestamps of the time steps.
Declaration
Objective-C
- (MSFStringVector *)getFrameTimestamps;Swift
func getFrameTimestamps() -> MSFStringVector!Return Value
The timestamps, oldest first.
-
Sets the time steps, oldest first: the strings {time} takes in the source’s URL, epoch seconds ideally.
Declaration
Objective-C
- (void)setFrameTimestamps:(MSFStringVector *)timestamps;Swift
func setFrameTimestamps(_ timestamps: MSFStringVector!)Parameters
timestampsThe timestamps, at most 255.
-
Returns the animation position.
Declaration
Objective-C
- (float)getAnimationPosition;Swift
func getAnimationPosition() -> FloatReturn Value
The position, in steps.
-
Sets the animation position: the whole part picks the step, the fraction is the mix towards the next.
Declaration
Objective-C
- (void)setAnimationPosition:(float)position;Swift
func setAnimationPosition(_ position: Float)Parameters
positionThe position, in steps; clamped to the first and last step.
-
Returns how many steps ahead of the shown one are fetched, for every visible tile.
Declaration
Objective-C
- (int)getPrefetchFrames;Swift
func getPrefetchFrames() -> Int32Return Value
The number of steps.
-
Sets how many steps ahead of the shown one are fetched before they are needed. The default is 2; a loop that must not stall on its first pass wants all of them, at the cost of memory and traffic.
Declaration
Objective-C
- (void)setPrefetchFrames:(int)frames;Swift
func setPrefetchFrames(_ frames: Int32)Parameters
framesThe number of steps, 0 to 255.
-
Returns the memory the prefetched steps may take.
Declaration
Objective-C
- (int)getPrefetchBudget;Swift
func getPrefetchBudget() -> Int32Return Value
The budget in megabytes.
-
Sets the memory the prefetched steps of the visible tiles may take: a view that needs more prefetches fewer steps, and the rest load from the data source when they come up. Lower it on a device short of memory. The default is 192.
Declaration
Objective-C
- (void)setPrefetchBudget:(int)megabytes;Swift
func setPrefetchBudget(_ megabytes: Int32)Parameters
megabytesThe budget in megabytes, 16 to 1024.
-
Undocumented
Declaration
Objective-C
-(void)dealloc;Swift
func dealloc()