@xweather/mapsgl 1.8.3-beta.1 → 1.8.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/mapsgl.css CHANGED
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  *
3
- * @xweather/mapsgl - 1.8.3-beta.1
4
- * (c) 2025 Vaisala Xweather
3
+ * @xweather/mapsgl - 1.8.4
4
+ * (c) 2026 Vaisala Xweather
5
5
  * License: BSD
6
6
  * https://www.xweather.com
7
7
  *
package/dist/mapsgl.d.ts CHANGED
@@ -1589,6 +1589,13 @@ export declare interface BarLegendOptions {
1589
1589
  * Whether the edges of the color scale bar should be rounded.
1590
1590
  */
1591
1591
  rounded: boolean;
1592
+ /**
1593
+ * Whether the color scale bar should have equal widths for each color stop. Default is `false`.
1594
+ *
1595
+ * When `false`, each cell will have a variable width that is proportional to its value and the next cell's value
1596
+ * relative to the value range of the bar.
1597
+ */
1598
+ equalWidth: boolean;
1592
1599
  /**
1593
1600
  * Defines the base measurement type and units for the legend which corresponds to the color scale's value range.
1594
1601
  */
@@ -1648,6 +1655,11 @@ export declare interface BarLegendOptions {
1648
1655
  * The placement of the labels relative to the color scale bar.
1649
1656
  */
1650
1657
  placement: 'top' | 'middle' | 'bottom';
1658
+ /**
1659
+ * Whether the labels should be centered on their corresponding color scale bar cell. Default is `false`,
1660
+ * which means the labels will be aligned to the left (beginning) of the corresponding color scale bar cell.
1661
+ */
1662
+ centered: boolean;
1651
1663
  /**
1652
1664
  * The marks to display at the label positions along the color scale bar.
1653
1665
  */
@@ -1657,6 +1669,10 @@ export declare interface BarLegendOptions {
1657
1669
  */
1658
1670
  margin: number | [number, number];
1659
1671
  normalized: boolean;
1672
+ /**
1673
+ * Whether the labels should be allowed to overlap each other. Default is `false`.
1674
+ */
1675
+ allowOverlap: boolean;
1660
1676
  }>;
1661
1677
  }
1662
1678
 
@@ -2065,20 +2081,243 @@ declare const dbzToMMRate: (dbz: number, perSecond?: boolean) => number;
2065
2081
 
2066
2082
  declare const defaultUnits: Record<Exclude<UnitSystem, 'custom'>, MapUnits>;
2067
2083
 
2084
+ export declare class Deferred<T> {
2085
+ promise: Promise<T>;
2086
+ resolve: (value: T | PromiseLike<T>) => void;
2087
+ reject: (reason?: any) => void;
2088
+ constructor();
2089
+ }
2090
+
2068
2091
  declare const degToDir: (d: number) => string;
2069
2092
 
2070
2093
  export declare interface Disposable {
2071
2094
  dispose(): void;
2072
2095
  }
2073
2096
 
2097
+ /**
2098
+ * Manages download tasks with queuing, concurrency control, retry logic, and caching.
2099
+ * Supports per-host concurrency limits and priority-based task ordering.
2100
+ *
2101
+ * @template Task - The download task type that extends DownloadTask
2102
+ */
2103
+ export declare class DownloadManager<Task extends DownloadTask<any>> extends EventDispatcher {
2104
+
2105
+ /**
2106
+ * Gets the progress tracker for download operations.
2107
+ * @returns The Progress instance tracking download statistics.
2108
+ */
2109
+ get progress(): Progress;
2110
+ /**
2111
+ * Creates a new DownloadManager instance.
2112
+ * @param options - Configuration options for the download manager.
2113
+ * @param options.fetcher - Function that performs the fetch operation for tasks.
2114
+ * @param options.taskRunner - Optional custom task runner function. Defaults to runDownloadTask.
2115
+ * @param options.maxRetries - Maximum number of retry attempts for failed tasks.
2116
+ * @param options.defaultConcurrency - Default maximum concurrent downloads. Defaults to 16.
2117
+ * @param options.perHostConcurrency - Per-host concurrency limits, keyed by host name.
2118
+ */
2119
+ constructor(options?: Partial<DownloadManagerOptions<TaskData<Task>>>);
2120
+ /**
2121
+ * Checks if a task result exists in the cache.
2122
+ * @param key - The unique identifier for the task.
2123
+ * @returns True if the task result is cached, false otherwise.
2124
+ */
2125
+ has(key: string): boolean;
2126
+ /**
2127
+ * Retrieves a cached task result.
2128
+ * @param key - The unique identifier for the task.
2129
+ * @returns The cached task data, or undefined if not found.
2130
+ */
2131
+ get(key: string): TaskData<Task> | undefined;
2132
+ /**
2133
+ * Sets the tile fetcher function to use for requests.
2134
+ * The fetcher function should return a Promise that resolves with a Response object.
2135
+ * @param fetcher -
2136
+ */
2137
+ setFetcher(fetcher: Fetcher<Task>): void;
2138
+ /**
2139
+ * Sets the task runner function used to execute download tasks.
2140
+ * @param runner - The task runner function that handles task execution with retry logic.
2141
+ */
2142
+ setTaskRunner(runner: TaskRunner<Task>): void;
2143
+ /**
2144
+ * Sets the task transformer function that modifies tasks before execution.
2145
+ * @param transformer - Function that receives a task and returns a (possibly modified) task.
2146
+ */
2147
+ setTaskTransformer(transformer: (task: Task) => Task): void;
2148
+ /**
2149
+ * Finds all tasks that match the provided predicate function.
2150
+ * @param predicate - A callback that receives a task and returns true if it should be included.
2151
+ */
2152
+ find(predicate: (task: Task) => boolean): Task[];
2153
+ /**
2154
+ * Finds the first task that matches the provided predicate function.
2155
+ * @param predicate - A callback that receives a task and returns true for a match.
2156
+ */
2157
+ findOne(predicate: (task: Task) => boolean): Task | undefined;
2158
+ /**
2159
+ * Returns true if any task matches the provided predicate function.
2160
+ * @param predicate - A callback that receives a task and returns true for a match.
2161
+ */
2162
+ hasTask(predicate: (task: Task) => boolean): boolean;
2163
+ /**
2164
+ * Adds a task to the download queue and optionally starts processing.
2165
+ * Tasks are organized by host for per-host concurrency control and sorted by priority.
2166
+ * @param task - The download task to enqueue.
2167
+ * @param start - If true, immediately starts processing the queue. Defaults to true.
2168
+ */
2169
+ enqueue(task: Task, start?: boolean): void;
2170
+ /**
2171
+ * Aborts a specific download task.
2172
+ * If the task is in-flight, the request is aborted. If pending, it's removed from the queue.
2173
+ * Updates progress tracking accordingly.
2174
+ * @param task - The task to abort.
2175
+ */
2176
+ abort(task: Task): void;
2177
+ /**
2178
+ * Aborts all tasks that match the provided predicate function.
2179
+ * @param predicate - A callback that receives a task and returns true if it should be aborted.
2180
+ */
2181
+ abortWhere(predicate: (task: Task) => boolean): void;
2182
+ abortAll(): void;
2183
+
2184
+ }
2185
+
2186
+ /**
2187
+ * Configuration options for creating a DownloadManager instance.
2188
+ * @template Task - The download task type that extends DownloadTask
2189
+ */
2190
+ export declare interface DownloadManagerOptions<Task extends DownloadTask<any>> {
2191
+ /** Function that performs the fetch operation for tasks. */
2192
+ fetcher: Fetcher<Task>;
2193
+ /** Optional custom task runner function. Defaults to runDownloadTask if not provided. */
2194
+ taskRunner?: TaskRunner<Task>;
2195
+ /** Maximum number of retry attempts for failed tasks. */
2196
+ maxRetries?: number;
2197
+ /** Default maximum concurrent downloads across all hosts. Defaults to 16 if not provided. */
2198
+ defaultConcurrency?: number;
2199
+ /** Per-host concurrency limits, keyed by host name. */
2200
+ perHostConcurrency?: Record<string, number>;
2201
+ }
2202
+
2203
+ /**
2204
+ * Priority levels for download tasks. Lower numbers indicate higher priority.
2205
+ * Tasks with lower priority values are processed before tasks with higher values.
2206
+ */
2074
2207
  declare const DownloadPriority: {
2208
+ /** Critical priority (0) - highest priority, processed first. */
2075
2209
  readonly critical: 0;
2210
+ /** High priority (1) - processed after critical tasks. */
2076
2211
  readonly high: 1;
2212
+ /** Warm priority (2) - lowest priority, processed last. */
2077
2213
  readonly warm: 2;
2078
2214
  };
2079
2215
 
2216
+ /**
2217
+ * Type representing a download priority value.
2218
+ */
2080
2219
  export declare type DownloadPriority = ObjectValue<typeof DownloadPriority>;
2081
2220
 
2221
+ /**
2222
+ * Status values for download tasks throughout their lifecycle.
2223
+ */
2224
+ declare const DownloadStatus: {
2225
+ /** Task is queued and waiting to be processed. */
2226
+ readonly pending: "pending";
2227
+ /** Task is currently being executed (fetch in progress). */
2228
+ readonly inFlight: "in-flight";
2229
+ /** Task completed successfully. */
2230
+ readonly success: "success";
2231
+ /** Task failed after all retry attempts. */
2232
+ readonly failed: "failed";
2233
+ /** Task was cancelled before completion. */
2234
+ readonly cancelled: "cancelled";
2235
+ };
2236
+
2237
+ /**
2238
+ * Type representing a download status value.
2239
+ */
2240
+ export declare type DownloadStatus = ObjectValue<typeof DownloadStatus>;
2241
+
2242
+ /**
2243
+ * Represents a single download task with its configuration, state, and result handling.
2244
+ * @template ResultType - The type of data that will be returned when the task completes.
2245
+ */
2246
+ export declare class DownloadTask<ResultType> {
2247
+ /** Unique identifier for this task. */
2248
+ readonly key: string;
2249
+ /** URL to fetch data from. */
2250
+ readonly url: string;
2251
+ /** Request options for the download task. */
2252
+ readonly options: Partial<DownloadTaskRequestOptions>;
2253
+ /** AbortController for cancelling the request. */
2254
+ readonly controller: AbortController;
2255
+ /** Expected result type for the response ('blob', 'json', 'arrayBuffer', or 'text'). */
2256
+ resultType: 'blob' | 'json' | 'arrayBuffer' | 'text';
2257
+ /** Priority level for this task. Lower numbers indicate higher priority. */
2258
+ priority: DownloadPriority;
2259
+ /** Current status of the download task. */
2260
+ status: DownloadStatus;
2261
+ /** Number of retry attempts made for this task. */
2262
+ retries: number;
2263
+ /** The Response object from the fetch operation, if available. */
2264
+ response: Response | undefined;
2265
+ /** Optional custom parser function to transform the Response into ResultType. */
2266
+ parse: ((response: Response) => Promise<ResultType>) | undefined;
2267
+ /** Deferred promise that resolves when the task completes. Set externally by the download scheduler. */
2268
+ readonly deferred: Deferred<ResultType>;
2269
+ /**
2270
+ * Gets the promise that resolves when the task completes.
2271
+ * @returns A Promise that resolves with the task result.
2272
+ */
2273
+ get promise(): Promise<ResultType>;
2274
+ /** Optional host name for per-host concurrency control. */
2275
+ host?: string;
2276
+ /**
2277
+ * Creates a new DownloadTask instance.
2278
+ * @param key - Unique identifier for the task.
2279
+ * @param url - URL to fetch data from.
2280
+ * @param options - Request options for the download task.
2281
+ * @param priority - Priority level for the task. Defaults to DownloadPriority.warm if not provided.
2282
+ */
2283
+ constructor(key: string, url: string, options: Partial<DownloadTaskRequestOptions>, priority?: DownloadPriority);
2284
+ getResponseResult(response: Response | Record<string, any>): Promise<any>;
2285
+ }
2286
+
2287
+ /**
2288
+ * Options for configuring a download task request.
2289
+ */
2290
+ export declare type DownloadTaskRequestOptions = {
2291
+ /**
2292
+ * The HTTP method to use for the request.
2293
+ */
2294
+ method: 'GET' | 'POST';
2295
+ /**
2296
+ * The authenticator to use for the request, if any.
2297
+ */
2298
+ authenticator?: AnyAuthenticator;
2299
+ /**
2300
+ * The request body to send, if any.
2301
+ */
2302
+ body?: any;
2303
+ /**
2304
+ * The request headers to send, if any.
2305
+ */
2306
+ headers?: Record<string, string>;
2307
+ /**
2308
+ * The request parameters to send, if any.
2309
+ */
2310
+ params: Record<string, any>;
2311
+ /**
2312
+ * The {@link AbortSignal} to use for the request.
2313
+ */
2314
+ signal: AbortSignal;
2315
+ /**
2316
+ * The download priority of the request.
2317
+ */
2318
+ priority: DownloadPriority;
2319
+ };
2320
+
2082
2321
  /**
2083
2322
  * Set of common easing functions.
2084
2323
  */
@@ -2335,6 +2574,14 @@ export declare type FeatureQueryResult = {
2335
2574
  nodata: boolean;
2336
2575
  };
2337
2576
 
2577
+ /**
2578
+ * Function type that performs the actual fetch operation for a download task.
2579
+ * @template Task - The download task type that extends DownloadTask
2580
+ * @param task - The download task to fetch data for.
2581
+ * @returns A Promise that resolves with a Response object.
2582
+ */
2583
+ export declare type Fetcher<Task extends DownloadTask<any>> = (task: Task) => Promise<Response>;
2584
+
2338
2585
  export declare type FillPattern = string | RemoteSymbolImage;
2339
2586
 
2340
2587
  /**
@@ -2839,6 +3086,7 @@ export declare type LabelItem = {
2839
3086
  value: number;
2840
3087
  label: string;
2841
3088
  position?: number;
3089
+ span?: number;
2842
3090
  };
2843
3091
 
2844
3092
  /**
@@ -2960,8 +3208,43 @@ export declare type LayerGroups = {
2960
3208
  * Layer mask configuration.
2961
3209
  */
2962
3210
  export declare type LayerMask = {
2963
- layer: WebGLLayer;
3211
+ layers: Array<WebGLLayer>;
2964
3212
  inverted?: boolean;
3213
+ mode?: 'all' | 'any';
3214
+ };
3215
+
3216
+ export declare type LayerMaskConfiguration = Partial<LayerMaskSpecification> & {
3217
+ /**
3218
+ * The type of mask to apply to the layer. This is an alternative to using the `layers` property. If both
3219
+ * are provided, the `layers` property will take precedence.
3220
+ */
3221
+ type?: 'water' | 'land';
3222
+ };
3223
+
3224
+ /**
3225
+ * Layer mask specification.
3226
+ */
3227
+ export declare type LayerMaskSpecification = {
3228
+ /**
3229
+ * An array of layer identifiers and optional overrides to use for masking this layer's output. If the `id` is a
3230
+ * weather layer identifier, use the `overrides` property to provide additional options for the layer and the mask
3231
+ * layer will be created automatically. Use this in combination with the `mode` property to control how the masks
3232
+ * are applied to the layer's final output.
3233
+ */
3234
+ layers: Array<{
3235
+ id: string;
3236
+ overrides?: Partial<WeatherLayerOptions>;
3237
+ }>;
3238
+ /**
3239
+ * Whether to invert the mask, meaning the layer will be visible outside of the mask area.
3240
+ */
3241
+ invert?: boolean;
3242
+ /**
3243
+ * The mode to use applying the masks, either 'all' (default) or 'any'.
3244
+ * - 'all': The layer will be visible only if all the masks are visible (intersection of all masks).
3245
+ * - 'any': The layer will be visible if any of the masks are visible (union of all masks).
3246
+ */
3247
+ mode?: 'all' | 'any';
2965
3248
  };
2966
3249
 
2967
3250
  export declare type LayerMetadata = {
@@ -3038,6 +3321,10 @@ export declare interface LayerRenderer {
3038
3321
  * @param layer - The layer that was resized.
3039
3322
  */
3040
3323
  onResize(layer: WebGLLayer): void;
3324
+ /**
3325
+ * Called when the layer's mask state changes.
3326
+ */
3327
+ onMaskStateChange(): void;
3041
3328
  /**
3042
3329
  * Flags the renderer as dirty so that it is updated during the next render frame.
3043
3330
  */
@@ -3100,10 +3387,10 @@ export declare interface LayerSpecification {
3100
3387
  */
3101
3388
  queryType?: ObjectValueFromKeys<typeof LayerType, 'text' | 'symbol' | 'circle'>;
3102
3389
  /**
3103
- * Layer identifier of the layer to use for masking this layer's output as a string, or an object containing the
3104
- * mask layer's id and an optional flag to invert the mask. The layer must have already been added to the map.
3390
+ * Layer mask configuration to use when rendering the the layer, if any. The layer(s) used for masking must have
3391
+ * already been added to the map.
3105
3392
  */
3106
- mask?: string | MaskLayerSpecification;
3393
+ mask?: LayerMaskSpecification;
3107
3394
  /**
3108
3395
  * Filter expression to use for filtering features from the data source. This is only used for vector tile data
3109
3396
  * sources whose tiles are in the Mapbox Vector Tile (MVT) format.
@@ -3927,8 +4214,10 @@ get needsViewportUpdate(): boolean;
3927
4214
  */
3928
4215
  setRefreshInterval(minutes: number, advanceToNow?: boolean): void;
3929
4216
  private _triggerPreloadAnimation;
3930
- private debouncedPreloadAnimationData;
3931
4217
  preloadAnimationData(): Promise<void>;
4218
+ private debouncedPreloadAnimationData;
4219
+ private setNeedsPreloadAnimationData;
4220
+ private preloadAnimationDataIfNeeded;
3932
4221
  triggerRedraw(): void;
3933
4222
  protected getTransform(map: MapType, projection?: ProjectionType): MapTransform;
3934
4223
  getProjection(): ProjectionType;
@@ -4361,18 +4650,6 @@ export declare interface MapViewState {
4361
4650
  projectionMatrix?: Matrix4;
4362
4651
  }
4363
4652
 
4364
- export declare type MaskConfiguration = {
4365
- id?: string;
4366
- layerId: string;
4367
- invert?: boolean;
4368
- overrides?: Record<string, any>;
4369
- };
4370
-
4371
- export declare type MaskLayerSpecification = {
4372
- id: string;
4373
- invert?: boolean;
4374
- };
4375
-
4376
4653
  declare const mbToHg: (mb: number) => number;
4377
4654
 
4378
4655
  declare const mbToPa: (mb: number) => number;
@@ -4895,8 +5172,18 @@ export declare type QueryLayerConfiguration = {
4895
5172
  overrides?: Record<string, any>;
4896
5173
  };
4897
5174
 
5175
+ /**
5176
+ * Query layer specification.
5177
+ */
4898
5178
  export declare type QueryLayerSpecification = {
5179
+ /**
5180
+ * Layer identifier of the layer to use for querying/sampling data from.
5181
+ */
4899
5182
  id: string;
5183
+ /**
5184
+ * Whether to hide the query layer. Default value is `false` which means the query layer will be visible. If you
5185
+ * set this to `true`, then the query layer will be hidden while still being available for querying/sampling data.
5186
+ */
4900
5187
  hidden?: boolean;
4901
5188
  };
4902
5189
 
@@ -5114,6 +5401,7 @@ export declare class SourceMetadata extends EventDispatcher {
5114
5401
  private _transformer;
5115
5402
  private _hasLoaded;
5116
5403
  private _lastRequestOptions;
5404
+
5117
5405
  /**
5118
5406
  * Creates an instance of SourceMetadata
5119
5407
  * @param url - URL to request metadata from if needed.
@@ -5161,6 +5449,7 @@ export declare class SourceMetadata extends EventDispatcher {
5161
5449
  * @readonly
5162
5450
  */
5163
5451
  get hasValidTimes(): boolean;
5452
+ get validTimeRange(): TimeRange;
5164
5453
  getAllValidTimes(): Array<Date>;
5165
5454
  /**
5166
5455
  * Returns an array of valid times for the source. If the source has multiple datasets, the valid times
@@ -5742,6 +6031,39 @@ export declare interface SymbolStyleSpec {
5742
6031
  factor: StyleValue<number>;
5743
6032
  }
5744
6033
 
6034
+ /**
6035
+ * Extracts the result type from a DownloadTask type.
6036
+ * @template Task - The download task type that extends DownloadTask
6037
+ * @example
6038
+ * type MyTask = DownloadTask<string>;
6039
+ * type MyResult = TaskData<MyTask>; // MyResult is 'string'
6040
+ */
6041
+ export declare type TaskData<Task extends DownloadTask<any>> = Task extends DownloadTask<infer T> ? T : never;
6042
+
6043
+ /**
6044
+ * Function type that executes a download task with retry logic and error handling.
6045
+ * @template Task - The download task type that extends DownloadTask
6046
+ * @param task - The download task to execute.
6047
+ * @param config - Configuration for the task runner.
6048
+ * @returns A Promise that resolves when the task completes (successfully or after all retries fail).
6049
+ */
6050
+ export declare type TaskRunner<Task extends DownloadTask<any>> = (task: Task, config: TaskRunnerConfig<Task>) => Promise<Response>;
6051
+
6052
+ /**
6053
+ * Configuration object for task runner execution.
6054
+ * @template Task - The download task type that extends DownloadTask
6055
+ */
6056
+ export declare interface TaskRunnerConfig<Task extends DownloadTask<any>> {
6057
+ /** Function that performs the fetch operation. */
6058
+ fetcher: Fetcher<Task>;
6059
+ /** Maximum number of retry attempts for failed tasks. */
6060
+ maxRetries: number;
6061
+ /** HTTP status code range [min, max] that triggers retry attempts. */
6062
+ retryStatusRange: [number, number];
6063
+ /** Optional function to transform tasks before execution. */
6064
+ taskTransformer?: (task: Task) => Task;
6065
+ }
6066
+
5745
6067
  /**
5746
6068
  * Text style properties control how text gets rendered on a map from vector features. Use these properties on
5747
6069
  * conjunction with `symbol` to define the style for a text layer.
@@ -6052,14 +6374,14 @@ export declare type TileCoordinateBounds = {
6052
6374
  se: TileCoordinate;
6053
6375
  };
6054
6376
 
6055
- /**
6056
- * A function that fetches a tile from the given URL and options.
6057
- * @param coord - The tile coordinate to load.
6058
- * @param url - The tile URL to load.
6059
- * @param options - The tile request options.
6060
- * @returns A promise that resolves with the response.
6061
- */
6062
- export declare type TileFetcher = (coord: TileCoord, url: string, options: Partial<TileRequestOptions>) => Promise<Response>;
6377
+ export declare class TileDownloadTask extends DownloadTask<{
6378
+ data: Blob;
6379
+ headers: Headers;
6380
+ }> {
6381
+ readonly coord: TileCoord;
6382
+ readonly intervals: Array<number>;
6383
+ constructor(key: string, coord: TileCoord, intervals: Array<number>, url: string, options: Partial<TileRequestOptions>, priority?: DownloadPriority);
6384
+ }
6063
6385
 
6064
6386
  export declare interface TileInfo {
6065
6387
  x: number;
@@ -6068,7 +6390,7 @@ export declare interface TileInfo {
6068
6390
  }
6069
6391
 
6070
6392
  export declare type TileQuadrant = 'tl' | 'tc' | 'tr' | 'ml' | 'mc' | 'mr' | 'bl' | 'bc' | 'br';
6071
-
6393
+
6072
6394
  /**
6073
6395
  * Options for a tile request.
6074
6396
  */
@@ -6115,16 +6437,6 @@ export declare type TileRequestOptions = {
6115
6437
  intervals: Array<Date>;
6116
6438
  };
6117
6439
 
6118
- /**
6119
- * A response from a tile request.
6120
- * @property data The response data.
6121
- * @property headers The response headers.
6122
- */
6123
- export declare type TileResponse = {
6124
- data: any;
6125
- headers: any;
6126
- };
6127
-
6128
6440
  /**
6129
6441
  * `TileSource` is an abstract class that provides the primary implementation of a tile-based data source object that
6130
6442
  * loads tiles from a remote source. This class is not intended to be used directly, but rather extended by a concrete
@@ -6168,20 +6480,14 @@ declare abstract class TileSource<Data = any, Source extends TileSourceSpecifica
6168
6480
  width: number;
6169
6481
  height: number;
6170
6482
  };
6171
-
6172
- /**
6483
+
6484
+ /**
6173
6485
  * Returns the coordinate bounds for the source if provided by the source configuration.
6174
6486
  * When defined, data and/or tiles will not be requested outside of these bounds. This is useful for limiting the
6175
6487
  * amount of data requested from a source when the data is only needed for a specific region.
6176
6488
  * @readonly
6177
6489
  */
6178
6490
  get bounds(): CoordinateBounds;
6179
- get isReady(): boolean;
6180
- /**
6181
- * Returns whether or not the source is currently loading tiles.
6182
- * @readonly
6183
- */
6184
- get isLoading(): boolean;
6185
6491
 
6186
6492
  constructor(id: string, spec: Partial<Source>);
6187
6493
  /**
@@ -6249,7 +6555,10 @@ constructor(id: string, spec: Partial<Source>);
6249
6555
  * @returns The tile instance.
6250
6556
  */
6251
6557
  protected getOrCreateTile(coord: TileCoord): Tile<Data>;
6252
- protected loadTile(tile: Tile<Data>, options?: Partial<TileRequestOptions>): Promise<Data>;
6558
+ protected loadTile(tile: Tile<Data>, options?: Partial<TileRequestOptions>): Promise<{
6559
+ data: Blob;
6560
+ headers: Headers;
6561
+ }>;
6253
6562
  getMetadata(options?: Partial<UrlRequestOptions>): Promise<unknown>;
6254
6563
  removeConsumer(consumer: DataSourceConsumer): void;
6255
6564
  /**
@@ -6263,6 +6572,11 @@ constructor(id: string, spec: Partial<Source>);
6263
6572
  */
6264
6573
  cancelAllRequests(): void;
6265
6574
 
6575
+ protected onLoadStart(): void;
6576
+ protected onLoadProgress(e: any): void;
6577
+ protected onLoadComplete(): void;
6578
+ protected onTileLoaded(tile: Tile<Data>, data: Data): void;
6579
+ protected onTileError(tile: Tile<Data>, err: any): void;
6266
6580
  dispose(): void;
6267
6581
  }
6268
6582
 
@@ -6333,16 +6647,33 @@ export declare class TimeAnimation extends Animation {
6333
6647
  */
6334
6648
  get startDate(): Date;
6335
6649
  set startDate(value: Date);
6650
+ /**
6651
+ * The offset between the start date and the animation's reference date in milliseconds. The reference date is the
6652
+ * current date at the time the animation was instantiated or the last time the start/end date was set.
6653
+ * @readonly
6654
+ */
6655
+ get startOffset(): number;
6336
6656
  /**
6337
6657
  * The end date of the animation.
6338
6658
  */
6339
6659
  get endDate(): Date;
6340
6660
  set endDate(value: Date);
6661
+ /**
6662
+ * The offset between the end date and the animation's reference date in milliseconds. The reference date is the
6663
+ * current date at the time the animation was instantiated or the last time the start/end date was set.
6664
+ * @readonly
6665
+ */
6666
+ get endOffset(): number;
6341
6667
  /**
6342
6668
  * The current date of the animation based on the animation's current position.
6343
6669
  * @readonly
6344
6670
  */
6345
6671
  get currentDate(): Date;
6672
+ /**
6673
+ * The reference date of the animation. The reference date is the current date at the time the animation was
6674
+ * instantiated or the last time the start/end date was set.
6675
+ * @readonly
6676
+ */
6346
6677
  get referenceDate(): Date;
6347
6678
  /**
6348
6679
  * Whether the animation includes time in the past.
@@ -6375,7 +6706,9 @@ export declare class TimeAnimation extends Animation {
6375
6706
  */
6376
6707
  get info(): TimeAnimationInfo;
6377
6708
  private _startDate;
6709
+ private _startOffset;
6378
6710
  private _endDate;
6711
+ private _endOffset;
6379
6712
  private _now;
6380
6713
  constructor({ start, end, alwaysStopAtStart, ...animationOpts }: Partial<TimeAnimationOptions>);
6381
6714
  /**
@@ -6428,6 +6761,7 @@ export declare class TimeAnimation extends Animation {
6428
6761
  clampDateRange(min: Date, max: Date): void;
6429
6762
  protected eventPayload(): Record<string, any>;
6430
6763
  protected advanceToStopPosition(): void;
6764
+ private _debouncedRangeChangeEvent;
6431
6765
  }
6432
6766
 
6433
6767
  export declare type TimeAnimationInfo = {
@@ -6979,7 +7313,7 @@ export declare interface WeatherLayerConfiguration extends Identifiable {
6979
7313
  /**
6980
7314
  * The layer mask configuration to use when rendering the the layer, if any.
6981
7315
  */
6982
- mask?: MaskConfiguration;
7316
+ mask?: LayerMaskConfiguration;
6983
7317
  /**
6984
7318
  * The operation to perform on the data within the time series. Defaults to `none`.
6985
7319
  */
@@ -7117,24 +7451,7 @@ export declare type WeatherLayerOptions = {
7117
7451
  /**
7118
7452
  * Options for configuring a mask to apply to the layer.
7119
7453
  */
7120
- mask: {
7121
- /**
7122
- * The unique identifier for the mask layer. If not provided, then the value of `layerId` will be used.
7123
- */
7124
- id?: string;
7125
- /**
7126
- * Layer identifier of the layer to use for masking this layer's output.
7127
- */
7128
- layerId: string;
7129
- /**
7130
- * Whether to invert the mask, meaning the layer will be visible outside of the mask area.
7131
- */
7132
- invert?: boolean;
7133
- /**
7134
- * Additional configuration overrides for the mask layer.
7135
- */
7136
- overrides?: Record<string, any>;
7137
- };
7454
+ mask: LayerMaskConfiguration;
7138
7455
  childLayers?: {
7139
7456
  [id: string]: Partial<WeatherLayerOptions>;
7140
7457
  };
@@ -7203,7 +7520,6 @@ declare abstract class WebGLLayer<Source extends DataSource = DataSource> extend
7203
7520
  */
7204
7521
  timing: LayerTiming;
7205
7522
 
7206
- isLayerMask: boolean;
7207
7523
  /**
7208
7524
  * Whether to invert the mask layer's output.
7209
7525
  */
@@ -7222,6 +7538,8 @@ declare abstract class WebGLLayer<Source extends DataSource = DataSource> extend
7222
7538
 
7223
7539
  get mask(): LayerMask;
7224
7540
  set mask(value: LayerMask);
7541
+ get isLayerMask(): boolean;
7542
+ set isLayerMask(value: boolean);
7225
7543
  /**
7226
7544
  * Returns whether this layer is visible or not.
7227
7545
  * @readonly
@@ -7301,7 +7619,8 @@ protected addSourceEventHandler(event: string, handler: (e: any) => void, once?:
7301
7619
 
7302
7620
  protected onReady(): void;
7303
7621
 
7304
- protected eventPayload(): Record<string, any>;
7622
+ protected onMaskStateChange(): void;
7623
+ protected eventPayload(): Record<string, any>;
7305
7624
  /**
7306
7625
  * Disposes of all cached data and resources associated with the layer. This method is automatically called when
7307
7626
  * the layer is removed from a MapController instance.