@xweather/mapsgl 1.9.0 → 1.9.1-beta.1

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,6 +1,6 @@
1
1
  /*!
2
2
  *
3
- * @xweather/mapsgl - 1.9.0
3
+ * @xweather/mapsgl - 1.9.1-beta.1
4
4
  * (c) 2026 Vaisala Xweather
5
5
  * License: BSD
6
6
  * https://www.xweather.com
package/dist/mapsgl.d.ts CHANGED
@@ -2032,6 +2032,7 @@ declare abstract class DataSource<Spec extends SourceSpecification = SourceSpeci
2032
2032
  * The map layers that are currently using this data source.
2033
2033
  */
2034
2034
  consumingLayers: Array<DataSourceConsumer>;
2035
+ private _consumingLayerIds;
2035
2036
  /**
2036
2037
  * The type of data source and data it manages.
2037
2038
  * @readonly
@@ -2142,6 +2143,12 @@ export declare class DownloadManager<Task extends DownloadTask<any>> extends Eve
2142
2143
  * @returns The cached task data, or undefined if not found.
2143
2144
  */
2144
2145
  get(key: string): TaskData<Task> | undefined;
2146
+ /**
2147
+ * Retrieves an active (pending or in-flight) task by key.
2148
+ * @param key - The unique identifier for the task.
2149
+ * @returns The active task if present, otherwise undefined.
2150
+ */
2151
+ getTask(key: string): Task | undefined;
2145
2152
  /**
2146
2153
  * Sets the task runner function used to execute download tasks.
2147
2154
  * @param runner - The task runner function that handles task execution with retry logic.
@@ -2617,6 +2624,7 @@ declare const ExpressionOperator: {
2617
2624
  readonly case: "case";
2618
2625
  readonly match: "match";
2619
2626
  readonly let: "let";
2627
+ readonly time: "time";
2620
2628
  };
2621
2629
 
2622
2630
  export declare type ExpressionOperator = ObjectValue<typeof ExpressionOperator>;
@@ -3968,6 +3976,8 @@ dispose(all?: boolean): void;
3968
3976
  export declare class MapCamera {
3969
3977
  private _transform;
3970
3978
  private _orientation;
3979
+ private readonly _quat;
3980
+ private readonly _vec3;
3971
3981
  get position(): Vector3;
3972
3982
  set position(value: Vector3);
3973
3983
  get orientation(): Quaternion;
@@ -3983,6 +3993,10 @@ export declare class MapCamera {
3983
3993
  * @returns The view matrix
3984
3994
  */
3985
3995
  worldToCameraMatrix(worldSize: number, pixelsPerMeter?: number): Matrix4;
3996
+ /**
3997
+ * Writes world->camera matrix into `out` to avoid per-frame allocations.
3998
+ */
3999
+ worldToCameraMatrixInto(out: Matrix4, worldSize: number, pixelsPerMeter?: number): Matrix4;
3986
4000
  calculateCameraOrientation(bearing: number, pitch: number): Quaternion;
3987
4001
  }
3988
4002
 
@@ -4324,7 +4338,27 @@ get needsViewportUpdate(): boolean;
4324
4338
  */
4325
4339
  setRefreshInterval(minutes: number, advanceToNow?: boolean): void;
4326
4340
  private _triggerPreloadAnimation;
4341
+ private _preloadAnimationRequestId;
4342
+ private _activePreloadAnimationPromise?;
4343
+ private _hasPendingPreloadAnimationRequest;
4344
+ /**
4345
+ * Schedules animation preload work and returns the active drain promise.
4346
+ * Calls are coalesced: if preload is already running, this only marks that another pass should run after the
4347
+ * current one completes.
4348
+ */
4327
4349
  preloadAnimationData(): Promise<void>;
4350
+ /**
4351
+ * Processes queued preload requests until no further requests are pending.
4352
+ * If a newer request arrives during a preload pass, marks animators dirty so the next pass recomputes against
4353
+ * the newest viewport and timeline state.
4354
+ */
4355
+ private _drainPreloadAnimationQueue;
4356
+ /**
4357
+ * Invalidates in-flight preload work.
4358
+ * This does not abort the current async operation directly; it marks the current pass stale and forces the next
4359
+ * queued pass to refresh from latest state.
4360
+ */
4361
+ private cancelPreloadAnimationData;
4328
4362
  private debouncedPreloadAnimationData;
