@xweather/mapsgl 1.8.5 → 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 +2 -2
- package/dist/mapsgl.d.ts +589 -163
- package/dist/mapsgl.js +4 -4
- package/package.json +1 -1
package/dist/mapsgl.d.ts
CHANGED
|
@@ -546,6 +546,8 @@ declare const enum ShaderType {
|
|
|
546
546
|
FRAGMENT = "fragment"
|
|
547
547
|
}
|
|
548
548
|
|
|
549
|
+
export declare const sharedFPSMeter: FPSMeter;
|
|
550
|
+
|
|
549
551
|
export declare type Size = {
|
|
550
552
|
width: number;
|
|
551
553
|
height: number;
|
|
@@ -1064,7 +1066,7 @@ export declare class Animation extends EventDispatcher {
|
|
|
1064
1066
|
/**
|
|
1065
1067
|
* Stops the animation and resets it to its original starting position.
|
|
1066
1068
|
*/
|
|
1067
|
-
stop(): void;
|
|
1069
|
+
stop(advanceToStopPosition?: boolean): void;
|
|
1068
1070
|
/**
|
|
1069
1071
|
* Restarts the animation from the beginning if it is currently playing.
|
|
1070
1072
|
*/
|
|
@@ -1207,6 +1209,8 @@ export declare type AnimationState = ObjectValue<typeof AnimationState>;
|
|
|
1207
1209
|
export declare type AnyAuthenticator = Authenticator<any>;
|
|
1208
1210
|
|
|
1209
1211
|
export declare type AnyMapController = MapController<any>;
|
|
1212
|
+
|
|
1213
|
+
export declare type AnyTileCache = TileCache<any>;
|
|
1210
1214
|
|
|
1211
1215
|
/**
|
|
1212
1216
|
* An enumerated value representing an API endpoint action.
|
|
@@ -1851,6 +1855,10 @@ export declare interface ColorScaleOptions {
|
|
|
1851
1855
|
*/
|
|
1852
1856
|
masks?: Array<ColorMaskOptions>;
|
|
1853
1857
|
}
|
|
1858
|
+
|
|
1859
|
+
export declare class ConstantStyleValue<T> extends StyleValue_2<T> {
|
|
1860
|
+
constructor(value: T | any[] | StyleEvaulatorFunction<T>);
|
|
1861
|
+
}
|
|
1854
1862
|
|
|
1855
1863
|
/**
|
|
1856
1864
|
* Contour style properties control how contoured data gets rendered on a map. Contour layers are rendered by sampling
|
|
@@ -1867,7 +1875,13 @@ export declare interface ContourStyleSpec {
|
|
|
1867
1875
|
* major contour lines will not be rendered. This value must be in the same units as the data source.
|
|
1868
1876
|
*/
|
|
1869
1877
|
majorInterval: StyleValue<number>;
|
|
1878
|
+
/**
|
|
1879
|
+
* The width of the contour lines in pixels.
|
|
1880
|
+
*/
|
|
1870
1881
|
width: StyleValue<number>;
|
|
1882
|
+
/**
|
|
1883
|
+
* The width of the major contour lines in pixels.
|
|
1884
|
+
*/
|
|
1871
1885
|
majorWidth: StyleValue<number>;
|
|
1872
1886
|
scale: StyleValue<number>;
|
|
1873
1887
|
offset: StyleValue<number>;
|
|
@@ -1881,7 +1895,9 @@ export declare interface ControlStore {
|
|
|
1881
1895
|
dataInspector: DataInspectorControl;
|
|
1882
1896
|
}
|
|
1883
1897
|
|
|
1884
|
-
declare
|
|
1898
|
+
export declare type ConversionMeasurement = Measurement | 'temperature-change';
|
|
1899
|
+
|
|
1900
|
+
declare const convert: (type: ConversionMeasurement | string, value: number, from: string, to: string) => number;
|
|
1885
1901
|
|
|
1886
1902
|
export declare type Coordinate = {
|
|
1887
1903
|
lat: number;
|
|
@@ -1904,6 +1920,9 @@ declare const CtoF: (c: number) => number;
|
|
|
1904
1920
|
|
|
1905
1921
|
declare const CtoFUnit: (c: number) => number;
|
|
1906
1922
|
|
|
1923
|
+
export declare class DataDrivenStyleValue<T> extends StyleValue_2<T> {
|
|
1924
|
+
}
|
|
1925
|
+
|
|
1907
1926
|
export declare interface DataEvaluator {
|
|
1908
1927
|
title: string | ((data: FeatureQueryResult) => string);
|
|
1909
1928
|
alwaysShow?: boolean;
|
|
@@ -1947,6 +1966,7 @@ export declare class DataInspectorControl {
|
|
|
1947
1966
|
export declare interface DataInspectorControlOptions {
|
|
1948
1967
|
event: 'click' | 'move';
|
|
1949
1968
|
stream: boolean;
|
|
1969
|
+
showCoordinates: boolean;
|
|
1950
1970
|
tooltip: any;
|
|
1951
1971
|
}
|
|
1952
1972
|
|
|
@@ -2012,6 +2032,7 @@ declare abstract class DataSource<Spec extends SourceSpecification = SourceSpeci
|
|
|
2012
2032
|
* The map layers that are currently using this data source.
|
|
2013
2033
|
*/
|
|
2014
2034
|
consumingLayers: Array<DataSourceConsumer>;
|
|
2035
|
+
private _consumingLayerIds;
|
|
2015
2036
|
/**
|
|
2016
2037
|
* The type of data source and data it manages.
|
|
2017
2038
|
* @readonly
|
|
@@ -2092,6 +2113,7 @@ export declare interface Disposable {
|
|
|
2092
2113
|
* @template Task - The download task type that extends DownloadTask
|
|
2093
2114
|
*/
|
|
2094
2115
|
export declare class DownloadManager<Task extends DownloadTask<any>> extends EventDispatcher {
|
|
2116
|
+
id: string;
|
|
2095
2117
|
|
|
2096
2118
|
/**
|
|
2097
2119
|
* Gets the progress tracker for download operations.
|
|
@@ -2108,7 +2130,7 @@ export declare class DownloadManager<Task extends DownloadTask<any>> extends Eve
|
|
|
2108
2130
|
* @param options.defaultConcurrency - Default maximum concurrent downloads. Defaults to 16.
|
|
2109
2131
|
* @param options.perHostConcurrency - Per-host concurrency limits, keyed by host name.
|
|
2110
2132
|
*/
|
|
2111
|
-
constructor(options?: Partial<DownloadManagerOptions<
|
|
2133
|
+
constructor(options?: Partial<DownloadManagerOptions<Task>>);
|
|
2112
2134
|
/**
|
|
2113
2135
|
* Checks if a task result exists in the cache.
|
|
2114
2136
|
* @param key - The unique identifier for the task.
|
|
@@ -2121,6 +2143,12 @@ export declare class DownloadManager<Task extends DownloadTask<any>> extends Eve
|
|
|
2121
2143
|
* @returns The cached task data, or undefined if not found.
|
|
2122
2144
|
*/
|
|
2123
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;
|
|
2124
2152
|
/**
|
|
2125
2153
|
* Sets the task runner function used to execute download tasks.
|
|
2126
2154
|
* @param runner - The task runner function that handles task execution with retry logic.
|
|
@@ -2438,11 +2466,16 @@ export declare class EncodedTileSource<Source extends EncodedSourceSpecification
|
|
|
2438
2466
|
shouldUseTimesFromMetadata: boolean;
|
|
2439
2467
|
maxTextureSize: number;
|
|
2440
2468
|
private _worker;
|
|
2469
|
+
private _aggregateProgress;
|
|
2441
2470
|
|
|
2442
2471
|
get type(): string;
|
|
2472
|
+
get operation(): TimeSeriesOperationType;
|
|
2443
2473
|
constructor(id: string, spec: Partial<Source>);
|
|
2444
|
-
|
|
2445
|
-
|
|
2474
|
+
|
|
2475
|
+
shouldRequestTile(tile: Tile<EncodedTileData>, reload?: boolean, intervals?: Array<Date>): boolean;
|
|
2476
|
+
abortTileByCoord(coord: TileCoord): void;
|
|
2477
|
+
|
|
2478
|
+
/**
|
|
2446
2479
|
* Returns the metadata for the specified band, if available.
|
|
2447
2480
|
* @param band - The band to get metadata for.
|
|
2448
2481
|
* @returns
|
|
@@ -2456,6 +2489,7 @@ export declare class EncodedTileSource<Source extends EncodedSourceSpecification
|
|
|
2456
2489
|
*/
|
|
2457
2490
|
getDataRange(band: SampleChannel): ValueRange;
|
|
2458
2491
|
|
|
2492
|
+
protected onLoadProgress(e: any): void;
|
|
2459
2493
|
}
|
|
2460
2494
|
|
|
2461
2495
|
/**
|
|
@@ -2466,24 +2500,17 @@ export declare class EncodedTileSource<Source extends EncodedSourceSpecification
|
|
|
2466
2500
|
*/
|
|
2467
2501
|
declare const equalUnits: (units1: MapUnits, units2: MapUnits) => boolean;
|
|
2468
2502
|
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
'
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
'at',
|
|
2481
|
-
number,
|
|
2482
|
-
Array<any>
|
|
2483
|
-
] | [
|
|
2484
|
-
'length',
|
|
2485
|
-
string | number | Array<any>
|
|
2486
|
-
];
|
|
2503
|
+
/**
|
|
2504
|
+
* Mapbox-style expression: operator name followed by arguments.
|
|
2505
|
+
* Arguments may be literals or nested expressions (recursive).
|
|
2506
|
+
*/
|
|
2507
|
+
export declare type Expression = [ExpressionOperator, ...ExpressionValue[]];
|
|
2508
|
+
|
|
2509
|
+
/**
|
|
2510
|
+
* Mapbox-style expression array, e.g. ['get', 'opacity'] or ['*', ['get', 'x'], 2].
|
|
2511
|
+
* Allowed in style config; converted to DataDrivenStyleValue in the PaintStyle constructor.
|
|
2512
|
+
*/
|
|
2513
|
+
export declare type ExpressionArray = any[];
|
|
2487
2514
|
|
|
2488
2515
|
/**
|
|
2489
2516
|
* Defines a custom expression operation to calculate the result of a custom expression function. The custom expression
|
|
@@ -2527,44 +2554,83 @@ export declare interface ExpressionOperation {
|
|
|
2527
2554
|
chunk: string;
|
|
2528
2555
|
}
|
|
2529
2556
|
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2557
|
+
/**
|
|
2558
|
+
* Supported expression operator names (first element of an expression array).
|
|
2559
|
+
* @see evaluateExpression
|
|
2560
|
+
*/
|
|
2561
|
+
declare const ExpressionOperator: {
|
|
2562
|
+
readonly literal: "literal";
|
|
2563
|
+
readonly get: "get";
|
|
2564
|
+
readonly has: "has";
|
|
2565
|
+
readonly var: "var";
|
|
2566
|
+
readonly properties: "properties";
|
|
2567
|
+
readonly zoom: "zoom";
|
|
2568
|
+
readonly coalesce: "coalesce";
|
|
2569
|
+
readonly eq: "==";
|
|
2570
|
+
readonly neq: "!=";
|
|
2571
|
+
readonly lt: "<";
|
|
2572
|
+
readonly lte: "<=";
|
|
2573
|
+
readonly gt: ">";
|
|
2574
|
+
readonly gte: ">=";
|
|
2575
|
+
readonly not: "!";
|
|
2576
|
+
readonly all: "all";
|
|
2577
|
+
readonly any: "any";
|
|
2578
|
+
readonly toNumber: "to-number";
|
|
2579
|
+
readonly toString: "to-string";
|
|
2580
|
+
readonly toLocaleString: "to-locale-string";
|
|
2581
|
+
readonly toUnit: "to-unit";
|
|
2582
|
+
readonly toBoolean: "to-boolean";
|
|
2583
|
+
readonly typeOf: "typeof";
|
|
2584
|
+
readonly number: "number";
|
|
2585
|
+
readonly string: "string";
|
|
2586
|
+
readonly boolean: "boolean";
|
|
2587
|
+
readonly object: "object";
|
|
2588
|
+
readonly add: "+";
|
|
2589
|
+
readonly subtract: "-";
|
|
2590
|
+
readonly mod: "%";
|
|
2591
|
+
readonly pow: "^";
|
|
2592
|
+
readonly multiply: "*";
|
|
2593
|
+
readonly divide: "/";
|
|
2594
|
+
readonly abs: "abs";
|
|
2595
|
+
readonly ceil: "ceil";
|
|
2596
|
+
readonly floor: "floor";
|
|
2597
|
+
readonly round: "round";
|
|
2598
|
+
readonly min: "min";
|
|
2599
|
+
readonly max: "max";
|
|
2600
|
+
readonly sqrt: "sqrt";
|
|
2601
|
+
readonly ln: "ln";
|
|
2602
|
+
readonly ln2: "ln2";
|
|
2603
|
+
readonly log2: "log2";
|
|
2604
|
+
readonly log10: "log10";
|
|
2605
|
+
readonly sin: "sin";
|
|
2606
|
+
readonly cos: "cos";
|
|
2607
|
+
readonly tan: "tan";
|
|
2608
|
+
readonly asin: "asin";
|
|
2609
|
+
readonly acos: "acos";
|
|
2610
|
+
readonly atan: "atan";
|
|
2611
|
+
readonly e: "e";
|
|
2612
|
+
readonly pi: "pi";
|
|
2613
|
+
readonly at: "at";
|
|
2614
|
+
readonly in: "in";
|
|
2615
|
+
readonly regex: "regex";
|
|
2616
|
+
readonly indexOf: "index-of";
|
|
2617
|
+
readonly length: "length";
|
|
2618
|
+
readonly slice: "slice";
|
|
2619
|
+
readonly concat: "concat";
|
|
2620
|
+
readonly downcase: "downcase";
|
|
2621
|
+
readonly upcase: "upcase";
|
|
2622
|
+
readonly step: "step";
|
|
2623
|
+
readonly interpolate: "interpolate";
|
|
2624
|
+
readonly case: "case";
|
|
2625
|
+
readonly match: "match";
|
|
2626
|
+
readonly let: "let";
|
|
2627
|
+
readonly time: "time";
|
|
2628
|
+
};
|
|
2629
|
+
|
|
2630
|
+
export declare type ExpressionOperator = ObjectValue<typeof ExpressionOperator>;
|
|
2631
|
+
|
|
2632
|
+
/** Value that can appear as an expression or as an argument (literal or nested expression). */
|
|
2633
|
+
export declare type ExpressionValue = string | number | boolean | null | object | Expression;
|
|
2568
2634
|
|
|
2569
2635
|
export declare type FeatureQueryResult = {
|
|
2570
2636
|
value: number;
|
|
@@ -2592,7 +2658,7 @@ export declare interface FillStyleSpec {
|
|
|
2592
2658
|
/**
|
|
2593
2659
|
* Color of the fill.
|
|
2594
2660
|
*/
|
|
2595
|
-
color: StyleValue<string | Color
|
|
2661
|
+
color: StyleValue<string | Color>;
|
|
2596
2662
|
/**
|
|
2597
2663
|
* The image to use for the fill pattern. Can be an image identifier string or a {@link RemoteSymbolImage}.
|
|
2598
2664
|
* @remarks
|
|
@@ -2613,6 +2679,14 @@ export declare interface FillStyleSpec {
|
|
|
2613
2679
|
*/
|
|
2614
2680
|
sort: string | SortProperty;
|
|
2615
2681
|
}
|
|
2682
|
+
|
|
2683
|
+
/**
|
|
2684
|
+
* Mapbox-style filter expression array. Evaluates to boolean (feature included when truthy).
|
|
2685
|
+
* Use with StyleExpression for evaluation. Supports decision expressions (==, !=, <, <=, >, >=,
|
|
2686
|
+
* all, any, !, in, regex, case, match, etc.) and property lookups (get, has).
|
|
2687
|
+
* @see StyleExpression
|
|
2688
|
+
*/
|
|
2689
|
+
export declare type FilterExpression = ExpressionValue;
|
|
2616
2690
|
|
|
2617
2691
|
declare const FtoC: (f: number) => number;
|
|
2618
2692
|
|
|
@@ -2769,8 +2843,14 @@ export declare type GeoJsonProperties = {
|
|
|
2769
2843
|
|
|
2770
2844
|
/**
|
|
2771
2845
|
* A subclass of {@link VectorTileSource} that is used to represent GeoJSON data.
|
|
2846
|
+
*
|
|
2847
|
+
* This source tracks a single in-flight data update (`pendingDataUpdate`) to make update
|
|
2848
|
+
* lifecycle events deterministic when remote loads and `setData()` calls overlap. The revision-
|
|
2849
|
+
* based update state prevents duplicate or out-of-order `DATA_UPDATE_*` events, avoids stale
|
|
2850
|
+
* async completions mutating newer state, and reduces no-op update churn during rapid updates.
|
|
2772
2851
|
*/
|
|
2773
2852
|
export declare class GeoJSONSource extends VectorTileSource {
|
|
2853
|
+
private static readonly DATA_UPDATE_ERROR_MESSAGE;
|
|
2774
2854
|
/**
|
|
2775
2855
|
* Whether the GeoJSON data is dynamic, meaning it will be updated frequently. Default is `false`.
|
|
2776
2856
|
*/
|
|
@@ -2787,9 +2867,15 @@ export declare class GeoJSONSource extends VectorTileSource {
|
|
|
2787
2867
|
* The GeoJSON data associated with the source, either provided statically or from a remote source.
|
|
2788
2868
|
*/
|
|
2789
2869
|
get data(): GeoJSONFeatureCollection;
|
|
2790
|
-
private pendingLoad;
|
|
2791
2870
|
private needsUpdate;
|
|
2871
|
+
/**
|
|
2872
|
+
* The revision number of the data.
|
|
2873
|
+
*/
|
|
2792
2874
|
private dataRevision;
|
|
2875
|
+
/**
|
|
2876
|
+
* The pending data update being processed.
|
|
2877
|
+
*/
|
|
2878
|
+
private pendingDataUpdate;
|
|
2793
2879
|
constructor(id: string, spec: Partial<GeoJSONSourceSpecification>);
|
|
2794
2880
|
/**
|
|
2795
2881
|
* Sets the URL of the GeoJSON data.
|
|
@@ -2811,6 +2897,10 @@ export declare class GeoJSONSource extends VectorTileSource {
|
|
|
2811
2897
|
reload(): void;
|
|
2812
2898
|
private updateWorkerData;
|
|
2813
2899
|
private processWorkerUpdate;
|
|
2900
|
+
private beginDataUpdate;
|
|
2901
|
+
private flushQueuedDataUpdate;
|
|
2902
|
+
private completeDataUpdate;
|
|
2903
|
+
private failDataUpdate;
|
|
2814
2904
|
}
|
|
2815
2905
|
|
|
2816
2906
|
/**
|
|
@@ -2850,7 +2940,7 @@ export declare type GeoJSONTypes = GeoJSON['type'];
|
|
|
2850
2940
|
* @param system - The system to get the default unit for.
|
|
2851
2941
|
* @returns The default unit for the given measurement and system.
|
|
2852
2942
|
*/
|
|
2853
|
-
declare const getDefaultUnit: (type:
|
|
2943
|
+
declare const getDefaultUnit: (type: ConversionMeasurement, system: UnitSystem) => string;
|
|
2854
2944
|
|
|
2855
2945
|
/**
|
|
2856
2946
|
* Returns the default units for the given system.
|
|
@@ -2868,6 +2958,8 @@ declare const getMeasurementType: (str: string) => Measurement | undefined;
|
|
|
2868
2958
|
* @returns The system for the given units.
|
|
2869
2959
|
*/
|
|
2870
2960
|
declare const getSystemForUnits: (units: MapUnits) => UnitSystem;
|
|
2961
|
+
|
|
2962
|
+
declare const getUnitPrecision: (unit: string) => number;
|
|
2871
2963
|
|
|
2872
2964
|
export declare type GoogleMap = google.maps.Map;
|
|
2873
2965
|
|
|
@@ -2927,7 +3019,7 @@ export declare interface HeatmapStyleSpec {
|
|
|
2927
3019
|
* Defines the normalized (`0` to `1`) color scale used to color pixels based on its density value, where `0`
|
|
2928
3020
|
* is none and `1` being the highest density.
|
|
2929
3021
|
*/
|
|
2930
|
-
color: Array<number | string
|
|
3022
|
+
color: StyleValue<Array<number | string>>;
|
|
2931
3023
|
/**
|
|
2932
3024
|
* Radius of influence of each data point in screen points.
|
|
2933
3025
|
*/
|
|
@@ -3262,7 +3354,7 @@ export declare type LayerMetadata = {
|
|
|
3262
3354
|
sourceLayerId: string;
|
|
3263
3355
|
sourceLayerType: string;
|
|
3264
3356
|
type: string;
|
|
3265
|
-
filter:
|
|
3357
|
+
filter: FilterExpression;
|
|
3266
3358
|
paint: PaintStyle;
|
|
3267
3359
|
options?: Record<string, unknown>;
|
|
3268
3360
|
};
|
|
@@ -3343,13 +3435,15 @@ export declare interface LayerRenderer {
|
|
|
3343
3435
|
* Called before the primary render method to perform any setup or rendering that needs to be done before
|
|
3344
3436
|
* rendering, such as rendering to a framebuffer or updating compute passes.
|
|
3345
3437
|
* @param elapsedTime - The render loop's elapsed time.
|
|
3438
|
+
* @param frameContext - Map and layer state for this frame; the renderer must use this instead of reading from the layer or map.
|
|
3346
3439
|
*/
|
|
3347
|
-
prerender(elapsedTime: number): void;
|
|
3440
|
+
prerender(elapsedTime: number, frameContext: RenderFrameContext): void;
|
|
3348
3441
|
/**
|
|
3349
3442
|
* Render the layer's data.
|
|
3350
3443
|
* @param elapsedTime - The render loop's elapsed time.
|
|
3444
|
+
* @param frameContext - Map and layer state for this frame; the renderer must use this instead of reading from the layer or map.
|
|
3351
3445
|
*/
|
|
3352
|
-
draw(elapsedTime: number): void;
|
|
3446
|
+
draw(elapsedTime: number, frameContext: RenderFrameContext): void;
|
|
3353
3447
|
/**
|
|
3354
3448
|
* Performs any necessary set up to prepare the renderer for offscreen rendering, such as setting up a framebuffer.
|
|
3355
3449
|
*/
|
|
@@ -3410,15 +3504,21 @@ export declare interface LayerSpecification {
|
|
|
3410
3504
|
*/
|
|
3411
3505
|
mask?: LayerMaskSpecification;
|
|
3412
3506
|
/**
|
|
3413
|
-
* Filter expression
|
|
3414
|
-
*
|
|
3415
|
-
* @see ExpressionSpecification
|
|
3507
|
+
* Filter expression for vector tile layers. Evaluated with StyleExpression.
|
|
3508
|
+
* @see FilterExpression
|
|
3416
3509
|
*/
|
|
3417
|
-
filter?:
|
|
3510
|
+
filter?: FilterExpression;
|
|
3418
3511
|
/**
|
|
3419
3512
|
* Time series configuration for the layer when time-based.
|
|
3420
3513
|
*/
|
|
3421
3514
|
timeSeries?: Partial<LayerTiming>;
|
|
3515
|
+
/**
|
|
3516
|
+
* Optional measurement metadata associated with this layer's values.
|
|
3517
|
+
*/
|
|
3518
|
+
measurement?: {
|
|
3519
|
+
type: ConversionMeasurement;
|
|
3520
|
+
units: string;
|
|
3521
|
+
};
|
|
3422
3522
|
/**
|
|
3423
3523
|
* Data resolution to use, which controls which data zoom level is requested for a specific map zoom level.
|
|
3424
3524
|
* @remarks
|
|
@@ -3876,6 +3976,8 @@ dispose(all?: boolean): void;
|
|
|
3876
3976
|
export declare class MapCamera {
|
|
3877
3977
|
private _transform;
|
|
3878
3978
|
private _orientation;
|
|
3979
|
+
private readonly _quat;
|
|
3980
|
+
private readonly _vec3;
|
|
3879
3981
|
get position(): Vector3;
|
|
3880
3982
|
set position(value: Vector3);
|
|
3881
3983
|
get orientation(): Quaternion;
|
|
@@ -3891,6 +3993,10 @@ export declare class MapCamera {
|
|
|
3891
3993
|
* @returns The view matrix
|
|
3892
3994
|
*/
|
|
3893
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;
|
|
3894
4000
|
calculateCameraOrientation(bearing: number, pitch: number): Quaternion;
|
|
3895
4001
|
}
|
|
3896
4002
|
|
|
@@ -4232,7 +4338,27 @@ get needsViewportUpdate(): boolean;
|
|
|
4232
4338
|
*/
|
|
4233
4339
|
setRefreshInterval(minutes: number, advanceToNow?: boolean): void;
|
|
4234
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
|
+
*/
|
|
4235
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;
|
|
4236
4362
|
private debouncedPreloadAnimationData;
|
|
4237
4363
|
private setNeedsPreloadAnimationData;
|
|
4238
4364
|
private preloadAnimationDataIfNeeded;
|
|
@@ -4737,6 +4863,10 @@ declare const Operator: {
|
|
|
4737
4863
|
|
|
4738
4864
|
export declare type Operator = ObjectValue<typeof Operator>;
|
|
4739
4865
|
|
|
4866
|
+
export declare interface Opts {
|
|
4867
|
+
capacity: number;
|
|
4868
|
+
}
|
|
4869
|
+
|
|
4740
4870
|
/**
|
|
4741
4871
|
* The mode for handling symbol overlap.
|
|
4742
4872
|
*/
|
|
@@ -4826,7 +4956,7 @@ export declare class PaintStyle {
|
|
|
4826
4956
|
iconAnimated(data?: StylableData): boolean;
|
|
4827
4957
|
iconFactor(data?: StylableData): number;
|
|
4828
4958
|
iconAtlas(data?: StylableData): SymbolIconAtlas;
|
|
4829
|
-
textValue(data?: StylableData, line?: number): string
|
|
4959
|
+
textValue(data?: StylableData, line?: number): string;
|
|
4830
4960
|
textTransform(data?: StylableData, line?: number): string;
|
|
4831
4961
|
textFont(data?: StylableData, line?: number): string;
|
|
4832
4962
|
textSize(data?: StylableData, line?: number): number;
|
|
@@ -5097,32 +5227,6 @@ declare const ProjectionType: {
|
|
|
5097
5227
|
|
|
5098
5228
|
export declare type ProjectionType = ObjectValue<typeof ProjectionType>;
|
|
5099
5229
|
|
|
5100
|
-
/**
|
|
5101
|
-
* Defines a property value that is based on a property name or an array of property names from a JSON object. The
|
|
5102
|
-
* property value can also be transformed using a custom function to format the value before rendering.
|
|
5103
|
-
*/
|
|
5104
|
-
export declare interface PropertyValue {
|
|
5105
|
-
/**
|
|
5106
|
-
* Property key path or an array of property key paths from a JSON object. If an array is provided, then the first
|
|
5107
|
-
* property that is not undefined will be used.
|
|
5108
|
-
*/
|
|
5109
|
-
property: string | Array<string>;
|
|
5110
|
-
/**
|
|
5111
|
-
* Optional measurement type the value represents. This is used to select the proper units to convert the value to
|
|
5112
|
-
* before rendering. If not provided, then the value will be rendered as is.
|
|
5113
|
-
*/
|
|
5114
|
-
measurement?: {
|
|
5115
|
-
type: string;
|
|
5116
|
-
units: string;
|
|
5117
|
-
};
|
|
5118
|
-
/**
|
|
5119
|
-
* Custom function to transform the property value before rendering. This is useful for formatting the value before
|
|
5120
|
-
* rendering, such as converting units, rounding, or applying other transformations.
|
|
5121
|
-
* @param value - The property value to transform.
|
|
5122
|
-
*/
|
|
5123
|
-
transform?: (value: string | number, units?: string) => string | number;
|
|
5124
|
-
}
|
|
5125
|
-
|
|
5126
5230
|
/**
|
|
5127
5231
|
* A `Query` object is a convenience wrapper for setting up and configuring a query string used
|
|
5128
5232
|
* for API queries.
|
|
@@ -5270,7 +5374,92 @@ export declare interface RemoteSymbolImage {
|
|
|
5270
5374
|
/** Indicates if the image is a pattern image. */
|
|
5271
5375
|
pattern?: boolean;
|
|
5272
5376
|
}
|
|
5377
|
+
|
|
5378
|
+
/**
|
|
5379
|
+
* Context built by the layer each frame and passed to prerender() and draw().
|
|
5380
|
+
* Contains all map and layer state needed for the render path so the renderer
|
|
5381
|
+
* does not access the parent layer or the layer's map.
|
|
5382
|
+
*/
|
|
5383
|
+
export declare interface RenderFrameContext {
|
|
5384
|
+
/** Elapsed time since the start of the render loop. Used by the renderer to animate the layer. */
|
|
5385
|
+
elapsedTime: number;
|
|
5386
|
+
/** Latest calculated FPS of the context. */
|
|
5387
|
+
fps: number;
|
|
5388
|
+
/** Map state snapshot. */
|
|
5389
|
+
map: RenderFrameContextMap;
|
|
5390
|
+
/** Layer id. */
|
|
5391
|
+
layerId: string;
|
|
5392
|
+
/** Scene to render into. */
|
|
5393
|
+
scene: MapScene;
|
|
5394
|
+
/** Whether this layer is used as a mask (stencil). */
|
|
5395
|
+
isLayerMask: boolean;
|
|
5396
|
+
/** Layer mask config if any. */
|
|
5397
|
+
mask?: LayerMask;
|
|
5398
|
+
/** Whether the layer is visible. */
|
|
5399
|
+
visible: boolean;
|
|
5400
|
+
/** Request a redraw on the next frame. */
|
|
5401
|
+
setNeedsUpdate(): void;
|
|
5402
|
+
/** Tile-layer-specific state; set when the layer is a tile layer. */
|
|
5403
|
+
tileLayer?: RenderFrameContextTileLayer;
|
|
5404
|
+
/** Tile cache from the layer's source; set when the layer has a tile source. Used by renderers instead of accessing layer.source.tiles. */
|
|
5405
|
+
tileCache?: AnyTileCache;
|
|
5406
|
+
/** Tile dimensions from the layer's source; set when the layer has a tile source. Used for texture array setup. */
|
|
5407
|
+
tileSize?: {
|
|
5408
|
+
width: number;
|
|
5409
|
+
height: number;
|
|
5410
|
+
};
|
|
5411
|
+
/** Layer paint style (from layer.paint). Set by the layer when building context. */
|
|
5412
|
+
paint?: PaintStyle;
|
|
5413
|
+
/** Map style (map.style). Used by vector/grid passes for fonts, image atlas, etc. */
|
|
5414
|
+
mapStyle?: MapStyle;
|
|
5415
|
+
}
|
|
5416
|
+
|
|
5417
|
+
/**
|
|
5418
|
+
* Snapshot of map transform state passed into the render path so the renderer
|
|
5419
|
+
* does not read from the map or layer during prerender/draw.
|
|
5420
|
+
*/
|
|
5421
|
+
export declare interface RenderFrameContextMap {
|
|
5422
|
+
center: Coordinate;
|
|
5423
|
+
zoom: number;
|
|
5424
|
+
bounds: CoordinateBounds;
|
|
5425
|
+
bearing: number;
|
|
5426
|
+
pitch: number;
|
|
5427
|
+
tileSize: number;
|
|
5428
|
+
projection: {
|
|
5429
|
+
type: ProjectionType;
|
|
5430
|
+
subdivisionGranularity: SubdivisionGranularitySetting;
|
|
5431
|
+
};
|
|
5432
|
+
transform: MapTransform;
|
|
5433
|
+
placement: SymbolPlacement;
|
|
5434
|
+
globiness: number;
|
|
5435
|
+
isGlobe: boolean;
|
|
5436
|
+
camera: {
|
|
5437
|
+
position: Vector3;
|
|
5438
|
+
};
|
|
5439
|
+
clippingPlane: Vector4;
|
|
5440
|
+
globeMatrix: Matrix4;
|
|
5441
|
+
mercatorMatrix: Matrix4;
|
|
5442
|
+
projGlobeMatrix: Matrix4;
|
|
5443
|
+
zoomTransition: number;
|
|
5444
|
+
cutoffParams: [number, number, number, number];
|
|
5445
|
+
farZ: number;
|
|
5446
|
+
pixelsPerMercatorPixelRatio: number;
|
|
5447
|
+
}
|
|
5448
|
+
|
|
5449
|
+
/**
|
|
5450
|
+
* Optional tile-layer-specific state for resolution and LOD. Present when the
|
|
5451
|
+
* layer is a tile layer.
|
|
5452
|
+
*/
|
|
5453
|
+
export declare interface RenderFrameContextTileLayer {
|
|
5454
|
+
viewport: Viewport;
|
|
5455
|
+
pyramid: TilePyramid<any>;
|
|
5456
|
+
getDataZoom(): number;
|
|
5457
|
+
getVisibleTileCoords(zoom: number): TileCoord[];
|
|
5458
|
+
getCurrentInterval?(): TimeInterval | undefined;
|
|
5459
|
+
}
|
|
5273
5460
|
|
|
5461
|
+
declare const resolveMeasurementForUnits: (type: ConversionMeasurement) => Measurement;
|
|
5462
|
+
|
|
5274
5463
|
/**
|
|
5275
5464
|
* RGBAImage represents a 2D grid of image data. Them image data should NOT be premultipled since ImageData is not.
|
|
5276
5465
|
* Therefore, UNPACK_PREMULTIPLY_ALPHA_WEBGL must be used when uploading the image data to the GPU via a texture.
|
|
@@ -5419,6 +5608,7 @@ export declare class SourceMetadata extends EventDispatcher {
|
|
|
5419
5608
|
private _transformer;
|
|
5420
5609
|
private _hasLoaded;
|
|
5421
5610
|
private _lastRequestOptions;
|
|
5611
|
+
private _validTimesCache;
|
|
5422
5612
|
|
|
5423
5613
|
/**
|
|
5424
5614
|
* Creates an instance of SourceMetadata
|
|
@@ -5463,10 +5653,10 @@ export declare class SourceMetadata extends EventDispatcher {
|
|
|
5463
5653
|
*/
|
|
5464
5654
|
get hasLoaded(): boolean;
|
|
5465
5655
|
/**
|
|
5466
|
-
* Whether the
|
|
5656
|
+
* Whether the data source is a time-series data source.
|
|
5467
5657
|
* @readonly
|
|
5468
5658
|
*/
|
|
5469
|
-
get
|
|
5659
|
+
get isTimeSeries(): boolean;
|
|
5470
5660
|
get validTimeRange(): TimeRange;
|
|
5471
5661
|
getAllValidTimes(): Array<Date>;
|
|
5472
5662
|
/**
|
|
@@ -5514,6 +5704,7 @@ export declare class SourceMetadata extends EventDispatcher {
|
|
|
5514
5704
|
* @returns A promise that resolves with the metadata for the source.
|
|
5515
5705
|
*/
|
|
5516
5706
|
load(options?: Partial<UrlRequestOptions>): Promise<Partial<SourceMetadataSchema>>;
|
|
5707
|
+
cancel(): void;
|
|
5517
5708
|
protected processMetadata(json: Record<string, any>): Partial<SourceMetadataSchema>;
|
|
5518
5709
|
}
|
|
5519
5710
|
|
|
@@ -5649,6 +5840,12 @@ export declare class State<T> extends EventDispatcher {
|
|
|
5649
5840
|
};
|
|
5650
5841
|
}
|
|
5651
5842
|
|
|
5843
|
+
/**
|
|
5844
|
+
* Legacy style value: a static value or a function (data) => value.
|
|
5845
|
+
* Supported for backwards compatibility.
|
|
5846
|
+
*/
|
|
5847
|
+
export declare type StaticOrFunctionStyleValue<T> = T | ((data: StylableData) => T);
|
|
5848
|
+
|
|
5652
5849
|
/**
|
|
5653
5850
|
* Stroke style properties control how one or more polylines get rendered on a map. These properties also control
|
|
5654
5851
|
* strokes around circles and other vector shapes.
|
|
@@ -5657,7 +5854,7 @@ export declare interface StrokeStyleSpec {
|
|
|
5657
5854
|
/**
|
|
5658
5855
|
* Color of the stroke.
|
|
5659
5856
|
*/
|
|
5660
|
-
color: StyleValue<string | Color
|
|
5857
|
+
color: StyleValue<string | Color>;
|
|
5661
5858
|
/**
|
|
5662
5859
|
* Opacity of the stroke. Opacity can also be specified by including an alpha channel in the `color` value.
|
|
5663
5860
|
*/
|
|
@@ -5761,6 +5958,8 @@ export declare interface StyledImageRenderer {
|
|
|
5761
5958
|
dispose?: () => void;
|
|
5762
5959
|
}
|
|
5763
5960
|
|
|
5961
|
+
export declare type StyleEvaulatorFunction<T> = (properties: Record<string, any>) => T;
|
|
5962
|
+
|
|
5764
5963
|
export declare interface StyleExpression {
|
|
5765
5964
|
property: string;
|
|
5766
5965
|
type?: 'identity' | 'expression';
|
|
@@ -5810,10 +6009,35 @@ export declare const styles: {
|
|
|
5810
6009
|
};
|
|
5811
6010
|
|
|
5812
6011
|
/**
|
|
5813
|
-
*
|
|
5814
|
-
*
|
|
6012
|
+
* Style value accepted by paint specs. Can be:
|
|
6013
|
+
* - A constant (number, string, boolean, object, etc.)
|
|
6014
|
+
* - A function (data) => value
|
|
6015
|
+
* - An expression array (Mapbox-style, e.g. ['get', 'opacity'])
|
|
6016
|
+
* - A {@link ConstantStyleValue} or {@link DataDrivenStyleValue} instance (used as-is)
|
|
6017
|
+
*
|
|
6018
|
+
* Constants, functions, and expression arrays are converted to StyleValue instances in the PaintStyle constructor.
|
|
5815
6019
|
*/
|
|
5816
|
-
export declare type StyleValue<T> = T |
|
|
6020
|
+
export declare type StyleValue<T> = StaticOrFunctionStyleValue<T> | ExpressionArray | DataDrivenStyleValue<T> | ConstantStyleValue<T>;
|
|
6021
|
+
|
|
6022
|
+
declare abstract class StyleValue_2<T> {
|
|
6023
|
+
private constant;
|
|
6024
|
+
private expression;
|
|
6025
|
+
private fn;
|
|
6026
|
+
constructor(value: T | any[] | StyleEvaulatorFunction<T>);
|
|
6027
|
+
/**
|
|
6028
|
+
* Returns whether this value is an expression.
|
|
6029
|
+
*/
|
|
6030
|
+
isExpression(): boolean;
|
|
6031
|
+
/**
|
|
6032
|
+
* Resolves the final value based on input properties.
|
|
6033
|
+
* If it's a constant, returns it directly.
|
|
6034
|
+
*/
|
|
6035
|
+
resolve(properties?: Record<string, any>): T;
|
|
6036
|
+
/**
|
|
6037
|
+
* Returns the raw constant or expression for debugging or serialization.
|
|
6038
|
+
*/
|
|
6039
|
+
getRaw(): T | any[] | StyleEvaulatorFunction<T> | null;
|
|
6040
|
+
}
|
|
5817
6041
|
|
|
5818
6042
|
/**
|
|
5819
6043
|
* Supported color bands.
|
|
@@ -6002,10 +6226,9 @@ export declare interface TaskRunnerConfig<Task extends DownloadTask<any>> {
|
|
|
6002
6226
|
*/
|
|
6003
6227
|
export declare interface TextStyleSpec {
|
|
6004
6228
|
/**
|
|
6005
|
-
* Text to render. This can be a static string or
|
|
6006
|
-
* property names from a JSON object.
|
|
6229
|
+
* Text to render. This can be a static string or an expression that evaluates to a string.
|
|
6007
6230
|
*/
|
|
6008
|
-
value: StyleValue<string
|
|
6231
|
+
value: StyleValue<string>;
|
|
6009
6232
|
/**
|
|
6010
6233
|
* The size of the text in pixels.
|
|
6011
6234
|
*/
|
|
@@ -6084,6 +6307,11 @@ export declare class Tile<Data> implements Disposable {
|
|
|
6084
6307
|
private _span;
|
|
6085
6308
|
private _bounds;
|
|
6086
6309
|
private _state;
|
|
6310
|
+
/**
|
|
6311
|
+
* Monotonically increasing identifier for the most recent request that started loading this tile.
|
|
6312
|
+
* Used by `TileSource` to guard against out-of-order async responses overwriting newer data.
|
|
6313
|
+
*/
|
|
6314
|
+
requestId: number;
|
|
6087
6315
|
private _data;
|
|
6088
6316
|
/**
|
|
6089
6317
|
* The tile coordinate of the tile as `x`, `y`, and `z`.
|
|
@@ -6166,6 +6394,13 @@ export declare class TileBounds {
|
|
|
6166
6394
|
get center(): Point;
|
|
6167
6395
|
get info(): Rect_2;
|
|
6168
6396
|
constructor(left: number, right: number, top: number, bottom: number);
|
|
6397
|
+
/**
|
|
6398
|
+
* Expands the bounds by the specified offsets.
|
|
6399
|
+
* @param xOffset - The offset to expand the bounds horizontally.
|
|
6400
|
+
* @param yOffset - The offset to expand the bounds vertically.
|
|
6401
|
+
* @returns The expanded bounds.
|
|
6402
|
+
*/
|
|
6403
|
+
expand(xOffset: number, yOffset: number): TileBounds;
|
|
6169
6404
|
/**
|
|
6170
6405
|
* Returns whether the bounds equals the specified bounds.
|
|
6171
6406
|
* @param bounds -
|
|
@@ -6312,6 +6547,122 @@ export declare interface TileInfo {
|
|
|
6312
6547
|
z: number;
|
|
6313
6548
|
}
|
|
6314
6549
|
|
|
6550
|
+
/**
|
|
6551
|
+
* Represents a layer that renders data from a tile-based data source. This is the base class for all tile-based layers
|
|
6552
|
+
* and is not intended to be used directly.
|
|
6553
|
+
* @template Data Type of data stored in the layer's tiles.
|
|
6554
|
+
*/
|
|
6555
|
+
declare abstract class TileLayer<Data> extends WebGLLayer<TileSource> {
|
|
6556
|
+
/**
|
|
6557
|
+
* Tile pyramid used to calculating and requesting tiles for the layer from the data source.
|
|
6558
|
+
*/
|
|
6559
|
+
readonly pyramid: TilePyramid<Data>;
|
|
6560
|
+
readonly zoomOffset: number;
|
|
6561
|
+
private tileBounds;
|
|
6562
|
+
private dataQuality;
|
|
6563
|
+
private upgradeDataQuality;
|
|
6564
|
+
private lastHiddenTime;
|
|
6565
|
+
private tileLoadProgress;
|
|
6566
|
+
/**
|
|
6567
|
+
* Returns the layer's data render quality.
|
|
6568
|
+
* @see DataQuality
|
|
6569
|
+
*/
|
|
6570
|
+
get quality(): DataQuality;
|
|
6571
|
+
/**
|
|
6572
|
+
* Sets the layer's data render quality.
|
|
6573
|
+
* @see DataQuality
|
|
6574
|
+
*/
|
|
6575
|
+
set quality(value: DataQuality);
|
|
6576
|
+
/**
|
|
6577
|
+
* Creates an instance of TileLayer.
|
|
6578
|
+
* @param id - Unique identifier of the layer.
|
|
6579
|
+
* @param config - Config options for the layer.
|
|
6580
|
+
*/
|
|
6581
|
+
constructor(id: string, { quality, ...config }: Partial<TileLayerConfig>);
|
|
6582
|
+
refresh(clear?: boolean): void;
|
|
6583
|
+
/**
|
|
6584
|
+
* Returns the layer's tile cache so renderers can use it via RenderFrameContext instead of accessing layer.source.tiles.
|
|
6585
|
+
*/
|
|
6586
|
+
getTileCache(): AnyTileCache;
|
|
6587
|
+
/**
|
|
6588
|
+
* Returns the layer's tile dimensions for texture array setup.
|
|
6589
|
+
*/
|
|
6590
|
+
getTileSize(): {
|
|
6591
|
+
width: number;
|
|
6592
|
+
height: number;
|
|
6593
|
+
};
|
|
6594
|
+
/**
|
|
6595
|
+
* Returns the data zoom level used for the specified map zoom level based on the configured `quality` level.
|
|
6596
|
+
* @param zoom - Map zoom level to get the data zoom level for.
|
|
6597
|
+
* @param reduceDataQuality - Whether to reduce the data quality by 1 level.
|
|
6598
|
+
* @returns Data zoom level.
|
|
6599
|
+
*/
|
|
6600
|
+
getDataZoom(zoom?: number, reduceDataQuality?: boolean): number;
|
|
6601
|
+
preloadWorldTile(): void;
|
|
6602
|
+
/**
|
|
6603
|
+
* Returns the tile at the specified geographic coordinate.
|
|
6604
|
+
* @param coord - Geographic coordinate to get the tile for.
|
|
6605
|
+
* @param allowPartials - Whether to allow returning a tile that only partially contains the queried coordinate.
|
|
6606
|
+
* @returns Tile and position within the tile for the specified coordinate.
|
|
6607
|
+
*/
|
|
6608
|
+
protected getTile(coord: Coordinate, zoom?: number, allowPartials?: boolean): {
|
|
6609
|
+
tile: Tile<Data>;
|
|
6610
|
+
position: Point;
|
|
6611
|
+
} | undefined;
|
|
6612
|
+
/**
|
|
6613
|
+
* Returns the visible tile coordinates based on the map's current viewport.
|
|
6614
|
+
* @returns Array of visible tile coordinates.
|
|
6615
|
+
*/
|
|
6616
|
+
getVisibleTileCoords(): Array<TileCoord>;
|
|
6617
|
+
/**
|
|
6618
|
+
* Requests visible tiles from the tile pyramid.
|
|
6619
|
+
* @param reload - Whether to reload tiles that have already been requested.
|
|
6620
|
+
* @returns Promise that resolves when the tiles have been requested.
|
|
6621
|
+
*/
|
|
6622
|
+
private requestVisibleTiles;
|
|
6623
|
+
protected requestTiles(coords: Array<TileCoord>, reload?: boolean): Promise<void>;
|
|
6624
|
+
protected shouldReloadTile(coord: TileCoord): boolean;
|
|
6625
|
+
onAdd(context: Context): void;
|
|
6626
|
+
onMove(): void;
|
|
6627
|
+
onVisible(): void;
|
|
6628
|
+
onHidden(): void;
|
|
6629
|
+
private onDataStale;
|
|
6630
|
+
private onDataChange;
|
|
6631
|
+
private onTileLoad;
|
|
6632
|
+
private onTileError;
|
|
6633
|
+
private onLoadProgress;
|
|
6634
|
+
private onLoadStart;
|
|
6635
|
+
private onLoadComplete;
|
|
6636
|
+
protected onTimeSeriesDataChange(): void;
|
|
6637
|
+
protected onMaskLayerChange(): void;
|
|
6638
|
+
protected onMaskStateChange(): void;
|
|
6639
|
+
}
|
|
6640
|
+
|
|
6641
|
+
/**
|
|
6642
|
+
* Configuration options for a tile-based layer.
|
|
6643
|
+
*/
|
|
6644
|
+
export declare interface TileLayerConfig extends WebGLLayerConfig {
|
|
6645
|
+
/**
|
|
6646
|
+
* Quality to use when rendering data.
|
|
6647
|
+
*/
|
|
6648
|
+
quality: DataQuality;
|
|
6649
|
+
/**
|
|
6650
|
+
* Range of values to use when rendering data.
|
|
6651
|
+
*/
|
|
6652
|
+
dataRange: ValueRange;
|
|
6653
|
+
/**
|
|
6654
|
+
* Offset to apply to the map's zoom level when requesting data from the data source. This is useful to render data
|
|
6655
|
+
* at a different zoom level than the map's zoom level.
|
|
6656
|
+
*/
|
|
6657
|
+
zoomOffset: number;
|
|
6658
|
+
}
|
|
6659
|
+
|
|
6660
|
+
export declare type TilePositionData = {
|
|
6661
|
+
translation: Vector3;
|
|
6662
|
+
scale: Vector3;
|
|
6663
|
+
matrix: Matrix4;
|
|
6664
|
+
};
|
|
6665
|
+
|
|
6315
6666
|
export declare type TileQuadrant = 'tl' | 'tc' | 'tr' | 'ml' | 'mc' | 'mr' | 'bl' | 'bc' | 'br';
|
|
6316
6667
|
|
|
6317
6668
|
/**
|
|
@@ -6350,10 +6701,6 @@ export declare type TileRequestOptions = {
|
|
|
6350
6701
|
* Whether to reload the tile if it has already been loaded.
|
|
6351
6702
|
*/
|
|
6352
6703
|
reload: boolean;
|
|
6353
|
-
/**
|
|
6354
|
-
* Whether to check if the tile is already pending before loading.
|
|
6355
|
-
*/
|
|
6356
|
-
checkPending: boolean;
|
|
6357
6704
|
/**
|
|
6358
6705
|
* The time intervals to load for the tile.
|
|
6359
6706
|
*/
|
|
@@ -6364,10 +6711,45 @@ export declare type TileRequestOptions = {
|
|
|
6364
6711
|
* `TileSource` is an abstract class that provides the primary implementation of a tile-based data source object that
|
|
6365
6712
|
* loads tiles from a remote source. This class is not intended to be used directly, but rather extended by a concrete
|
|
6366
6713
|
* implementation of a tile-based data source.
|
|
6714
|
+
*
|
|
6715
|
+
* @remarks
|
|
6716
|
+
* **Tile loading: two complementary mechanisms**
|
|
6717
|
+
*
|
|
6718
|
+
* Network fetches are orchestrated by {@link TileSource.downloadManager} (`DownloadManager`). `requestTile` may run
|
|
6719
|
+
* decode/parse work after bytes arrive. Understanding these two behaviors avoids duplicate work and stale tiles:
|
|
6720
|
+
*
|
|
6721
|
+
* 1. **Download deduplication** — For a given `TileDownloadTask` key (tile coordinate plus optional interval key from
|
|
6722
|
+
* {@link makeTileKey} / {@link makeTileArrayKey}), the manager ensures at most one in-flight or pending fetch. If
|
|
6723
|
+
* `requestTile` is called again while that task is still pending or in-flight, callers await the **same** promise
|
|
6724
|
+
* instead of starting a second HTTP request. This reduces redundant bandwidth and coordinates multiple callers
|
|
6725
|
+
* (e.g. layers or rapid map updates) that share the exact same request identity.
|
|
6726
|
+
*
|
|
6727
|
+
* 2. **Load generation guard (`tile.requestId` / `task.loadRequestId`)** — Deduping only merges identical
|
|
6728
|
+
* **keys**. It does **not** decide which result is "current" when the logical request for a tile slot changes:
|
|
6729
|
+
* different URL parameters (time, style, reload), a new fetch after a previous task finished, or a slow
|
|
6730
|
+
* {@link parseTile} finishing after a newer `requestTile` has already started. For non-interval loads, each **new**
|
|
6731
|
+
* enqueued download task gets a monotonically increasing id; callers that shared that task share the same id.
|
|
6732
|
+
* After `parseTile` resolves, the result is applied only if that id still matches `tile.requestId` (see
|
|
6733
|
+
* `requestTile` and `loadTile`). Stale completions are dropped so an older response cannot overwrite newer data for
|
|
6734
|
+
* the same tile instance.
|
|
6735
|
+
*
|
|
6736
|
+
* **Interval-based loads** (time-series tiles with multiple intervals on one tile) intentionally skip this per-tile
|
|
6737
|
+
* id guard so a single tile can accumulate multiple interval results; ordering for those paths is handled elsewhere
|
|
6738
|
+
* in the data model.
|
|
6739
|
+
*
|
|
6367
6740
|
* @template Data The type of data stored in a tile.
|
|
6368
6741
|
* @template Source The type of the source specification.
|
|
6369
6742
|
*/
|
|
6370
6743
|
declare abstract class TileSource<Data = any, Source extends TileSourceSpecification = TileSourceSpecification> extends DataSource<Source> {
|
|
6744
|
+
/**
|
|
6745
|
+
* Monotonic counter used when assigning {@link TileDownloadTask.loadRequestId} for non-interval loads. Each new
|
|
6746
|
+
* enqueued download task gets the next id; waiters sharing the same task reuse that id. See class-level docs on
|
|
6747
|
+
* deduplication vs. load-generation guard.
|
|
6748
|
+
*/
|
|
6749
|
+
private _tileLoadRequestId;
|
|
6750
|
+
private _metadataLoadPromise?;
|
|
6751
|
+
private _pendingTaskCountByCoord;
|
|
6752
|
+
private _pendingIntervalsByCoord;
|
|
6371
6753
|
/**
|
|
6372
6754
|
* The minimum zoom level for the source. Defaults to `0`.
|
|
6373
6755
|
*/
|
|
@@ -6431,35 +6813,39 @@ constructor(id: string, spec: Partial<Source>);
|
|
|
6431
6813
|
* @returns The URL for the tile.
|
|
6432
6814
|
*/
|
|
6433
6815
|
getTileUrl(coord: TileCoord, params?: Record<string, any>): string;
|
|
6434
|
-
/**
|
|
6435
|
-
* Returns whether or not the source has a tile for the given tile coordinate.
|
|
6436
|
-
* @param coord - The tile coordinate.
|
|
6437
|
-
* @param layerId -
|
|
6438
|
-
* @returns Whether or not the source has a tile for the given tile coordinate.
|
|
6439
|
-
*/
|
|
6440
|
-
hasTile(coord: TileCoord, layerId?: string): boolean;
|
|
6441
6816
|
/**
|
|
6442
6817
|
* Checks if tile data exists for the given coordinate.
|
|
6818
|
+
* For time-series sources, pass `intervals` to require data for those intervals; otherwise
|
|
6819
|
+
* only the coord is checked and a single cached tile counts as "has data".
|
|
6443
6820
|
* @param coord - The tile coordinate.
|
|
6444
|
-
* @param layerId - Optional layer ID for per-layer data (unused but retained for API compatibility).
|
|
6821
|
+
* @param layerId - Optional layer ID for per-layer data (unused but retained for API compatibility). If provided,
|
|
6822
|
+
* the tile data must have data for the given layer ID. This is only used for vector tile sources.
|
|
6445
6823
|
* @param allowExpired - If true, allows expired tiles to be considered as having data.
|
|
6446
|
-
* @
|
|
6824
|
+
* @param intervals - Optional time intervals (e.g. from request options). When provided, the tile must have
|
|
6825
|
+
* data for all of these intervals (used for time-series / multi-interval requests). The base implementation
|
|
6826
|
+
* only checks for data for the given intervals if the tile data is a time series data object.
|
|
6827
|
+
* @returns Whether tile data exists (optionally including expired/stale and/or for the given intervals).
|
|
6447
6828
|
*/
|
|
6448
|
-
hasTileData(coord: TileCoord, layerId?: string, allowExpired?: boolean): boolean;
|
|
6829
|
+
hasTileData(coord: TileCoord, layerId?: string, allowExpired?: boolean, intervals?: Array<Date>): boolean;
|
|
6449
6830
|
/**
|
|
6450
|
-
* Returns
|
|
6831
|
+
* Returns whether there is already a pending or in-flight request for the given coordinate
|
|
6832
|
+
* (and optionally for the given intervals). Used to avoid duplicate requests when the
|
|
6833
|
+
* same tile+intervals are requested multiple times.
|
|
6451
6834
|
* @param coord - The tile coordinate.
|
|
6452
|
-
* @
|
|
6835
|
+
* @param intervals - Optional time intervals. When provided, only a task for the same coord and
|
|
6836
|
+
* these intervals is considered; when omitted, any task for this coord is considered.
|
|
6837
|
+
* @returns True if a matching request is pending or in-flight.
|
|
6453
6838
|
*/
|
|
6454
|
-
|
|
6839
|
+
isPending(coord: TileCoord, intervals?: Array<Date>): boolean;
|
|
6455
6840
|
getTileDataSize(data?: Data): Size;
|
|
6456
6841
|
/**
|
|
6457
|
-
* Returns whether
|
|
6842
|
+
* Returns whether the source should request a tile.
|
|
6458
6843
|
* @param tile - The tile to check.
|
|
6459
|
-
* @param
|
|
6460
|
-
*
|
|
6844
|
+
* @param options - Optional request options (reload, intervals for time-series, etc.). Subclasses may use
|
|
6845
|
+
* this to request a tile when cached data does not satisfy the request (e.g. missing interval).
|
|
6846
|
+
* @returns Whether the source should request a tile.
|
|
6461
6847
|
*/
|
|
6462
|
-
shouldRequestTile(tile: Tile<Data>, reload?: boolean): boolean;
|
|
6848
|
+
shouldRequestTile(tile: Tile<Data>, reload?: boolean, intervals?: Array<Date>): boolean;
|
|
6463
6849
|
/**
|
|
6464
6850
|
* Reloads all cached tiles.
|
|
6465
6851
|
*/
|
|
@@ -6471,26 +6857,28 @@ constructor(id: string, spec: Partial<Source>);
|
|
|
6471
6857
|
* @returns A promise that resolves with the tile data.
|
|
6472
6858
|
*/
|
|
6473
6859
|
requestTile(coord: TileCoord, options?: Partial<TileRequestOptions>): Promise<Data | null>;
|
|
6474
|
-
|
|
6475
|
-
|
|
6476
|
-
|
|
6477
|
-
|
|
6478
|
-
|
|
6479
|
-
*/
|
|
6480
|
-
protected getOrCreateTile(coord: TileCoord): Tile<Data>;
|
|
6481
|
-
protected loadTile(tile: Tile<Data>, options?: Partial<TileRequestOptions>): Promise<{
|
|
6482
|
-
data: Blob;
|
|
6483
|
-
headers: Headers;
|
|
6860
|
+
protected loadTile(tile: Tile<Data>, options?: Partial<TileRequestOptions>, loadRequestCtx?: {
|
|
6861
|
+
loadRequestId: number;
|
|
6862
|
+
}): Promise<{
|
|
6863
|
+
data: Blob | null;
|
|
6864
|
+
headers: Headers | null;
|
|
6484
6865
|
}>;
|
|
6485
6866
|
getMetadata(options?: Partial<UrlRequestOptions>): Promise<unknown>;
|
|
6486
|
-
|
|
6867
|
+
|
|
6868
|
+
removeConsumer(consumer: DataSourceConsumer): void;
|
|
6487
6869
|
/**
|
|
6488
6870
|
* Aborts a tile request.
|
|
6489
6871
|
* @param tile - The tile to abort.
|
|
6490
6872
|
*/
|
|
6491
6873
|
protected abortTile(tile: Tile<Data>): void;
|
|
6492
|
-
|
|
6493
|
-
|
|
6874
|
+
/**
|
|
6875
|
+
* Aborts in-worker requests for a tile by coordinate (e.g. when tile is no longer visible).
|
|
6876
|
+
* Override in subclasses that run work in a worker (e.g. encoded operation layers).
|
|
6877
|
+
* @param coord - The tile coordinate to abort.
|
|
6878
|
+
*/
|
|
6879
|
+
abortTileByCoord(_coord: TileCoord): void;
|
|
6880
|
+
|
|
6881
|
+
/**
|
|
6494
6882
|
* Cancels all active tile requests.
|
|
6495
6883
|
*/
|
|
6496
6884
|
cancelAllRequests(): void;
|
|
@@ -6633,6 +7021,7 @@ export declare class TimeAnimation extends Animation {
|
|
|
6633
7021
|
private _endDate;
|
|
6634
7022
|
private _endOffset;
|
|
6635
7023
|
private _now;
|
|
7024
|
+
private _rangeChangeAnchorDate?;
|
|
6636
7025
|
constructor({ start, end, alwaysStopAtStart, ...animationOpts }: Partial<TimeAnimationOptions>);
|
|
6637
7026
|
/**
|
|
6638
7027
|
* Sets the start date of the animation using an offset from a reference date.
|
|
@@ -6685,6 +7074,14 @@ export declare class TimeAnimation extends Animation {
|
|
|
6685
7074
|
protected eventPayload(): Record<string, any>;
|
|
6686
7075
|
protected advanceToStopPosition(): void;
|
|
6687
7076
|
private _debouncedRangeChangeEvent;
|
|
7077
|
+
/**
|
|
7078
|
+
* Captures the current date as an anchor date for the range change event.
|
|
7079
|
+
*/
|
|
7080
|
+
private _captureRangeChangeAnchorDate;
|
|
7081
|
+
/**
|
|
7082
|
+
* Restores the anchor date for the range change event.
|
|
7083
|
+
*/
|
|
7084
|
+
private _restoreRangeChangeAnchorDate;
|
|
6688
7085
|
}
|
|
6689
7086
|
|
|
6690
7087
|
export declare type TimeAnimationInfo = {
|
|
@@ -7023,11 +7420,12 @@ export declare const units: {
|
|
|
7023
7420
|
readonly percent: "%";
|
|
7024
7421
|
};
|
|
7025
7422
|
};
|
|
7423
|
+
resolveMeasurementForUnits: (type: _units.ConversionMeasurement) => _units.Measurement;
|
|
7026
7424
|
defaultUnits: Record<"metric" | "imperial", MapUnits>;
|
|
7027
|
-
getDefaultUnit: (type: _units.
|
|
7028
|
-
getDefaultUnitsForSystem: (system: "
|
|
7425
|
+
getDefaultUnit: (type: _units.ConversionMeasurement, system: "metric" | "imperial" | "custom") => string;
|
|
7426
|
+
getDefaultUnitsForSystem: (system: "metric" | "imperial" | "custom") => MapUnits;
|
|
7029
7427
|
equalUnits: (units1: MapUnits, units2: MapUnits) => boolean;
|
|
7030
|
-
getSystemForUnits: (units: MapUnits) => "
|
|
7428
|
+
getSystemForUnits: (units: MapUnits) => "metric" | "imperial" | "custom";
|
|
7031
7429
|
FtoC: (f: number) => number;
|
|
7032
7430
|
CtoF: (c: number) => number;
|
|
7033
7431
|
mphToKph: (mph: number) => number;
|
|
@@ -7059,6 +7457,7 @@ export declare const units: {
|
|
|
7059
7457
|
msToMphUnit: (ms: number) => number;
|
|
7060
7458
|
dbzToMMRate: (dbz: number, perSecond?: boolean) => number;
|
|
7061
7459
|
degToDir: (d: number) => string;
|
|
7460
|
+
getUnitPrecision: (unit: string) => number;
|
|
7062
7461
|
convert: (type: string, value: number, from: string, to: string) => number;
|
|
7063
7462
|
getMeasurementType: (str: string) => _units.Measurement;
|
|
7064
7463
|
};
|
|
@@ -7068,6 +7467,8 @@ declare namespace _units {
|
|
|
7068
7467
|
UnitSystem,
|
|
7069
7468
|
Units,
|
|
7070
7469
|
Measurement,
|
|
7470
|
+
ConversionMeasurement,
|
|
7471
|
+
resolveMeasurementForUnits,
|
|
7071
7472
|
defaultUnits,
|
|
7072
7473
|
getDefaultUnit,
|
|
7073
7474
|
getDefaultUnitsForSystem,
|
|
@@ -7104,6 +7505,7 @@ declare namespace _units {
|
|
|
7104
7505
|
msToMphUnit,
|
|
7105
7506
|
dbzToMMRate,
|
|
7106
7507
|
degToDir,
|
|
7508
|
+
getUnitPrecision,
|
|
7107
7509
|
convert,
|
|
7108
7510
|
getMeasurementType
|
|
7109
7511
|
}
|
|
@@ -7161,6 +7563,9 @@ export declare const VectorSourceType: {
|
|
|
7161
7563
|
|
|
7162
7564
|
export declare type VectorSourceType = ObjectValue<typeof VectorSourceType>;
|
|
7163
7565
|
|
|
7566
|
+
/** Static vector tile data or time-series container for animated vector tiles. */
|
|
7567
|
+
export declare type VectorTileData = VectorData | VectorTimeSeriesData;
|
|
7568
|
+
|
|
7164
7569
|
/**
|
|
7165
7570
|
* A {@link TileSource} for vector tile data.
|
|
7166
7571
|
* Vector tiles are a compact representation of geographic data. They are typically used to render map data in a vector
|
|
@@ -7168,25 +7573,32 @@ export declare type VectorSourceType = ObjectValue<typeof VectorSourceType>;
|
|
|
7168
7573
|
* Vector tiles are typically served as a compressed binary format, such as
|
|
7169
7574
|
* Mapbox's [MVT](https://docs.mapbox.com/vector-tiles/reference/mapbox-vector-tile-spec/).
|
|
7170
7575
|
*/
|
|
7171
|
-
export declare class VectorTileSource extends TileSource<
|
|
7576
|
+
export declare class VectorTileSource extends TileSource<VectorTileData, VectorSourceSpecification> {
|
|
7172
7577
|
|
|
7578
|
+
/**
|
|
7579
|
+
* Tracks deferred tile refresh requests while a tile is still loading.
|
|
7580
|
+
* Map key: tile coord hash.
|
|
7581
|
+
* Map value: layer ids to refresh once parsing completes (`*` means refresh all consumers).
|
|
7582
|
+
*/
|
|
7583
|
+
private readonly _pendingRefreshByTile;
|
|
7173
7584
|
get type(): string;
|
|
7174
7585
|
|
|
7175
7586
|
constructor(id: string, spec: Partial<VectorSourceSpecification>);
|
|
7176
|
-
|
|
7177
|
-
hasTileData(coord: TileCoord, layerId?: string, allowExpired?: boolean): boolean;
|
|
7587
|
+
hasTileData(coord: TileCoord, layerId?: string, allowExpired?: boolean, _intervals?: Array<Date>): boolean;
|
|
7178
7588
|
expireAllTiles(): void;
|
|
7179
|
-
expireTile(tile: Tile<
|
|
7589
|
+
expireTile(tile: Tile<VectorTileData>): void;
|
|
7590
|
+
addConsumer(consumer: DataSourceConsumer): void;
|
|
7180
7591
|
/**
|
|
7181
7592
|
* Refreshes the data for all tiles in the source.
|
|
7593
|
+
* @param layerId - The layer ID to refresh. If not provided, all layers will be refreshed.
|
|
7182
7594
|
*/
|
|
7183
7595
|
refreshAllTileData(layerId?: string): void;
|
|
7184
7596
|
/**
|
|
7185
|
-
* Refreshes the data for a single tile in the source by re-parsing the existing data. This is useful when
|
|
7186
|
-
* filter expression has changed for a consuming layer.
|
|
7597
|
+
* Refreshes the data for a single tile in the source by re-parsing the existing data. This is useful when a new
|
|
7598
|
+
* consumer is added or the filter expression has changed for a consuming layer.
|
|
7187
7599
|
* @param tile - The tile to refresh.
|
|
7188
7600
|
*/
|
|
7189
|
-
refreshTileData(tile: Tile<
|
|
7601
|
+
refreshTileData(tile: Tile<VectorTileData>, layerId?: string): Promise<void>;
|
|
7190
7602
|
|
|
7191
7603
|
}
|
|
7192
7604
|
|
|
@@ -7364,10 +7776,9 @@ export declare type WeatherLayerOptions = {
|
|
|
7364
7776
|
*/
|
|
7365
7777
|
timing: Partial<Omit<LayerTiming, 'mode'>>;
|
|
7366
7778
|
/**
|
|
7367
|
-
* Filter expression
|
|
7368
|
-
* sources whose tiles are in the Mapbox Vector Tile (MVT) format.
|
|
7779
|
+
* Filter expression for vector tile layers. Evaluated with StyleExpression.
|
|
7369
7780
|
*/
|
|
7370
|
-
filter:
|
|
7781
|
+
filter: FilterExpression;
|
|
7371
7782
|
/**
|
|
7372
7783
|
* Paint style overrides for the layer.
|
|
7373
7784
|
*/
|
|
@@ -7377,13 +7788,10 @@ export declare type WeatherLayerOptions = {
|
|
|
7377
7788
|
*/
|
|
7378
7789
|
legend: Partial<LegendOptions> | false;
|
|
7379
7790
|
/**
|
|
7380
|
-
*
|
|
7791
|
+
* The map's live timeline animation instance, used by source generators for both time range
|
|
7792
|
+
* parameters and per-feature animation controllers.
|
|
7381
7793
|
*/
|
|
7382
|
-
timeline:
|
|
7383
|
-
from: Date;
|
|
7384
|
-
to: Date;
|
|
7385
|
-
current: Date;
|
|
7386
|
-
};
|
|
7794
|
+
timeline: TimeAnimation;
|
|
7387
7795
|
/**
|
|
7388
7796
|
* Options for configuring a mask to apply to the layer.
|
|
7389
7797
|
*/
|
|
@@ -7474,6 +7882,8 @@ declare abstract class WebGLLayer<Source extends DataSource = DataSource> extend
|
|
|
7474
7882
|
* Whether to invert the mask layer's output.
|
|
7475
7883
|
*/
|
|
7476
7884
|
invertMaskLayer: boolean;
|
|
7885
|
+
|
|
7886
|
+
private _renderFrameContext;
|
|
7477
7887
|
|
|
7478
7888
|
/**
|
|
7479
7889
|
* Returns the render paint style configuration for this layer.
|
|
@@ -7513,7 +7923,14 @@ get mask(): LayerMask;
|
|
|
7513
7923
|
* @readonly
|
|
7514
7924
|
*/
|
|
7515
7925
|
get isDirty(): boolean;
|
|
7516
|
-
|
|
7926
|
+
/**
|
|
7927
|
+
* Optional measurement metadata associated with this layer's values.
|
|
7928
|
+
*/
|
|
7929
|
+
measurement: {
|
|
7930
|
+
type: ConversionMeasurement;
|
|
7931
|
+
units: string;
|
|
7932
|
+
} | undefined;
|
|
7933
|
+
constructor(id: string, { source, renderer, measurement }: Partial<WebGLLayerConfig>);
|
|
7517
7934
|
/**
|
|
7518
7935
|
* Shows the layer if it is hidden.
|
|
7519
7936
|
*/
|
|
@@ -7542,9 +7959,11 @@ get mask(): LayerMask;
|
|
|
7542
7959
|
* GeoJSON layer style will return the model properties associated with the feature at that location.
|
|
7543
7960
|
* @param coord - Geographic coordinate to query for features.
|
|
7544
7961
|
* @param zoom - Zoom level to query for features. If not provided, the map's current zoom level will be used.
|
|
7962
|
+
* @param allowPartials - Whether to use partial data (ancestor or descendant) if the exact tile is not loaded.
|
|
7963
|
+
* @param requestIfMissing - Whether to request the tile if it is missing.
|
|
7545
7964
|
* @returns The features found at the specified coordinate and zoom level.
|
|
7546
7965
|
*/
|
|
7547
|
-
queryFeatures(coord: Coordinate, zoom: number, allowPartials: boolean): FeatureQueryResult;
|
|
7966
|
+
queryFeatures(coord: Coordinate, zoom: number, allowPartials: boolean, requestIfMissing?: boolean): FeatureQueryResult;
|
|
7548
7967
|
/**
|
|
7549
7968
|
* Returns a Promise that will query the layer for all features at the specified coordinate and zoom level
|
|
7550
7969
|
* (optional). If a value for `zoom` is not provided, then the map's current zoom level will be used.
|
|
@@ -7605,5 +8024,12 @@ export declare interface WebGLLayerConfig {
|
|
|
7605
8024
|
* Animation instance that controls the animation of this layer if time-based.
|
|
7606
8025
|
*/
|
|
7607
8026
|
animation: Animation;
|
|
8027
|
+
/**
|
|
8028
|
+
* Optional measurement metadata associated with this layer's values.
|
|
8029
|
+
*/
|
|
8030
|
+
measurement: {
|
|
8031
|
+
type: ConversionMeasurement;
|
|
8032
|
+
units: string;
|
|
8033
|
+
};
|
|
7608
8034
|
}
|
|
7609
8035
|
|