@xweather/mapsgl 1.8.2 → 1.8.3

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.8.2
3
+ * @xweather/mapsgl - 1.8.3
4
4
  * (c) 2025 Vaisala Xweather
5
5
  * License: BSD
6
6
  * https://www.xweather.com
package/dist/mapsgl.d.ts CHANGED
@@ -1898,16 +1898,16 @@ declare const CtoF: (c: number) => number;
1898
1898
  declare const CtoFUnit: (c: number) => number;
1899
1899
 
1900
1900
  export declare interface DataEvaluator {
1901
- title: string | ((value: any) => string);
1901
+ title: string | ((data: FeatureQueryResult) => string);
1902
1902
  alwaysShow?: boolean;
1903
- fn: (value: number | Record<string, number>) => string;
1903
+ fn: (data: FeatureQueryResult) => string;
1904
1904
  }
1905
1905
 
1906
1906
  export declare class DataInspector {
1907
1907
  readonly map: AnyMapController;
1908
1908
  constructor(map: AnyMapController);
1909
- query(coord: Coordinate): Record<string, any>;
1910
- queryPromise(coord: Coordinate): Promise<Record<string, any>>;
1909
+ query(coord: Coordinate): Record<string, FeatureQueryResult> | undefined;
1910
+ queryPromise(coord: Coordinate): Promise<Record<string, FeatureQueryResult>>;
1911
1911
  }
1912
1912
 
1913
1913
  export declare class DataInspectorControl {
@@ -1934,7 +1934,7 @@ export declare class DataInspectorControl {
1934
1934
  handleMouseOutEvent: (e: any) => void;
1935
1935
  _queryFeatures: (coord: Coordinate) => void;
1936
1936
  _queryFeaturesAsync: (coord: Coordinate) => Promise<void>;
1937
- _setFeatures(coord: Coordinate, features: Record<string, any>): void;
1937
+ _setFeatures(coord: Coordinate, features: Record<string, FeatureQueryResult>): void;
1938
1938
  }
1939
1939
 
1940
1940
  export declare interface DataInspectorControlOptions {
@@ -2071,6 +2071,14 @@ export declare interface Disposable {
2071
2071
  dispose(): void;
2072
2072
  }
2073
2073
 
2074
+ declare const DownloadPriority: {
2075
+ readonly critical: 0;
2076
+ readonly high: 1;
2077
+ readonly warm: 2;
2078
+ };
2079
+
2080
+ export declare type DownloadPriority = ObjectValue<typeof DownloadPriority>;
2081
+
2074
2082
  /**
2075
2083
  * Set of common easing functions.
2076
2084
  */
@@ -2320,9 +2328,12 @@ ExpressionInputType,
2320
2328
  ];
2321
2329
 
2322
2330
  export declare type FeatureQueryResult = {
2323
- value: number | Record<string, any>;
2331
+ value: number;
2332
+ angle?: number;
2333
+ unit?: string;
2334
+ features?: Array<FeatureData>;
2324
2335
  nodata: boolean;
2325
- } | Array<any>;
2336
+ };
2326
2337
 
2327
2338
  export declare type FillPattern = string | RemoteSymbolImage;
2328
2339
 
@@ -3027,6 +3038,10 @@ export declare interface LayerRenderer {
3027
3038
  * @param layer - The layer that was resized.
3028
3039
  */
3029
3040
  onResize(layer: WebGLLayer): void;
3041
+ /**
3042
+ * Called when the layer's mask state changes.
3043
+ */
3044
+ onMaskStateChange(): void;
3030
3045
  /**
3031
3046
  * Flags the renderer as dirty so that it is updated during the next render frame.
3032
3047
  */
@@ -3517,6 +3532,13 @@ export declare interface MapAdapterOptions {
3517
3532
  * the animation if desired using `timeline.resume()` or `timeline.start()`.
3518
3533
  */
3519
3534
  resumeOnMoveEnd: boolean;
3535
+ /**
3536
+ * Whether to always preload data for the animation. If `true`, then the animation will always preload data
3537
+ * for the animation when the map viewport changes or when animatable layers are added, even if the animation
3538
+ * is not currently playing. This is useful for ensuring that the animation has data to play when it is started.
3539
+ * Default is `false`.
3540
+ */
3541
+ preloadData: boolean;
3520
3542
  }>;
3521
3543
  }
3522
3544
 
@@ -3908,7 +3930,11 @@ get needsViewportUpdate(): boolean;
3908
3930
  * then the timeline's current position will remain unchanged. Defaults to `true`.
3909
3931
  */
3910
3932
  setRefreshInterval(minutes: number, advanceToNow?: boolean): void;
3933
+ private _triggerPreloadAnimation;
3911
3934
  preloadAnimationData(): Promise<void>;
3935
+ private debouncedPreloadAnimationData;
3936
+ private setNeedsPreloadAnimationData;
3937
+ private preloadAnimationDataIfNeeded;
3912
3938
  triggerRedraw(): void;
