TiledTimeSeriesDataProvider

A TimeSeriesDataProvider class that handles loading and configuring time series data for tile layers.

This class is designed to work with tile-based data sources and is optimized for loading time series data for individual tiles and tile intervals. It queues requests into a primary queue and a background queue collection so that the primary queue can load the first chunk of data, which is the minimal amount of data required to begin animating. Then the background queue can continue loading the rest of the data in smaller chunks to fill in the gaps while the animation is already playing.

Constructors

Link copied to clipboard
constructor(layer: TileLayer)

Properties

Link copied to clipboard
lateinit var _intervalTileCache: LRUCache<String, Tile<TileData>>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
lateinit var _visibleTileBounds: TileBounds
Link copied to clipboard
lateinit var _visibleTileCoords: List<TileCoord>
Link copied to clipboard
val eventFlow: MutableSharedFlow<Event>
Link copied to clipboard
Link copied to clipboard

Whether to interleave (stagger) requests for multiple time intervals.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val layer: TileLayer
Link copied to clipboard

The maximum number of time intervals to request data for in a single request. Requests will be split into multiple requests if the number of intervals needed exceeds this value.

Link copied to clipboard
Link copied to clipboard
open val TAG: String

Functions

Link copied to clipboard

Returns a map of time intervals to a boolean value indicating whether the data for the interval is available as determined by the data provider.

Link copied to clipboard
open override fun dispose()
Link copied to clipboard
open override fun invalidate()

Resets the state of the data provider, marking it as dirty and clearing any loaded data or existing requests.

Link copied to clipboard
fun jTest()
Link copied to clipboard
open suspend override fun loadData(intervals: MutableList<TimeInterval>)

Loads the data for the specified time intervals.

Link copied to clipboard
fun loadDataOld(intervals: Array<TimeInterval>)
Link copied to clipboard
fun off(event: String, listener: (Any) -> Unit)
Link copied to clipboard
fun on(event: String, listener: (Any) -> Unit)
Link copied to clipboard
fun onLoadStart(intervals: Array<Date>)

Called when the data provider is about to start loading data for a set of time intervals.

Link copied to clipboard

Marks the data provider as needing an update, which will trigger a new data request on the next update cycle.

Link copied to clipboard
fun <T> MutableList<T>.shift(): T?
Link copied to clipboard

Sorts an array of tile interval chunks so that we load those in the middle of each chunk first.

Link copied to clipboard
fun trigger(event: Event)
fun trigger(event: String)
fun trigger(event: Event, valueMap: Map<String, Tile<TileData>>)
fun trigger(event: TimeSeriesEvent, dates: Array<Date>)

fun trigger(event: Event, intervalArray: MutableList<TimeInterval>, placeHolder: Int)

Renamed from trigger in js since type-erasure caused signature clash

Link copied to clipboard
fun triggerAny(event: String, data: Any)
Link copied to clipboard
fun triggerDates(event: String, dates: Map<String, Date>)
Link copied to clipboard
fun triggerDatesArray(event: String, dates: Array<Date>)
Link copied to clipboard
fun triggerDatesList(event: String, dates: List<Date>)