4329
4363
  private setNeedsPreloadAnimationData;
4330
4364
  private preloadAnimationDataIfNeeded;
@@ -5574,6 +5608,7 @@ export declare class SourceMetadata extends EventDispatcher {
5574
5608
  private _transformer;
5575
5609
  private _hasLoaded;
5576
5610
  private _lastRequestOptions;
5611
+ private _validTimesCache;
5577
5612
 
5578
5613
  /**
5579
5614
  * Creates an instance of SourceMetadata
@@ -5669,6 +5704,7 @@ export declare class SourceMetadata extends EventDispatcher {
5669
5704
  * @returns A promise that resolves with the metadata for the source.
5670
5705
  */
5671
5706
  load(options?: Partial<UrlRequestOptions>): Promise<Partial<SourceMetadataSchema>>;
5707
+ cancel(): void;
5672
5708
  protected processMetadata(json: Record<string, any>): Partial<SourceMetadataSchema>;
5673
5709
  }
5674
5710
 
@@ -6621,6 +6657,12 @@ export declare interface TileLayerConfig extends WebGLLayerConfig {
6621
6657
  zoomOffset: number;
6622
6658
  }
6623
6659
 
6660
+ export declare type TilePositionData = {
6661
+ translation: Vector3;
6662
+ scale: Vector3;
6663
+ matrix: Matrix4;
6664
+ };
6665
+
6624
6666
  export declare type TileQuadrant = 'tl' | 'tc' | 'tr' | 'ml' | 'mc' | 'mr' | 'bl' | 'bc' | 'br';
6625
6667
 
6626
6668
  /**
@@ -6705,6 +6747,9 @@ declare abstract class TileSource<Data = any, Source extends TileSourceSpecifica
6705
6747
  * deduplication vs. load-generation guard.
6706
6748
  */
6707
6749
  private _tileLoadRequestId;
6750
+ private _metadataLoadPromise?;
6751
+ private _pendingTaskCountByCoord;
6752
+ private _pendingIntervalsByCoord;
6708
6753
  /**
6709
6754
  * The minimum zoom level for the source. Defaults to `0`.
6710
6755
  */
@@ -6819,7 +6864,8 @@ constructor(id: string, spec: Partial<Source>);
6819
6864
  headers: Headers | null;
6820
6865
  }>;
6821
6866
  getMetadata(options?: Partial<UrlRequestOptions>): Promise<unknown>;
6822
- removeConsumer(consumer: DataSourceConsumer): void;
6867
+
6868
+ removeConsumer(consumer: DataSourceConsumer): void;
6823
6869
  /**
6824
6870
  * Aborts a tile request.
6825
6871
  * @param tile - The tile to abort.
@@ -7742,13 +7788,10 @@ export declare type WeatherLayerOptions = {
7742
7788
  */
7743
7789
  legend: Partial<LegendOptions> | false;
7744
7790
  /**
7745
- * Time range information about the map's current timeline.
7791
+ * The map's live timeline animation instance, used by source generators for both time range
7792
+ * parameters and per-feature animation controllers.
7746
7793
  */
7747
- timeline: {
7748
- from: Date;
7749
- to: Date;
7750
- current: Date;
7751
- };
7794
+ timeline: TimeAnimation;
7752
7795
  /**
7753
7796
  * Options for configuring a mask to apply to the layer.
7754
7797
  */
@@ -7839,6 +7882,8 @@ declare abstract class WebGLLayer<Source extends DataSource = DataSource> extend
7839
7882
  * Whether to invert the mask layer's output.
7840
7883
  */
7841
7884
  invertMaskLayer: boolean;
7885
+
7886
+ private _renderFrameContext;
7842
7887
 
7843
7888
  /**
7844
7889
  * Returns the render paint style configuration for this layer.