3913
3939
  protected getTransform(map: MapType, projection?: ProjectionType): MapTransform;
3914
3940
  getProjection(): ProjectionType;
@@ -6077,6 +6103,10 @@ export declare type TileRequestOptions = {
6077
6103
  * The {@link AbortSignal} to use for the request.
6078
6104
  */
6079
6105
  signal: AbortSignal;
6106
+ /**
6107
+ * The download priority of the request.
6108
+ */
6109
+ priority: DownloadPriority;
6080
6110
  /**
6081
6111
  * Whether to reload the tile if it has already been loaded.
6082
6112
  */
@@ -6239,6 +6269,11 @@ constructor(id: string, spec: Partial<Source>);
6239
6269
  */
6240
6270
  cancelAllRequests(): void;
6241
6271
 
6272
+ protected onLoadStart(): void;
6273
+ protected onLoadProgress(e: any): void;
6274
+ protected onLoadComplete(): void;
6275
+ protected onTileLoaded(tile: Tile<Data>, data: Data): void;
6276
+ protected onTileError(tile: Tile<Data>, err: any): void;
6242
6277
  dispose(): void;
6243
6278
  }
6244
6279
 
@@ -6309,16 +6344,33 @@ export declare class TimeAnimation extends Animation {
6309
6344
  */
6310
6345
  get startDate(): Date;
6311
6346
  set startDate(value: Date);
6347
+ /**
6348
+ * The offset between the start date and the animation's reference date in milliseconds. The reference date is the
6349
+ * current date at the time the animation was instantiated or the last time the start/end date was set.
6350
+ * @readonly
6351
+ */
6352
+ get startOffset(): number;
6312
6353
  /**
6313
6354
  * The end date of the animation.
6314
6355
  */
6315
6356
  get endDate(): Date;
6316
6357
  set endDate(value: Date);
6358
+ /**
6359
+ * The offset between the end date and the animation's reference date in milliseconds. The reference date is the
6360
+ * current date at the time the animation was instantiated or the last time the start/end date was set.
6361
+ * @readonly
6362
+ */
6363
+ get endOffset(): number;
6317
6364
  /**
6318
6365
  * The current date of the animation based on the animation's current position.
6319
6366
  * @readonly
6320
6367
  */
6321
6368
  get currentDate(): Date;
6369
+ /**
6370
+ * The reference date of the animation. The reference date is the current date at the time the animation was
6371
+ * instantiated or the last time the start/end date was set.
6372
+ * @readonly
6373
+ */
6322
6374
  get referenceDate(): Date;
6323
6375
  /**
6324
6376
  * Whether the animation includes time in the past.
@@ -6351,7 +6403,9 @@ export declare class TimeAnimation extends Animation {
6351
6403
  */
6352
6404
  get info(): TimeAnimationInfo;
6353
6405
  private _startDate;
6406
+ private _startOffset;
6354
6407
  private _endDate;
6408
+ private _endOffset;
6355
6409
  private _now;
6356
6410
  constructor({ start, end, alwaysStopAtStart, ...animationOpts }: Partial<TimeAnimationOptions>);
6357
6411
  /**
@@ -6611,6 +6665,11 @@ export declare type TimeSeriesOperationPeriod = 'none' | 'hour' | 'day' | 'week'
6611
6665
  */
6612
6666
  export declare type TimeSeriesOperationType = 'none' | 'sum' | 'diff' | 'max' | 'min';
6613
6667
 
6668
+ export declare type TimestampledPixel = {
6669
+ interval: TimeInterval;
6670
+ pixel: RGB;
6671
+ };
6672
+
6614
6673
  /**
6615
6674
  * A unit converter function.
6616
6675
  */
@@ -7174,7 +7233,6 @@ declare abstract class WebGLLayer<Source extends DataSource = DataSource> extend
7174
7233
  */
7175
7234
  timing: LayerTiming;
7176
7235
 
7177
- isLayerMask: boolean;
7178
7236
  /**
7179
7237
  * Whether to invert the mask layer's output.
7180
7238
  */
@@ -7193,6 +7251,8 @@ declare abstract class WebGLLayer<Source extends DataSource = DataSource> extend
7193
7251
 
7194
7252
  get mask(): LayerMask;
7195
7253
  set mask(value: LayerMask);
7254
+ get isLayerMask(): boolean;
7255
+ set isLayerMask(value: boolean);
7196
7256
  /**
7197
7257
  * Returns whether this layer is visible or not.
7198
7258
  * @readonly
@@ -7272,7 +7332,8 @@ protected addSourceEventHandler(event: string, handler: (e: any) => void, once?:
7272
7332
 
7273
7333
  protected onReady(): void;
7274
7334
 
7275
- protected eventPayload(): Record<string, any>;
7335
+ protected onMaskStateChange(): void;
7336
+ protected eventPayload(): Record<string, any>;
7276
7337
  /**
7277
7338
  * Disposes of all cached data and resources associated with the layer. This method is automatically called when
7278
7339
  * the layer is removed from a MapController instance.