@xweather/mapsgl 1.9.4 → 1.10.0-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 +1318 -237
- package/dist/mapsgl.js +3 -11
- package/package.json +1 -1
package/dist/mapsgl.d.ts
CHANGED
|
@@ -306,6 +306,10 @@ export declare const getPageLoadPromise: () => Promise<any>;
|
|
|
306
306
|
|
|
307
307
|
export declare const getPixelRatio: (gl: any) => number;
|
|
308
308
|
|
|
309
|
+
/**
|
|
310
|
+
* Extract `#define SHADER_NAME name` from GLSL source, if present.
|
|
311
|
+
* Returns an empty string when the define is missing so callers can supply their own label.
|
|
312
|
+
*/
|
|
309
313
|
export declare const getShaderName: (shader: string) => string;
|
|
310
314
|
|
|
311
315
|
export declare const getShaderTypeName: (gl: any, type: number) => string;
|
|
@@ -894,6 +898,7 @@ export declare type WebGLContext = WebGLRenderingContext | WebGL2RenderingContex
|
|
|
894
898
|
/// <reference types="leaflet" />
|
|
895
899
|
/// <reference types="mapbox-gl" />
|
|
896
900
|
/// <reference types="maplibre-gl" />
|
|
901
|
+
/// <reference types="types/marchingsquares" />
|
|
897
902
|
|
|
898
903
|
/**
|
|
899
904
|
* An `Account` object is responsible for managing the client id and secret as well as permissions for an Xweather
|
|
@@ -1211,6 +1216,8 @@ export declare type AnyAuthenticator = Authenticator<any>;
|
|
|
1211
1216
|
export declare type AnyMapController = MapController<any>;
|
|
1212
1217
|
|
|
1213
1218
|
export declare type AnyTileCache = TileCache<any>;
|
|
1219
|
+
|
|
1220
|
+
export declare type AnyTileRenderable = TileRenderable<any>;
|
|
1214
1221
|
|
|
1215
1222
|
/**
|
|
1216
1223
|
* An enumerated value representing an API endpoint action.
|
|
@@ -1565,7 +1572,7 @@ export declare class ApiResult {
|
|
|
1565
1572
|
*/
|
|
1566
1573
|
headers(): Record<string, string> | undefined;
|
|
1567
1574
|
}
|
|
1568
|
-
|
|
1575
|
+
|
|
1569
1576
|
/**
|
|
1570
1577
|
* An interface that describes an object that performs server authentication using a session token or
|
|
1571
1578
|
* other means.
|
|
@@ -1612,6 +1619,11 @@ export declare interface BarLegendOptions {
|
|
|
1612
1619
|
* The measurement units.
|
|
1613
1620
|
*/
|
|
1614
1621
|
units: string;
|
|
1622
|
+
/**
|
|
1623
|
+
* When `true`, the legend always displays in its own {@link units}, ignoring the map's unit
|
|
1624
|
+
* state for this {@link type}. See `weather-spec`'s `LegendMeasurementSpec` for the rationale.
|
|
1625
|
+
*/
|
|
1626
|
+
fixed?: boolean;
|
|
1615
1627
|
/**
|
|
1616
1628
|
* A function that converts a value to another unit.
|
|
1617
1629
|
*/
|
|
@@ -1679,14 +1691,27 @@ export declare interface BarLegendOptions {
|
|
|
1679
1691
|
allowOverlap: boolean;
|
|
1680
1692
|
}>;
|
|
1681
1693
|
}
|
|
1682
|
-
|
|
1694
|
+
|
|
1683
1695
|
export declare type BBox = {
|
|
1684
1696
|
minX: number;
|
|
1685
1697
|
minY: number;
|
|
1686
1698
|
maxX: number;
|
|
1687
1699
|
maxY: number;
|
|
1688
1700
|
};
|
|
1701
|
+
|
|
1702
|
+
export declare interface Bindable {
|
|
1703
|
+
bind(target?: GLenum): void;
|
|
1704
|
+
unbind(target?: GLenum): void;
|
|
1705
|
+
}
|
|
1689
1706
|
|
|
1707
|
+
declare enum Blending {
|
|
1708
|
+
None = 0,
|
|
1709
|
+
Normal = 1,
|
|
1710
|
+
Additive = 2,
|
|
1711
|
+
Subtractive = 3,
|
|
1712
|
+
Multiply = 4
|
|
1713
|
+
}
|
|
1714
|
+
|
|
1690
1715
|
export declare class Bounds {
|
|
1691
1716
|
left: number;
|
|
1692
1717
|
right: number;
|
|
@@ -1697,6 +1722,74 @@ export declare class Bounds {
|
|
|
1697
1722
|
constructor(left: number, right: number, top: number, bottom: number);
|
|
1698
1723
|
}
|
|
1699
1724
|
|
|
1725
|
+
/** Built-in slot identifiers (bottom → top order). */
|
|
1726
|
+
export declare const BuiltinSlot: {
|
|
1727
|
+
/**
|
|
1728
|
+
* Under-basemap band (default: below admin boundaries): raster/sample/heatmap
|
|
1729
|
+
* plus polygon fills, stacked by {@link BuiltinStackRank}.
|
|
1730
|
+
*/
|
|
1731
|
+
readonly underlay: "underlay";
|
|
1732
|
+
/**
|
|
1733
|
+
* Mid-map band: particles plus lines, circles, symbols, contours, and other
|
|
1734
|
+
* non-fill marks. Ordered within the slot by {@link BuiltinStackRank}
|
|
1735
|
+
* (particles below contour/line/symbol).
|
|
1736
|
+
*/
|
|
1737
|
+
readonly inlay: "inlay";
|
|
1738
|
+
readonly text: "text";
|
|
1739
|
+
/**
|
|
1740
|
+
* Topmost MapsGL band: day/night chrome, debug, and other always-on-top content.
|
|
1741
|
+
* Symmetric with {@link BuiltinSlot.underlay}.
|
|
1742
|
+
*/
|
|
1743
|
+
readonly overlay: "overlay";
|
|
1744
|
+
};
|
|
1745
|
+
|
|
1746
|
+
export declare type BuiltinSlot = ObjectValue<typeof BuiltinSlot>;
|
|
1747
|
+
|
|
1748
|
+
/**
|
|
1749
|
+
* Built-in within-slot stack ranks (higher = above within the same slot).
|
|
1750
|
+
* Used when no explicit `stackRank` / code override is provided.
|
|
1751
|
+
*
|
|
1752
|
+
* Global top → bottom (also safe if every layer shares one slot):
|
|
1753
|
+
* overlay → text → symbol → circle → line → contour → particle →
|
|
1754
|
+
* radar → satellite → fill → precip → default.
|
|
1755
|
+
*/
|
|
1756
|
+
export declare const BuiltinStackRank: {
|
|
1757
|
+
readonly default: 0;
|
|
1758
|
+
/**
|
|
1759
|
+
* Precip / frozen-precip sample rasters (`precip-*`, `snow-*`, `sleet-*`, `ice-*`).
|
|
1760
|
+
* Above generic samples, below polygon fills.
|
|
1761
|
+
*/
|
|
1762
|
+
readonly precip: 50;
|
|
1763
|
+
/** Polygon fills — above precip/generic samples, below satellite/radar. */
|
|
1764
|
+
readonly fill: 100;
|
|
1765
|
+
readonly satellite: 200;
|
|
1766
|
+
readonly radar: 300;
|
|
1767
|
+
readonly boundaries: 350;
|
|
1768
|
+
/** Particle fields — above underlay products, below contour/line/symbol. */
|
|
1769
|
+
readonly particle: 400;
|
|
1770
|
+
readonly contour: 500;
|
|
1771
|
+
readonly line: 600;
|
|
1772
|
+
readonly circle: 700;
|
|
1773
|
+
readonly symbol: 800;
|
|
1774
|
+
readonly text: 900;
|
|
1775
|
+
/** Day/night and similar chrome — topmost among built-in ranks. */
|
|
1776
|
+
readonly overlay: 1000;
|
|
1777
|
+
};
|
|
1778
|
+
|
|
1779
|
+
export declare interface CameraOpts {
|
|
1780
|
+
fov?: number;
|
|
1781
|
+
aspect?: number;
|
|
1782
|
+
near?: number;
|
|
1783
|
+
far?: number;
|
|
1784
|
+
bounds?: ViewBounds;
|
|
1785
|
+
zoom?: number;
|
|
1786
|
+
}
|
|
1787
|
+
|
|
1788
|
+
declare enum CameraType {
|
|
1789
|
+
orthographic = 0,
|
|
1790
|
+
perspective = 1
|
|
1791
|
+
}
|
|
1792
|
+
|
|
1700
1793
|
/**
|
|
1701
1794
|
* Circle style properties control how circles get rendered on a map. Use these properties in conjunction with `fill`
|
|
1702
1795
|
* and `stroke` to define the style for a circle layer.
|
|
@@ -1708,6 +1801,47 @@ export declare interface CircleStyleSpec {
|
|
|
1708
1801
|
radius: StyleValue<number>;
|
|
1709
1802
|
}
|
|
1710
1803
|
|
|
1804
|
+
/**
|
|
1805
|
+
* A utility class for creating and representing a color.
|
|
1806
|
+
*/
|
|
1807
|
+
export declare class Color {
|
|
1808
|
+
/**
|
|
1809
|
+
* Red channel as a normalized value between 0 and 1. Default is 0.
|
|
1810
|
+
*/
|
|
1811
|
+
r: number;
|
|
1812
|
+
/**
|
|
1813
|
+
* Green channel value normalized between 0 and 1. Defautl value is 1.
|
|
1814
|
+
*/
|
|
1815
|
+
g: number;
|
|
1816
|
+
b: number;
|
|
1817
|
+
a: number;
|
|
1818
|
+
/**
|
|
1819
|
+
* @param r - If arguments `g` and `b` are defined, then the red component of the color. Otherwise, it can be
|
|
1820
|
+
* a single hexadecimal triplet, a CSS-style color string, a valid X11 color name or a single number applied to all
|
|
1821
|
+
* color components.
|
|
1822
|
+
* @param g - The green component of the color.
|
|
1823
|
+
* @param b - The blue component of the color.
|
|
1824
|
+
* @param a - The alpha component of the color.
|
|
1825
|
+
*/
|
|
1826
|
+
constructor(r?: any, g?: number, b?: number, a?: number);
|
|
1827
|
+
fromHex(hex: string | number): Color;
|
|
1828
|
+
fromHSL(h: number, s: number | string, l: number | string, a?: number): Color;
|
|
1829
|
+
fromHSV(h: number, s: number | string, v: number | string, a?: number): Color;
|
|
1830
|
+
setRGB(r: number, g: number, b: number): Color;
|
|
1831
|
+
setRGBA(r: number, g: number, b: number, a: number, normalized?: boolean): Color;
|
|
1832
|
+
setAlpha(a: number): Color;
|
|
1833
|
+
lighter(percent: number): Color;
|
|
1834
|
+
darker(percent: number): Color;
|
|
1835
|
+
equals(c: Color): boolean;
|
|
1836
|
+
toHex(): string;
|
|
1837
|
+
toHSL(): HSL;
|
|
1838
|
+
toHSV(): HSV;
|
|
1839
|
+
toObject(normalized?: boolean): RGB;
|
|
1840
|
+
toArray(): number[];
|
|
1841
|
+
toVector(): Vector4;
|
|
1842
|
+
toString(): string;
|
|
1843
|
+
}
|
|
1844
|
+
|
|
1711
1845
|
export declare type ColorBand = typeof SupportedColorBands[number];
|
|
1712
1846
|
|
|
1713
1847
|
/**
|
|
@@ -1895,7 +2029,7 @@ export declare interface ControlStore {
|
|
|
1895
2029
|
dataInspector: DataInspectorControl;
|
|
1896
2030
|
}
|
|
1897
2031
|
|
|
1898
|
-
export declare type ConversionMeasurement = Measurement
|
|
2032
|
+
export declare type ConversionMeasurement = Measurement;
|
|
1899
2033
|
|
|
1900
2034
|
declare const convert: (type: ConversionMeasurement | string, value: number, from: string, to: string) => number;
|
|
1901
2035
|
|
|
@@ -1915,7 +2049,7 @@ export declare type CoordinateBounds = {
|
|
|
1915
2049
|
};
|
|
1916
2050
|
|
|
1917
2051
|
export declare type CrossTileID = string;
|
|
1918
|
-
|
|
2052
|
+
|
|
1919
2053
|
declare const CtoF: (c: number) => number;
|
|
1920
2054
|
|
|
1921
2055
|
declare const CtoFUnit: (c: number) => number;
|
|
@@ -1923,10 +2057,19 @@ declare const CtoFUnit: (c: number) => number;
|
|
|
1923
2057
|
export declare class DataDrivenStyleValue<T> extends StyleValue_2<T> {
|
|
1924
2058
|
}
|
|
1925
2059
|
|
|
2060
|
+
/**
|
|
2061
|
+
* Data-inspector evaluator. `fn` may return plain text or an HTML fragment string; rich markup
|
|
2062
|
+
* should use the shared helpers in `control/inspector/markup.ts`. Display units come from the
|
|
2063
|
+
* map controller's current `MapUnits` preference (second argument). Optional `EvaluatorContext`
|
|
2064
|
+
* exposes layer paint for paint-driven colors (badges, etc.).
|
|
2065
|
+
*/
|
|
1926
2066
|
export declare interface DataEvaluator {
|
|
1927
2067
|
title: string | ((data: FeatureQueryResult) => string);
|
|
2068
|
+
/**
|
|
2069
|
+
* @deprecated Rows are no longer deduplicated by title. Kept for API compatibility.
|
|
2070
|
+
*/
|
|
1928
2071
|
alwaysShow?: boolean;
|
|
1929
|
-
fn: (data: FeatureQueryResult) => string;
|
|
2072
|
+
fn: (data: FeatureQueryResult, units: MapUnits, context?: EvaluatorContext) => string;
|
|
1930
2073
|
}
|
|
1931
2074
|
|
|
1932
2075
|
export declare class DataInspector {
|
|
@@ -1944,6 +2087,7 @@ export declare class DataInspectorControl {
|
|
|
1944
2087
|
private _position;
|
|
1945
2088
|
private _coord;
|
|
1946
2089
|
private _enabled;
|
|
2090
|
+
private _boundUnitsChange;
|
|
1947
2091
|
get isEnabled(): boolean;
|
|
1948
2092
|
constructor(inspector: DataInspector, options?: Partial<DataInspectorControlOptions>);
|
|
1949
2093
|
addTo(target: HTMLElement | string): void;
|
|
@@ -1961,15 +2105,28 @@ export declare class DataInspectorControl {
|
|
|
1961
2105
|
_queryFeatures: (coord: Coordinate) => void;
|
|
1962
2106
|
_queryFeaturesAsync: (coord: Coordinate) => Promise<void>;
|
|
1963
2107
|
_setFeatures(coord: Coordinate, features: Record<string, FeatureQueryResult>): void;
|
|
2108
|
+
private _bindUnitsChange;
|
|
2109
|
+
private _unbindUnitsChange;
|
|
2110
|
+
private _handleUnitsChange;
|
|
1964
2111
|
}
|
|
1965
2112
|
|
|
1966
2113
|
export declare interface DataInspectorControlOptions {
|
|
1967
2114
|
event: 'click' | 'move';
|
|
1968
2115
|
stream: boolean;
|
|
1969
2116
|
showCoordinates: boolean;
|
|
2117
|
+
/**
|
|
2118
|
+
* Row layout mode:
|
|
2119
|
+
* - `auto` — side-by-side title|value for compact one-liners (scalars, badge-only,
|
|
2120
|
+
* badge + inline value like radar); title above value for multi-line/block content
|
|
2121
|
+
* (alerts, multi-source stats, tropical stacks, progress, …)
|
|
2122
|
+
* - `stacked` — title above value for every row
|
|
2123
|
+
*/
|
|
2124
|
+
layout: DataInspectorLayout;
|
|
1970
2125
|
tooltip: any;
|
|
1971
2126
|
}
|
|
1972
2127
|
|
|
2128
|
+
export declare type DataInspectorLayout = 'auto' | 'stacked';
|
|
2129
|
+
|
|
1973
2130
|
/**
|
|
1974
2131
|
* Determines the quality of the data when rendered.
|
|
1975
2132
|
*/
|
|
@@ -2085,10 +2242,21 @@ export declare const DataSourceType: {
|
|
|
2085
2242
|
readonly geojson: "geojson";
|
|
2086
2243
|
readonly encoded: "encoded";
|
|
2087
2244
|
readonly debug: "debug";
|
|
2245
|
+
/** A source that never fetches — used by source-less layers (coverage masks, debug). */
|
|
2246
|
+
readonly noop: "noop";
|
|
2088
2247
|
};
|
|
2089
2248
|
|
|
2090
2249
|
export declare type DataSourceType = ObjectValue<typeof DataSourceType>;
|
|
2091
|
-
|
|
2250
|
+
|
|
2251
|
+
export declare interface DayNightOverlayOptions {
|
|
2252
|
+
/**
|
|
2253
|
+
* Overall opacity of the day/night overlay in the range `[0, 1]`.
|
|
2254
|
+
* Multiplies with the twilight fill alpha so stacked bands still deepen toward night.
|
|
2255
|
+
* Defaults to `1`.
|
|
2256
|
+
*/
|
|
2257
|
+
opacity?: number;
|
|
2258
|
+
}
|
|
2259
|
+
|
|
2092
2260
|
declare const dbzToMMRate: (dbz: number, perSecond?: boolean) => number;
|
|
2093
2261
|
|
|
2094
2262
|
declare const defaultUnits: Record<Exclude<UnitSystem, 'custom'>, MapUnits>;
|
|
@@ -2403,6 +2571,8 @@ export declare interface EncodedRasterDataset {
|
|
|
2403
2571
|
dataMax: number;
|
|
2404
2572
|
/**
|
|
2405
2573
|
* The no data value for the dataset.
|
|
2574
|
+
* For multi-band packs of the same id, only the primary band should define this; decode/skip
|
|
2575
|
+
* key off that band while later bands use the full 0…255 range.
|
|
2406
2576
|
*/
|
|
2407
2577
|
noData: number;
|
|
2408
2578
|
/**
|
|
@@ -2460,6 +2630,29 @@ export declare interface EncodedSourceSpecification<Dataset extends EncodedRaste
|
|
|
2460
2630
|
* @deprecated Use `transformerId` instead to reference a registered transformer by ID.
|
|
2461
2631
|
*/
|
|
2462
2632
|
transformTileData?: (data: RGBAImage, datasets: Array<Dataset>) => void;
|
|
2633
|
+
/**
|
|
2634
|
+
* Number of pixels to dilate (extend) valid data outward past nodata boundaries when a tile is
|
|
2635
|
+
* decoded. Defaults to `0` (disabled).
|
|
2636
|
+
*
|
|
2637
|
+
* Regional models are resampled into tiles with large nodata areas outside their coverage,
|
|
2638
|
+
* producing a jagged data edge. Dilating the decoded tile a few pixels lets the renderer's
|
|
2639
|
+
* normal nodata edge handling and a coverage {@link WebGLLayer.mask | mask} produce a clean
|
|
2640
|
+
* edge. Uses the first dataset's `noData` value and `band`.
|
|
2641
|
+
*
|
|
2642
|
+
* Note: this mutates the decoded tile data, so value lookups just outside the original coverage
|
|
2643
|
+
* will return the filled (extended) values rather than nodata.
|
|
2644
|
+
*/
|
|
2645
|
+
edgeDilate?: number;
|
|
2646
|
+
/**
|
|
2647
|
+
* Whether to recompute {@link edgeDilate | edge dilation} when a neighbouring tile backfills this
|
|
2648
|
+
* tile's edge padding. Defaults to `false`.
|
|
2649
|
+
*
|
|
2650
|
+
* Enabling this extends dilated data across tile seams that coincide with the model's coverage
|
|
2651
|
+
* boundary, but it can make interior tile seams visible (which edge backfilling otherwise
|
|
2652
|
+
* prevents) and introduce edge artifacts, so it is opt-in. Only affects the decode-time dilation
|
|
2653
|
+
* along seams; the initial dilation is unaffected.
|
|
2654
|
+
*/
|
|
2655
|
+
edgeDilateBackfill?: boolean;
|
|
2463
2656
|
}
|
|
2464
2657
|
|
|
2465
2658
|
/**
|
|
@@ -2508,10 +2701,77 @@ protected onLoadProgress(e: any): void;
|
|
|
2508
2701
|
declare const equalUnits: (units1: MapUnits, units2: MapUnits) => boolean;
|
|
2509
2702
|
|
|
2510
2703
|
/**
|
|
2511
|
-
*
|
|
2512
|
-
*
|
|
2704
|
+
* Euler angles describe a rotational transformation by rotating an object on its various axes in
|
|
2705
|
+
* specified amounts per axis, and a specified axis order. Euler angles consist of three
|
|
2706
|
+
* components: roll, pitch and yaw angles.
|
|
2707
|
+
* @see https://en.wikipedia.org/wiki/Euler%27s_rotation_theorem
|
|
2708
|
+
*/
|
|
2709
|
+
export declare class Euler {
|
|
2710
|
+
|
|
2711
|
+
get x(): number;
|
|
2712
|
+
set x(value: number);
|
|
2713
|
+
get y(): number;
|
|
2714
|
+
set y(value: number);
|
|
2715
|
+
get z(): number;
|
|
2716
|
+
set z(value: number);
|
|
2717
|
+
get order(): number;
|
|
2718
|
+
set order(value: number);
|
|
2719
|
+
get roll(): number;
|
|
2720
|
+
set roll(value: number);
|
|
2721
|
+
get pitch(): number;
|
|
2722
|
+
set pitch(value: number);
|
|
2723
|
+
get yaw(): number;
|
|
2724
|
+
set yaw(value: number);
|
|
2725
|
+
get value(): vec4;
|
|
2726
|
+
get elements(): number;
|
|
2727
|
+
constructor(x?: number, y?: number, z?: number, order?: number);
|
|
2728
|
+
fromArray(array: number[], offset?: number): Euler;
|
|
2729
|
+
toArray(array?: number[], offset?: number): number[];
|
|
2730
|
+
fromObject({ x, y, z, order }: {
|
|
2731
|
+
x: number;
|
|
2732
|
+
y: number;
|
|
2733
|
+
z: number;
|
|
2734
|
+
order: number;
|
|
2735
|
+
}): Euler;
|
|
2736
|
+
toObject(): {
|
|
2737
|
+
x: number;
|
|
2738
|
+
y: number;
|
|
2739
|
+
z: number;
|
|
2740
|
+
order: number;
|
|
2741
|
+
};
|
|
2742
|
+
fromRotationMatrix(m: Matrix4, order?: EulerOrder): Euler;
|
|
2743
|
+
fromQuaternion(q: Quaternion): Euler;
|
|
2744
|
+
toQuaternion(): Quaternion;
|
|
2745
|
+
fromVector3(v: Vector3, order?: EulerOrder): Euler;
|
|
2746
|
+
toVector3(): Vector3;
|
|
2747
|
+
set(x: number, y: number, z: number, order?: EulerOrder): Euler;
|
|
2748
|
+
clone(): Euler;
|
|
2749
|
+
copy(e: Euler): Euler;
|
|
2750
|
+
equals(e: Euler): boolean;
|
|
2751
|
+
|
|
2752
|
+
}
|
|
2753
|
+
|
|
2754
|
+
/**
|
|
2755
|
+
* The order of the Euler angles.
|
|
2756
|
+
*/
|
|
2757
|
+
declare enum EulerOrder {
|
|
2758
|
+
ZYX = 0,
|
|
2759
|
+
YXZ = 1,
|
|
2760
|
+
XZY = 2,
|
|
2761
|
+
ZXY = 3,
|
|
2762
|
+
YZX = 4,
|
|
2763
|
+
XYZ = 5,
|
|
2764
|
+
RollPitchYaw = 0
|
|
2765
|
+
}
|
|
2766
|
+
|
|
2767
|
+
/**
|
|
2768
|
+
* Optional context passed to data-inspector evaluators so they can resolve paint-driven
|
|
2769
|
+
* colors (and similar layer state) without hardcoding layer-specific lookups.
|
|
2513
2770
|
*/
|
|
2514
|
-
export declare type
|
|
2771
|
+
export declare type EvaluatorContext = {
|
|
2772
|
+
layerId?: string;
|
|
2773
|
+
paint?: PaintStyle;
|
|
2774
|
+
};
|
|
2515
2775
|
|
|
2516
2776
|
/**
|
|
2517
2777
|
* Mapbox-style expression array, e.g. ['get', 'opacity'] or ['*', ['get', 'x'], 2].
|
|
@@ -2560,97 +2820,15 @@ export declare interface ExpressionOperation {
|
|
|
2560
2820
|
*/
|
|
2561
2821
|
chunk: string;
|
|
2562
2822
|
}
|
|
2563
|
-
|
|
2564
|
-
/**
|
|
2565
|
-
* Supported expression operator names (first element of an expression array).
|
|
2566
|
-
* @see evaluateExpression
|
|
2567
|
-
*/
|
|
2568
|
-
declare const ExpressionOperator: {
|
|
2569
|
-
readonly literal: "literal";
|
|
2570
|
-
readonly get: "get";
|
|
2571
|
-
readonly has: "has";
|
|
2572
|
-
readonly var: "var";
|
|
2573
|
-
readonly properties: "properties";
|
|
2574
|
-
readonly zoom: "zoom";
|
|
2575
|
-
readonly coalesce: "coalesce";
|
|
2576
|
-
readonly eq: "==";
|
|
2577
|
-
readonly neq: "!=";
|
|
2578
|
-
readonly lt: "<";
|
|
2579
|
-
readonly lte: "<=";
|
|
2580
|
-
readonly gt: ">";
|
|
2581
|
-
readonly gte: ">=";
|
|
2582
|
-
readonly not: "!";
|
|
2583
|
-
readonly all: "all";
|
|
2584
|
-
readonly any: "any";
|
|
2585
|
-
readonly toNumber: "to-number";
|
|
2586
|
-
readonly toString: "to-string";
|
|
2587
|
-
readonly toDate: "to-date";
|
|
2588
|
-
readonly toLocaleString: "to-locale-string";
|
|
2589
|
-
readonly toUnit: "to-unit";
|
|
2590
|
-
readonly toBoolean: "to-boolean";
|
|
2591
|
-
readonly typeOf: "typeof";
|
|
2592
|
-
readonly number: "number";
|
|
2593
|
-
readonly string: "string";
|
|
2594
|
-
readonly boolean: "boolean";
|
|
2595
|
-
readonly object: "object";
|
|
2596
|
-
readonly add: "+";
|
|
2597
|
-
readonly subtract: "-";
|
|
2598
|
-
readonly mod: "%";
|
|
2599
|
-
readonly pow: "^";
|
|
2600
|
-
readonly multiply: "*";
|
|
2601
|
-
readonly divide: "/";
|
|
2602
|
-
readonly abs: "abs";
|
|
2603
|
-
readonly ceil: "ceil";
|
|
2604
|
-
readonly floor: "floor";
|
|
2605
|
-
readonly round: "round";
|
|
2606
|
-
readonly min: "min";
|
|
2607
|
-
readonly max: "max";
|
|
2608
|
-
readonly sqrt: "sqrt";
|
|
2609
|
-
readonly ln: "ln";
|
|
2610
|
-
readonly ln2: "ln2";
|
|
2611
|
-
readonly log2: "log2";
|
|
2612
|
-
readonly log10: "log10";
|
|
2613
|
-
readonly sin: "sin";
|
|
2614
|
-
readonly cos: "cos";
|
|
2615
|
-
readonly tan: "tan";
|
|
2616
|
-
readonly asin: "asin";
|
|
2617
|
-
readonly acos: "acos";
|
|
2618
|
-
readonly atan: "atan";
|
|
2619
|
-
readonly e: "e";
|
|
2620
|
-
readonly pi: "pi";
|
|
2621
|
-
readonly at: "at";
|
|
2622
|
-
readonly in: "in";
|
|
2623
|
-
readonly regex: "regex";
|
|
2624
|
-
readonly indexOf: "index-of";
|
|
2625
|
-
readonly length: "length";
|
|
2626
|
-
readonly slice: "slice";
|
|
2627
|
-
readonly concat: "concat";
|
|
2628
|
-
readonly downcase: "downcase";
|
|
2629
|
-
readonly upcase: "upcase";
|
|
2630
|
-
readonly step: "step";
|
|
2631
|
-
readonly interpolate: "interpolate";
|
|
2632
|
-
readonly case: "case";
|
|
2633
|
-
readonly match: "match";
|
|
2634
|
-
readonly let: "let";
|
|
2635
|
-
/**
|
|
2636
|
-
* Active map timeline position as **Unix seconds** (from the map controller), not wall clock — use `now` for that.
|
|
2637
|
-
*/
|
|
2638
|
-
readonly mapTime: "map-time";
|
|
2639
|
-
/**
|
|
2640
|
-
* @deprecated Prefer `map-time` — same semantics.
|
|
2641
|
-
*/
|
|
2642
|
-
readonly time: "time";
|
|
2643
|
-
readonly now: "now";
|
|
2644
|
-
};
|
|
2645
|
-
|
|
2646
|
-
export declare type ExpressionOperator = ObjectValue<typeof ExpressionOperator>;
|
|
2647
|
-
|
|
2648
|
-
/** Value that can appear as an expression or as an argument (literal or nested expression). */
|
|
2649
|
-
export declare type ExpressionValue = string | number | boolean | null | object | Expression;
|
|
2650
2823
|
|
|
2651
2824
|
export declare type FeatureQueryResult = {
|
|
2652
2825
|
value: number;
|
|
2653
2826
|
angle?: number;
|
|
2827
|
+
/**
|
|
2828
|
+
* Optional discrete sample flag (e.g. radar `PTYPESMPL`: 1 = rain, 2 = snow, 3 = mix).
|
|
2829
|
+
* Present when the queried layer encodes a categorical band alongside the scalar value.
|
|
2830
|
+
*/
|
|
2831
|
+
flag?: number;
|
|
2654
2832
|
unit?: string;
|
|
2655
2833
|
features?: Array<FeatureData>;
|
|
2656
2834
|
nodata: boolean;
|
|
@@ -2697,13 +2875,65 @@ export declare interface FillStyleSpec {
|
|
|
2697
2875
|
}
|
|
2698
2876
|
|
|
2699
2877
|
/**
|
|
2700
|
-
*
|
|
2701
|
-
*
|
|
2702
|
-
*
|
|
2703
|
-
|
|
2878
|
+
* Bottom-most (lowest in the style stack) admin boundary layer id from a Mapbox/MapLibre
|
|
2879
|
+
* style `layers` array. Style order is bottom → top, so the first matching layer is returned.
|
|
2880
|
+
* Used as the default ceiling for the MapsGL `underlay` slot when no explicit `beforeId` is set.
|
|
2881
|
+
*/
|
|
2882
|
+
export declare const findBottomMostAdminBoundaryLayerId: (layers: ReadonlyArray<StyleLayerRef> | null | undefined, excludeIds?: ReadonlySet<string>) => string | undefined;
|
|
2883
|
+
|
|
2884
|
+
/**
|
|
2885
|
+
* A set of font specifications and character metrics used for laying out text for rendering. This information is
|
|
2886
|
+
* automatically generated using the `msdf-bmfont` tool from the `msdf-bmfont-xml` package from a TTF font file:
|
|
2887
|
+
* https://github.com/soimy/msdf-bmfont-xml
|
|
2704
2888
|
*/
|
|
2705
|
-
export declare type
|
|
2889
|
+
export declare type FontLayoutSpec = {
|
|
2890
|
+
pages: Array<string>;
|
|
2891
|
+
chars: Array<TextMetrics_2>;
|
|
2892
|
+
info: {
|
|
2893
|
+
face: string;
|
|
2894
|
+
size: number;
|
|
2895
|
+
bold: number;
|
|
2896
|
+
italic: number;
|
|
2897
|
+
charset: Array<string>;
|
|
2898
|
+
unicode: number;
|
|
2899
|
+
stretchH: number;
|
|
2900
|
+
smooth: number;
|
|
2901
|
+
aa: number;
|
|
2902
|
+
padding: [number, number, number, number];
|
|
2903
|
+
spacing: [number, number];
|
|
2904
|
+
outline: number;
|
|
2905
|
+
};
|
|
2906
|
+
common: {
|
|
2907
|
+
lineHeight: number;
|
|
2908
|
+
base: number;
|
|
2909
|
+
scaleW: number;
|
|
2910
|
+
scaleH: number;
|
|
2911
|
+
pages: number;
|
|
2912
|
+
packed: number;
|
|
2913
|
+
alphaChnl: number;
|
|
2914
|
+
redChnl: number;
|
|
2915
|
+
greenChnl: number;
|
|
2916
|
+
blueChnl: number;
|
|
2917
|
+
};
|
|
2918
|
+
distanceField: {
|
|
2919
|
+
fieldType: string;
|
|
2920
|
+
distanceRange: number;
|
|
2921
|
+
};
|
|
2922
|
+
kernings: Array<{
|
|
2923
|
+
first: number;
|
|
2924
|
+
second: number;
|
|
2925
|
+
amount: number;
|
|
2926
|
+
}>;
|
|
2927
|
+
};
|
|
2706
2928
|
|
|
2929
|
+
export declare interface FramebufferTarget {
|
|
2930
|
+
target?: GLuint;
|
|
2931
|
+
buffer?: WebGLFramebuffer;
|
|
2932
|
+
width?: number;
|
|
2933
|
+
height?: number;
|
|
2934
|
+
depth?: boolean;
|
|
2935
|
+
}
|
|
2936
|
+
|
|
2707
2937
|
declare const FtoC: (f: number) => number;
|
|
2708
2938
|
|
|
2709
2939
|
declare const FtoCUnit: (f: number) => number;
|
|
@@ -2882,8 +3112,13 @@ export declare class GeoJSONSource extends VectorTileSource {
|
|
|
2882
3112
|
/**
|
|
2883
3113
|
* The GeoJSON data associated with the source, either provided statically or from a remote source.
|
|
2884
3114
|
*/
|
|
2885
|
-
get data(): GeoJSONFeatureCollection;
|
|
3115
|
+
get data(): GeoJSONFeatureCollection | undefined;
|
|
2886
3116
|
private needsUpdate;
|
|
3117
|
+
/**
|
|
3118
|
+
* The last resolved remote data URL. When this changes between requests, cached tiles are
|
|
3119
|
+
* expired so the worker reloads GeoJSON from the new URL.
|
|
3120
|
+
*/
|
|
3121
|
+
private _lastDataUrl;
|
|
2887
3122
|
/**
|
|
2888
3123
|
* The revision number of the data.
|
|
2889
3124
|
*/
|
|
@@ -2911,6 +3146,15 @@ export declare class GeoJSONSource extends VectorTileSource {
|
|
|
2911
3146
|
setData(value: GeoJSONFeatureCollection): void;
|
|
2912
3147
|
expireAllTiles(): void;
|
|
2913
3148
|
reload(): void;
|
|
3149
|
+
/**
|
|
3150
|
+
* Clears GeoJSON held by the worker so the next remote tile request refetches data
|
|
3151
|
+
* (needed when the timeline range changes and `{startDate}`/`{endDate}` URLs update).
|
|
3152
|
+
*
|
|
3153
|
+
* Intentionally does not call `cancelAllRequests()` — aborting in-flight visible-tile
|
|
3154
|
+
* tasks leaves their deferreds unresolved, so expired tiles stay blank until a later
|
|
3155
|
+
* viewport change re-requests them.
|
|
3156
|
+
*/
|
|
3157
|
+
private clearWorkerData;
|
|
2914
3158
|
private updateWorkerData;
|
|
2915
3159
|
private processWorkerUpdate;
|
|
2916
3160
|
private beginDataUpdate;
|
|
@@ -2931,8 +3175,24 @@ export declare interface GeoJSONSourceSpecification extends SourceSpecification
|
|
|
2931
3175
|
* The GeoJSON URL template string to use when requesting GeoJSON data.
|
|
2932
3176
|
*/
|
|
2933
3177
|
url: string;
|
|
3178
|
+
/**
|
|
3179
|
+
* The minimum data zoom level at which the source is sliced into tiles, from `0` to `21`.
|
|
3180
|
+
* Defaults to `0`.
|
|
3181
|
+
*/
|
|
3182
|
+
minZoom?: number;
|
|
3183
|
+
/**
|
|
3184
|
+
* The maximum data zoom level at which the source is sliced into tiles, from `0` to `21`.
|
|
3185
|
+
* Defaults to `21`. Clamp this low (e.g. `0`) for small, globally-continuous geometry so it is
|
|
3186
|
+
* served as a single overscaled tile instead of many independently-updating tiles — this
|
|
3187
|
+
* avoids inter-tile seams/tearing when the data updates rapidly.
|
|
3188
|
+
*/
|
|
3189
|
+
maxZoom?: number;
|
|
2934
3190
|
/**
|
|
2935
3191
|
* Whether the GeoJSON data is dynamic, meaning it will be updated frequently. Default is `false`.
|
|
3192
|
+
*
|
|
3193
|
+
* Dynamic sources keep the last-good tiles rendered while new data re-slices (avoiding a blank
|
|
3194
|
+
* flash), and the worker prefers a lightweight index for fast updates — automatically falling
|
|
3195
|
+
* back to the full index for polygon data that the lightweight index cannot tile-fill.
|
|
2936
3196
|
*/
|
|
2937
3197
|
dynamic?: boolean;
|
|
2938
3198
|
/**
|
|
@@ -3185,11 +3445,23 @@ export declare type InterpolationMode = ObjectValue<typeof InterpolationMode>;
|
|
|
3185
3445
|
|
|
3186
3446
|
declare const inToM: (ins: number) => number;
|
|
3187
3447
|
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3448
|
+
/**
|
|
3449
|
+
* Returns whether a style layer looks like an administrative boundary line.
|
|
3450
|
+
* Matches Mapbox Streets (`admin-*-boundary*`, `source-layer: admin`) and common
|
|
3451
|
+
* MapLibre/OpenMapTiles boundary layers (`boundary_*`, `source-layer: boundary`).
|
|
3452
|
+
*/
|
|
3453
|
+
export declare const isAdminBoundaryStyleLayer: (layer: StyleLayerRef | null | undefined) => boolean;
|
|
3191
3454
|
|
|
3192
|
-
|
|
3455
|
+
/** Whether a style layer id is a MapsGL slot sentinel. */
|
|
3456
|
+
export declare const isSlotSentinelId: (id: string) => boolean;
|
|
3457
|
+
|
|
3458
|
+
/**
|
|
3459
|
+
* Whether a layer id / weather code should land in the `text` slot
|
|
3460
|
+
* (`temperatures-text`, `conditions.temperature.text`, …).
|
|
3461
|
+
*/
|
|
3462
|
+
export declare const isTextSlotLayerKey: (key: string | undefined) => boolean;
|
|
3463
|
+
|
|
3464
|
+
declare const kmToM: (km: number) => number;
|
|
3193
3465
|
|
|
3194
3466
|
declare const kmToMi: (km: number) => number;
|
|
3195
3467
|
|
|
@@ -3443,6 +3715,10 @@ export declare interface LayerRenderer {
|
|
|
3443
3715
|
* Called when the layer's mask state changes.
|
|
3444
3716
|
*/
|
|
3445
3717
|
onMaskStateChange(): void;
|
|
3718
|
+
/**
|
|
3719
|
+
* Called when the layer's mask configuration (mask layers / mode / invert) changes.
|
|
3720
|
+
*/
|
|
3721
|
+
onMaskLayerChange(): void;
|
|
3446
3722
|
/**
|
|
3447
3723
|
* Flags the renderer as dirty so that it is updated during the next render frame.
|
|
3448
3724
|
*/
|
|
@@ -3490,8 +3766,24 @@ export declare interface LayerSpecification {
|
|
|
3490
3766
|
* Data source associated with the layer.
|
|
3491
3767
|
* @remarks
|
|
3492
3768
|
* This can be a string representing the ID of a data source, a data source instance or a source specification.
|
|
3769
|
+
* Not required for source-less layers such as `coverageMask`.
|
|
3493
3770
|
*/
|
|
3494
3771
|
source: string | SourceSpecification | DataSource;
|
|
3772
|
+
/**
|
|
3773
|
+
* The native coverage description for a `coverageMask` layer. Defines the model's grid and
|
|
3774
|
+
* projection so the mask can be reprojected to the map and clipped to the coverage area.
|
|
3775
|
+
*/
|
|
3776
|
+
coverage?: CoverageSpec;
|
|
3777
|
+
/**
|
|
3778
|
+
* Subdivisions per axis for a `coverageMask` mesh (default 64). Higher values follow the model's
|
|
3779
|
+
* curved native boundary more closely at the cost of more vertices.
|
|
3780
|
+
*/
|
|
3781
|
+
coverageSegments?: number;
|
|
3782
|
+
/**
|
|
3783
|
+
* Debug fill color (RGBA 0–1) for a `coverageMask` when rendered visibly. Ignored when the layer
|
|
3784
|
+
* is used as a stencil mask.
|
|
3785
|
+
*/
|
|
3786
|
+
coverageColor?: [number, number, number, number];
|
|
3495
3787
|
/**
|
|
3496
3788
|
* The layer's data to use from the data source, if applicable. This is only used for vector tile data sources
|
|
3497
3789
|
* whose tiles are in the Mapbox Vector Tile (MVT) format.
|
|
@@ -3557,6 +3849,22 @@ export declare interface LayerSpecification {
|
|
|
3557
3849
|
* loaded tile bounds. Default is `false`.
|
|
3558
3850
|
*/
|
|
3559
3851
|
preloadLowQuality?: boolean;
|
|
3852
|
+
/**
|
|
3853
|
+
* MapsGL ordering slot id. When omitted, the slot is chosen from the layer type
|
|
3854
|
+
* (e.g. raster/sample/fill → `underlay`, particle/line → `inlay`).
|
|
3855
|
+
* @see MapController.defineSlot
|
|
3856
|
+
*/
|
|
3857
|
+
slot?: string;
|
|
3858
|
+
/**
|
|
3859
|
+
* Within-slot stack rank (higher paints above siblings in the same slot).
|
|
3860
|
+
* When omitted, resolved from {@link stackKey} / weather code defaults (radar > satellite > other).
|
|
3861
|
+
*/
|
|
3862
|
+
stackRank?: number;
|
|
3863
|
+
/**
|
|
3864
|
+
* Lookup key for default stack ranks (typically the weather layer code when the
|
|
3865
|
+
* instance id differs). Used with {@link SlotRegistryOptions.stackRanks}.
|
|
3866
|
+
*/
|
|
3867
|
+
stackKey?: string;
|
|
3560
3868
|
/**
|
|
3561
3869
|
* Render style configuration.
|
|
3562
3870
|
* @see PaintStyleSpec
|
|
@@ -3598,6 +3906,16 @@ export declare type LayerTiming = {
|
|
|
3598
3906
|
* beginning of the time range.
|
|
3599
3907
|
*/
|
|
3600
3908
|
interleaved: boolean;
|
|
3909
|
+
/**
|
|
3910
|
+
* Number of neighboring time intervals before AND after the currently visible interval to preload once the
|
|
3911
|
+
* visible interval has finished loading.
|
|
3912
|
+
* @remarks
|
|
3913
|
+
* Preloading neighboring intervals hides the network latency of stepping or scrubbing to an adjacent interval by
|
|
3914
|
+
* fetching them ahead of time at a lower download priority, so the visible interval is never blocked waiting on
|
|
3915
|
+
* non-visible data. A value of `0` disables preloading. The value is clamped to a maximum of `3`. Defaults to `0`.
|
|
3916
|
+
* NOTE: Larger values increase network and memory usage since more interval data is retained at once.
|
|
3917
|
+
*/
|
|
3918
|
+
preload: number;
|
|
3601
3919
|
/**
|
|
3602
3920
|
* The operation to perform on the data within the time series. Defaults to `none`.
|
|
3603
3921
|
*/
|
|
@@ -3695,7 +4013,18 @@ declare abstract class Legend extends EventDispatcher {
|
|
|
3695
4013
|
options: Partial<LegendOptions>;
|
|
3696
4014
|
|
|
3697
4015
|
private _rendered;
|
|
4016
|
+
|
|
3698
4017
|
get measurement(): string | undefined;
|
|
4018
|
+
/**
|
|
4019
|
+
* The measurement's native units — the units the legend should always display in when
|
|
4020
|
+
* {@link measurementFixed} is `true`.
|
|
4021
|
+
*/
|
|
4022
|
+
get measurementUnits(): string | undefined;
|
|
4023
|
+
/**
|
|
4024
|
+
* When `true`, the legend ignores the map's unit state and always displays in its native
|
|
4025
|
+
* {@link measurementUnits} (see `weather-spec`'s `LegendMeasurementSpec`).
|
|
4026
|
+
*/
|
|
4027
|
+
get measurementFixed(): boolean;
|
|
3699
4028
|
get size(): Size;
|
|
3700
4029
|
get canvas(): HTMLCanvasElement;
|
|
3701
4030
|
get layout(): LegendLayout;
|
|
@@ -3934,6 +4263,16 @@ export declare interface MapAdapterOptions {
|
|
|
3934
4263
|
*/
|
|
3935
4264
|
account: Account;
|
|
3936
4265
|
units?: Partial<MapUnits>;
|
|
4266
|
+
/**
|
|
4267
|
+
* Layer ordering slot configuration. Slots provide automatic type-based stacking
|
|
4268
|
+
* (e.g. raster/sample below inlay) and optional pinning relative to host
|
|
4269
|
+
* map style layers. By default the `underlay` slot is pinned below the bottom-most
|
|
4270
|
+
* admin boundary layer in the loaded Mapbox/MapLibre style (resolved at runtime).
|
|
4271
|
+
* Within a slot, {@link SlotRegistryOptions.stackRanks} control relative order
|
|
4272
|
+
* (e.g. radar above satellite above other underlays).
|
|
4273
|
+
* See {@link SlotRegistry}.
|
|
4274
|
+
*/
|
|
4275
|
+
slots?: SlotRegistryOptions;
|
|
3937
4276
|
/**
|
|
3938
4277
|
* The {@link TimeAnimationOptions} containing configuration options for the map controller's timeline.
|
|
3939
4278
|
*/
|
|
@@ -3965,6 +4304,9 @@ export declare interface MapAdapterOptions {
|
|
|
3965
4304
|
}>;
|
|
3966
4305
|
}
|
|
3967
4306
|
|
|
4307
|
+
/** Mapbox Standard slot ids in paint order (bottom → top). */
|
|
4308
|
+
export declare const MAPBOX_STANDARD_SLOTS: readonly MapboxStandardSlot[];
|
|
4309
|
+
|
|
3968
4310
|
export declare type MapboxMap = mapboxgl.Map;
|
|
3969
4311
|
|
|
3970
4312
|
/**
|
|
@@ -3975,6 +4317,7 @@ export declare class MapboxMapController extends MapController<MapboxMap> implem
|
|
|
3975
4317
|
get container(): HTMLElement;
|
|
3976
4318
|
get libraryInfo(): MapLibraryInfo;
|
|
3977
4319
|
constructor(map: MapboxMap, opts: MapAdapterOptions);
|
|
4320
|
+
initialize(): Promise<void>;
|
|
3978
4321
|
getSize(): Size;
|
|
3979
4322
|
setSize(size: NumericalOrStringSize): void;
|
|
3980
4323
|
getCenter(): Coordinate;
|
|
@@ -3989,12 +4332,43 @@ get container(): HTMLElement;
|
|
|
3989
4332
|
redraw(): void;
|
|
3990
4333
|
moveLayer(id: string, beforeId?: string): void;
|
|
3991
4334
|
|
|
4335
|
+
/**
|
|
4336
|
+
* Classic styles: prefer explicit slot.beforeId, else bottom-most admin boundary for `underlay`.
|
|
4337
|
+
*/
|
|
4338
|
+
getSlotHostBeforeId(slotId: SlotId): string | undefined;
|
|
4339
|
+
|
|
3992
4340
|
getProjection(): ProjectionType;
|
|
3993
4341
|
setProjection(projection: ProjectionType): void;
|
|
3994
4342
|
|
|
4343
|
+
/**
|
|
4344
|
+
* Pin a MapsGL ordering slot into a Mapbox Standard style slot (`bottom` / `middle` / `top`),
|
|
4345
|
+
* or clear the pin (`undefined` / `null`) to restore adapter defaults
|
|
4346
|
+
* (`underlay` → `middle`, other built-ins → `top`).
|
|
4347
|
+
* Repositions slot sentinels and reprojects layers in the slot.
|
|
4348
|
+
*/
|
|
4349
|
+
setSlotMapboxSlot(slotId: SlotId, mapboxSlot?: MapboxStandardSlot | null): void;
|
|
4350
|
+
/**
|
|
4351
|
+
* Whether the current Mapbox style exposes Standard slots (`bottom` / `middle` / `top`).
|
|
4352
|
+
*/
|
|
4353
|
+
usesMapboxStandardSlots(): boolean;
|
|
4354
|
+
/**
|
|
4355
|
+
* Mapbox Standard slot ids available on the current style.
|
|
4356
|
+
* Empty when {@link usesMapboxStandardSlots} is false.
|
|
4357
|
+
*/
|
|
4358
|
+
listMapboxStandardSlots(): MapboxStandardSlot[];
|
|
4359
|
+
/**
|
|
4360
|
+
* Resolve the Mapbox Standard slot a MapsGL slot maps into, if any.
|
|
4361
|
+
* On Standard styles this is the explicit pin or an adapter default
|
|
4362
|
+
* (`underlay` → `middle`, other built-ins → `top`).
|
|
4363
|
+
*/
|
|
4364
|
+
getSlotMapboxSlot(slotId: SlotId): MapboxStandardSlot | undefined;
|
|
4365
|
+
|
|
3995
4366
|
dispose(all?: boolean): void;
|
|
3996
4367
|
}
|
|
3997
4368
|
|
|
4369
|
+
/** Mapbox Standard Style native slot bands. */
|
|
4370
|
+
export declare type MapboxStandardSlot = 'bottom' | 'middle' | 'top';
|
|
4371
|
+
|
|
3998
4372
|
export declare class MapCamera {
|
|
3999
4373
|
private _transform;
|
|
4000
4374
|
private _orientation;
|
|
@@ -4200,6 +4574,14 @@ get needsViewportUpdate(): boolean;
|
|
|
4200
4574
|
* @param value - New value of the paint style property to set.
|
|
4201
4575
|
*/
|
|
4202
4576
|
setPaintProperty(layerId: string, property: string, value: any): void;
|
|
4577
|
+
/**
|
|
4578
|
+
* Sets the stencil mask for the specified layer. Accepts the same mask configuration shape used when adding
|
|
4579
|
+
* layers (`type: 'water' | 'land'`, `layers` by id, `mode`, and `invert`). Weather layer codes in
|
|
4580
|
+
* `layers` are created as `::mask` instances when needed. Pass `null` or `undefined` to clear the mask.
|
|
4581
|
+
* @param layerId - Map layer id or weather layer code for the target layer.
|
|
4582
|
+
* @param mask - Mask configuration, a single mask layer id string, or `null`/`undefined` to clear.
|
|
4583
|
+
*/
|
|
4584
|
+
setMask(layerId: string, mask?: LayerMaskConfiguration | LayerMaskSpecification | string | null): void;
|
|
4203
4585
|
/**
|
|
4204
4586
|
* Adds a legend control to the map in the specified DOM element.
|
|
4205
4587
|
* @param target - The DOM element to add the legend control to.
|
|
@@ -4209,7 +4591,9 @@ get needsViewportUpdate(): boolean;
|
|
|
4209
4591
|
addLegendControl(target: HTMLElement, options?: Partial<LegendControlOptions>): LegendControl;
|
|
4210
4592
|
/**
|
|
4211
4593
|
* Adds a data inspector control to the map.
|
|
4212
|
-
* @param options -
|
|
4594
|
+
* @param options - Control options (`event`, `stream`, `showCoordinates`, `layout`, `tooltip`).
|
|
4595
|
+
* `layout`: `'auto'` (default) side-by-side for compact rows (scalars, badge, badge+value);
|
|
4596
|
+
* stack title above value for multi-line/block content; `'stacked'` always stacks.
|
|
4213
4597
|
* @returns The newly added data inspector control instance.
|
|
4214
4598
|
*/
|
|
4215
4599
|
addDataInspectorControl(options?: Partial<DataInspectorControlOptions>): DataInspectorControl;
|
|
@@ -4221,12 +4605,83 @@ get needsViewportUpdate(): boolean;
|
|
|
4221
4605
|
* Removes the data inspector control from the map.
|
|
4222
4606
|
*/
|
|
4223
4607
|
removeDataInspectorControl(): void;
|
|
4224
|
-
|
|
4608
|
+
/**
|
|
4609
|
+
* Adds the day/night terminator overlay to the map, or updates it if already present.
|
|
4610
|
+
* The overlay is always kept at the top of the MapsGL layer stack.
|
|
4611
|
+
* @param options - Optional overlay settings such as {@link DayNightOverlayOptions.opacity}.
|
|
4612
|
+
*/
|
|
4613
|
+
addDayNightOverlay(options?: DayNightOverlayOptions): void;
|
|
4225
4614
|
removeDayNightOverlay(): void;
|
|
4226
4615
|
/**
|
|
4616
|
+
* Keep the day/night terminator above every other MapsGL layer. Weather layers added or
|
|
4617
|
+
* reordered later would otherwise land on top of the overlay and hide the terminator.
|
|
4618
|
+
*
|
|
4619
|
+
* Updates the internal layer stack only, then asks the host map adapter to mirror that order.
|
|
4620
|
+
* Avoid calling {@link moveLayer} here — Mapbox's override re-applies the original move after
|
|
4621
|
+
* `super`, which would put content layers back above the overlay.
|
|
4622
|
+
*/
|
|
4623
|
+
private bringDayNightOverlayToTop;
|
|
4624
|
+
|
|
4625
|
+
/**
|
|
4626
|
+
* Define or update a layer ordering slot. Custom slots are inserted below `overlay` by default.
|
|
4627
|
+
* @param id - Slot identifier.
|
|
4628
|
+
* @param definition - Optional host placement (`beforeId`).
|
|
4629
|
+
*/
|
|
4630
|
+
defineSlot(id: SlotId, definition?: Omit<SlotDefinition, 'id'>): SlotDefinition;
|
|
4631
|
+
/**
|
|
4632
|
+
* Pin a MapsGL ordering slot below a host style layer (Mapbox/MapLibre `beforeId`),
|
|
4633
|
+
* or clear the pin (`undefined` / `null`) to restore the slot's default host placement.
|
|
4634
|
+
* Repositions the slot sentinel and reprojects layers currently in the slot.
|
|
4635
|
+
*/
|
|
4636
|
+
setSlotBeforeId(slotId: SlotId, beforeId?: string | null): void;
|
|
4637
|
+
/**
|
|
4638
|
+
* Replace the bottom → top ordering of slots.
|
|
4639
|
+
* @param ids - Slot identifiers in bottom-to-top order.
|
|
4640
|
+
*/
|
|
4641
|
+
setSlotOrder(ids: SlotId[]): void;
|
|
4642
|
+
/**
|
|
4643
|
+
* Returns all slot definitions in bottom → top order.
|
|
4644
|
+
*/
|
|
4645
|
+
listSlots(): SlotDefinition[];
|
|
4646
|
+
/**
|
|
4647
|
+
* Resolve the host style layer id a slot pins below, if any.
|
|
4648
|
+
* Mapbox/MapLibre may return a runtime default (e.g. bottom-most admin boundary for `underlay`).
|
|
4649
|
+
*/
|
|
4650
|
+
getSlotHostBeforeId(slotId: SlotId): string | undefined;
|
|
4651
|
+
/**
|
|
4652
|
+
* Returns the slot id currently assigned to a MapsGL layer, if any.
|
|
4653
|
+
* @param layerId - MapsGL layer identifier.
|
|
4654
|
+
*/
|
|
4655
|
+
getSlot(layerId: string): SlotId | undefined;
|
|
4656
|
+
/**
|
|
4657
|
+
* Move a MapsGL layer into a different ordering slot, preserving its stack rank
|
|
4658
|
+
* (or appending when ranks are equal / unset).
|
|
4659
|
+
* @param layerId - MapsGL layer identifier.
|
|
4660
|
+
* @param slotId - Target slot identifier.
|
|
4661
|
+
*/
|
|
4662
|
+
moveLayerToSlot(layerId: string, slotId: SlotId): void;
|
|
4663
|
+
/**
|
|
4664
|
+
* Returns the within-slot stack rank for a layer (higher paints above siblings).
|
|
4665
|
+
*/
|
|
4666
|
+
getStackRank(layerId: string): number | undefined;
|
|
4667
|
+
/**
|
|
4668
|
+
* Set the within-slot stack rank for a layer and re-insert it among siblings.
|
|
4669
|
+
*/
|
|
4670
|
+
setStackRank(layerId: string, rank: number): void;
|
|
4671
|
+
/**
|
|
4672
|
+
* Override the default stack rank for a weather layer code / stack key.
|
|
4673
|
+
* Applies to future inserts that resolve rank from that key.
|
|
4674
|
+
*/
|
|
4675
|
+
setCodeStackRank(code: string, rank: number): void;
|
|
4676
|
+
|
|
4677
|
+
/**
|
|
4227
4678
|
* Returns whether the map currently contains a weather layer with the specified identifier.
|
|
4228
4679
|
* @param id - Weather layer identifier to check for.
|
|
4229
4680
|
* @returns `true` if the weather layer exists, otherwise `false`
|
|
4681
|
+
* @remarks
|
|
4682
|
+
* Layers that exist only as inactive hidden dependencies (e.g. a sample source auto-added for a
|
|
4683
|
+
* {@link DataQueryTileLayer} text layer) are treated as not present until explicitly added via
|
|
4684
|
+
* {@link MapController.addWeatherLayer}.
|
|
4230
4685
|
*/
|
|
4231
4686
|
hasWeatherLayer(id: string): boolean;
|
|
4232
4687
|
/**
|
|
@@ -4249,9 +4704,12 @@ get needsViewportUpdate(): boolean;
|
|
|
4249
4704
|
* Adds a new weather layer to the map.
|
|
4250
4705
|
* @param idOrConfig - One of the supported weather layer identifiers or a weather layer configuration object.
|
|
4251
4706
|
* @param overrides - An object containing data and render style overrides for the weather layer.
|
|
4252
|
-
*
|
|
4253
|
-
*
|
|
4254
|
-
* the layer
|
|
4707
|
+
* May include `slot` to force a MapsGL ordering band (see {@link MapController.defineSlot}).
|
|
4708
|
+
* @param beforeId - Optional host insert-before id (MapsGL layer or Mapbox/MapLibre style layer).
|
|
4709
|
+
* When omitted, the layer is placed by its ordering slot (type defaults: raster/sample/fill → `underlay`
|
|
4710
|
+
* under labels; particle/line/circle/symbol → `inlay`; text → `text`) and within-slot `stackRank`
|
|
4711
|
+
* (radar above satellite above other underlays by default). Prefer `slot` / slots APIs for
|
|
4712
|
+
* logical stacking; use `beforeId` as an escape hatch for absolute host placement.
|
|
4255
4713
|
* @returns The newly added map layer or an array of layers if the weather layer identifier maps to multiple layers.
|
|
4256
4714
|
*/
|
|
4257
4715
|
addWeatherLayer(idOrConfig: WeatherLayerConfiguration | string, overrides?: Partial<WeatherLayerOptions>, beforeId?: string): WebGLLayer | Array<WebGLLayer>;
|
|
@@ -4302,8 +4760,8 @@ get needsViewportUpdate(): boolean;
|
|
|
4302
4760
|
* @param id - A unique identifier for the layer.
|
|
4303
4761
|
* @param config - The configuration options for the layer.
|
|
4304
4762
|
* @param beforeId - The identifier of an existing map layer to insert the new layer before, which will result in
|
|
4305
|
-
* the new layer appearing below the target layer. If not provided, then the new layer
|
|
4306
|
-
*
|
|
4763
|
+
* the new layer appearing below the target layer. If not provided, then the new layer is placed according to its
|
|
4764
|
+
* ordering slot (from layer type or `config.slot`).
|
|
4307
4765
|
* @returns The newly added layer.
|
|
4308
4766
|
*/
|
|
4309
4767
|
addLayer(id: string, config: Partial<LayerSpecification> | WebGLLayer, beforeId?: string): WebGLLayer;
|
|
@@ -4392,7 +4850,15 @@ get needsViewportUpdate(): boolean;
|
|
|
4392
4850
|
protected getViewportState(): MapViewState;
|
|
4393
4851
|
|
|
4394
4852
|
protected fadeSymbolsIfNeeded(): void;
|
|
4395
|
-
|
|
4853
|
+
|
|
4854
|
+
/**
|
|
4855
|
+
* Ensures a weather element's legend is registered when a legend control is present.
|
|
4856
|
+
* Used both on initial add and when promoting a previously hidden query/dependency layer.
|
|
4857
|
+
*
|
|
4858
|
+
* `WeatherElement.addTo` assigns `legendId` from the legend config before the control
|
|
4859
|
+
* exists, so presence of `legendId` does not mean the legend is already mounted.
|
|
4860
|
+
*/
|
|
4861
|
+
private ensureWeatherLayerLegend;
|
|
4396
4862
|
private setupLegendEvents;
|
|
4397
4863
|
|
|
4398
4864
|
private _handleLayerLoadEvent;
|
|
@@ -4456,6 +4922,13 @@ export declare class MaplibreMapController extends MapboxMapController {
|
|
|
4456
4922
|
|
|
4457
4923
|
getProjection(): ProjectionType;
|
|
4458
4924
|
setProjection(projection: ProjectionType): void;
|
|
4925
|
+
/**
|
|
4926
|
+
* MapLibre has no Mapbox Standard slots. Inherited Mapbox Standard APIs are no-ops.
|
|
4927
|
+
*/
|
|
4928
|
+
setSlotMapboxSlot(_slotId: SlotId, _mapboxSlot?: MapboxStandardSlot | null): void;
|
|
4929
|
+
usesMapboxStandardSlots(): boolean;
|
|
4930
|
+
listMapboxStandardSlots(): MapboxStandardSlot[];
|
|
4931
|
+
getSlotMapboxSlot(_slotId: SlotId): MapboxStandardSlot | undefined;
|
|
4459
4932
|
}
|
|
4460
4933
|
|
|
4461
4934
|
/**
|
|
@@ -4778,6 +5251,11 @@ export declare type MapUnits = {
|
|
|
4778
5251
|
* The current unit of measurement for ratio.
|
|
4779
5252
|
*/
|
|
4780
5253
|
ratio: (typeof Units.ratio)[keyof typeof Units.ratio];
|
|
5254
|
+
/**
|
|
5255
|
+
* The current unit of measurement for index-based values (UVI, AQI, etc.).
|
|
5256
|
+
* Index values have no unit conversion — they are always displayed as floored integers.
|
|
5257
|
+
*/
|
|
5258
|
+
index: (typeof Units.index)[keyof typeof Units.index];
|
|
4781
5259
|
};
|
|
4782
5260
|
|
|
4783
5261
|
export declare interface MapViewState {
|
|
@@ -4816,15 +5294,134 @@ export declare interface MapViewState {
|
|
|
4816
5294
|
projectionMatrix?: Matrix4;
|
|
4817
5295
|
}
|
|
4818
5296
|
|
|
5297
|
+
/**
|
|
5298
|
+
* Base class for all matrices.
|
|
5299
|
+
*/
|
|
5300
|
+
export declare class Matrix<T> {
|
|
5301
|
+
/**
|
|
5302
|
+
* The raw value of the matrix.
|
|
5303
|
+
* @readonly
|
|
5304
|
+
*/
|
|
5305
|
+
get value(): T;
|
|
5306
|
+
/**
|
|
5307
|
+
* Assigns the matrix values from an array.
|
|
5308
|
+
* @param array - The array to assign the values from.
|
|
5309
|
+
* @param offset - An optional offset to start assigning the values at.
|
|
5310
|
+
*/
|
|
5311
|
+
fromArray(array: number[], offset?: number): Matrix<T>;
|
|
5312
|
+
/**
|
|
5313
|
+
* Returns the matrix as an array. If an array is provided, the values will be set to that array.
|
|
5314
|
+
* @param array - An optional array to set the values to.
|
|
5315
|
+
* @param offset - An optional offset to start setting the values at.
|
|
5316
|
+
* @returns The array representation of the matrix.
|
|
5317
|
+
*/
|
|
5318
|
+
toArray(array?: number[], offset?: number): number[];
|
|
5319
|
+
}
|
|
5320
|
+
|
|
5321
|
+
/**
|
|
5322
|
+
* Class representing a 3x3 matrix.
|
|
5323
|
+
*/
|
|
5324
|
+
export declare class Matrix3 extends Matrix<mat3> {
|
|
5325
|
+
private _value;
|
|
5326
|
+
get value(): mat3;
|
|
5327
|
+
get elements(): number;
|
|
5328
|
+
static get identity(): Matrix3;
|
|
5329
|
+
static get zero(): Matrix3;
|
|
5330
|
+
fromArray(array: number[], offset?: number): Matrix3;
|
|
5331
|
+
toArray(array?: number[], offset?: number): number[];
|
|
5332
|
+
clone(): Matrix3;
|
|
5333
|
+
copy(m: Matrix3): Matrix3;
|
|
5334
|
+
set(m00: number, m10: number, m20: number, m01: number, m11: number, m21: number, m02: number, m12: number, m22: number): Matrix3;
|
|
5335
|
+
determinant(): number;
|
|
5336
|
+
equals(m: Matrix3): boolean;
|
|
5337
|
+
getNormalMatrix(m: Matrix4): void;
|
|
5338
|
+
identity(): Matrix3;
|
|
5339
|
+
invert(): Matrix3;
|
|
5340
|
+
inverse(m: Matrix3): Matrix3;
|
|
5341
|
+
rotate(radians: number): Matrix3;
|
|
5342
|
+
scale(v: Vector2): Matrix3;
|
|
5343
|
+
scaleScalar(s: number): Matrix3;
|
|
5344
|
+
translate(v: Vector2): Matrix3;
|
|
5345
|
+
transpose(): Matrix3;
|
|
5346
|
+
multiply(m: Matrix3): Matrix3;
|
|
5347
|
+
multiplyScalar(s: number): Matrix3;
|
|
5348
|
+
toString(): string;
|
|
5349
|
+
}
|
|
5350
|
+
|
|
5351
|
+
/**
|
|
5352
|
+
* Class representing a 4x4 matrix.
|
|
5353
|
+
*/
|
|
5354
|
+
export declare class Matrix4 extends Matrix<mat4> {
|
|
5355
|
+
private _value;
|
|
5356
|
+
get value(): mat4;
|
|
5357
|
+
get elements(): number;
|
|
5358
|
+
get x(): number;
|
|
5359
|
+
get y(): number;
|
|
5360
|
+
get z(): number;
|
|
5361
|
+
get w(): number;
|
|
5362
|
+
static get identity(): Matrix4;
|
|
5363
|
+
static get zero(): Matrix4;
|
|
5364
|
+
fromArray(array: number[], offset?: number): Matrix4;
|
|
5365
|
+
toArray(array?: number[], offset?: number): number[];
|
|
5366
|
+
fromRotationX(radians: number): Matrix4;
|
|
5367
|
+
fromRotationY(radians: number): Matrix4;
|
|
5368
|
+
fromRotationZ(radians: number): Matrix4;
|
|
5369
|
+
fromScale(v: Vector3): Matrix4;
|
|
5370
|
+
fromTranslation(v: Vector3): Matrix4;
|
|
5371
|
+
fromPerspective(fovy: number, aspect: number, near: number, far: number): Matrix4;
|
|
5372
|
+
fromOrthogonal(left: number, right: number, top: number, bottom: number, near: number, far: number): Matrix4;
|
|
5373
|
+
fromQuaternion(q: Quaternion): Matrix4;
|
|
5374
|
+
clone(): Matrix4;
|
|
5375
|
+
copy(m: Matrix4): Matrix4;
|
|
5376
|
+
determinant(): number;
|
|
5377
|
+
equals(m: Matrix4): boolean;
|
|
5378
|
+
getColumn(col: number): Vector4;
|
|
5379
|
+
setColumn(col: number, v: Vector4): Matrix4;
|
|
5380
|
+
getRotation(q?: Quaternion): Quaternion;
|
|
5381
|
+
getScale(v?: Vector3): Vector3;
|
|
5382
|
+
getTranslation(v?: Vector3): Vector3;
|
|
5383
|
+
identity(): Matrix4;
|
|
5384
|
+
invert(): Matrix4;
|
|
5385
|
+
inverse(m: Matrix4): Matrix4;
|
|
5386
|
+
transpose(): Matrix4;
|
|
5387
|
+
lookAt(eye: Vector3, center?: Vector3, up?: Vector3): Matrix4;
|
|
5388
|
+
multiply(m1: Matrix4, m2?: Matrix4): Matrix4;
|
|
5389
|
+
multiplyScalar(s: number): Matrix4;
|
|
5390
|
+
premultiply(m: Matrix4): Matrix4;
|
|
5391
|
+
rotateX(radians: number): Matrix4;
|
|
5392
|
+
rotateY(radians: number): Matrix4;
|
|
5393
|
+
rotateZ(radians: number): Matrix4;
|
|
5394
|
+
scale(v: Vector3): Matrix4;
|
|
5395
|
+
scaleScalar(s: number): Matrix4;
|
|
5396
|
+
translate(v: Vector3): Matrix4;
|
|
5397
|
+
compose(translation: Vector3, quaternion: Quaternion, scale: Vector3): Matrix4;
|
|
5398
|
+
decompose(): {
|
|
5399
|
+
rotation: Quaternion;
|
|
5400
|
+
scale: Vector3;
|
|
5401
|
+
translation: Vector3;
|
|
5402
|
+
};
|
|
5403
|
+
toString(): string;
|
|
5404
|
+
}
|
|
5405
|
+
|
|
4819
5406
|
declare const mbToHg: (mb: number) => number;
|
|
4820
5407
|
|
|
4821
5408
|
declare const mbToPa: (mb: number) => number;
|
|
4822
|
-
|
|
4823
|
-
export declare type Measurement = keyof typeof Units | 'height' | 'snowfall' | 'intensity';
|
|
4824
5409
|
|
|
4825
5410
|
export declare type MessageHandler = (result: any) => any;
|
|
4826
5411
|
|
|
4827
|
-
|
|
5412
|
+
/**
|
|
5413
|
+
* Converts precipitation rate in mm/hr (or mm/s if perSecond=true) to dBZ.
|
|
5414
|
+
* This is the inverse of the dbzToMMRate formula:
|
|
5415
|
+
* dbzToMMRate(dbz) = (10 ** (dbz / 10) / 200) ** (5/8)
|
|
5416
|
+
*
|
|
5417
|
+
* So,
|
|
5418
|
+
* dbz = 10 * log10(200 * (mmRate) ** (8/5))
|
|
5419
|
+
*
|
|
5420
|
+
* @param mmRate Precipitation rate in mm/hr or mm/s
|
|
5421
|
+
* @param perSecond If true, mmRate is in mm/s (default: false, expects mm/hr)
|
|
5422
|
+
* @returns Equivalent reflectivity (dBZ)
|
|
5423
|
+
*/
|
|
5424
|
+
declare const mmRateToDbz: (mmRate: number, perSecond?: boolean) => number;
|
|
4828
5425
|
|
|
4829
5426
|
declare const mmToIn: (mm: number) => number;
|
|
4830
5427
|
|
|
@@ -5200,6 +5797,18 @@ export declare interface PointLegendOptions extends LegendOptions {
|
|
|
5200
5797
|
|
|
5201
5798
|
export declare type Polygon = Array<Array<Point>>;
|
|
5202
5799
|
|
|
5800
|
+
export declare interface ProgramConfiguration {
|
|
5801
|
+
vertexShader: string;
|
|
5802
|
+
fragmentShader: string;
|
|
5803
|
+
includes?: Record<string, string>;
|
|
5804
|
+
defines?: Array<string>;
|
|
5805
|
+
uniforms?: Record<string, any>;
|
|
5806
|
+
onBeforeCompile?: (shader: {
|
|
5807
|
+
vertex: string;
|
|
5808
|
+
fragment: string;
|
|
5809
|
+
}) => void;
|
|
5810
|
+
}
|
|
5811
|
+
|
|
5203
5812
|
export declare interface Projection {
|
|
5204
5813
|
type: ProjectionType;
|
|
5205
5814
|
zAxisUnit: 'meters' | 'pixels';
|
|
@@ -5242,6 +5851,13 @@ export declare interface Projection {
|
|
|
5242
5851
|
metersPerPixel(lat: number, zoom: number): number;
|
|
5243
5852
|
}
|
|
5244
5853
|
|
|
5854
|
+
export declare class ProjectionMatrix extends Matrix4 {
|
|
5855
|
+
frustum(left: number, right: number, top: number, bottom: number, near: number, far: number): ProjectionMatrix;
|
|
5856
|
+
orthographic(left: number, right: number, top: number, bottom: number, near: number, far: number): ProjectionMatrix;
|
|
5857
|
+
perspective(fovy: number, aspect: number, near: number, far: number): ProjectionMatrix;
|
|
5858
|
+
lookAt(eye: Vector3, center?: Vector3, up?: Vector3): ProjectionMatrix;
|
|
5859
|
+
}
|
|
5860
|
+
|
|
5245
5861
|
declare const ProjectionType: {
|
|
5246
5862
|
readonly mercator: "mercator";
|
|
5247
5863
|
readonly globe: "globe";
|
|
@@ -5250,38 +5866,88 @@ declare const ProjectionType: {
|
|
|
5250
5866
|
export declare type ProjectionType = ObjectValue<typeof ProjectionType>;
|
|
5251
5867
|
|
|
5252
5868
|
/**
|
|
5253
|
-
*
|
|
5254
|
-
*
|
|
5255
|
-
|
|
5256
|
-
|
|
5257
|
-
|
|
5258
|
-
|
|
5259
|
-
|
|
5260
|
-
|
|
5261
|
-
|
|
5262
|
-
|
|
5263
|
-
|
|
5264
|
-
|
|
5265
|
-
|
|
5266
|
-
|
|
5267
|
-
|
|
5268
|
-
|
|
5269
|
-
|
|
5270
|
-
|
|
5271
|
-
|
|
5272
|
-
|
|
5273
|
-
|
|
5274
|
-
|
|
5275
|
-
|
|
5276
|
-
|
|
5277
|
-
|
|
5278
|
-
|
|
5279
|
-
|
|
5280
|
-
|
|
5281
|
-
}
|
|
5282
|
-
|
|
5283
|
-
|
|
5284
|
-
|
|
5869
|
+
* Implementation of a quaternion that is used to represent rotations.
|
|
5870
|
+
* @see https://en.wikipedia.org/wiki/Quaternion
|
|
5871
|
+
* @see https://en.wikipedia.org/wiki/Quaternions_and_spatial_rotation
|
|
5872
|
+
*/
|
|
5873
|
+
export declare class Quaternion {
|
|
5874
|
+
|
|
5875
|
+
get x(): number;
|
|
5876
|
+
set x(value: number);
|
|
5877
|
+
get y(): number;
|
|
5878
|
+
set y(value: number);
|
|
5879
|
+
get z(): number;
|
|
5880
|
+
set z(value: number);
|
|
5881
|
+
get w(): number;
|
|
5882
|
+
set w(value: number);
|
|
5883
|
+
get value(): quat;
|
|
5884
|
+
get elements(): number;
|
|
5885
|
+
constructor(x?: number, y?: number, z?: number, w?: number);
|
|
5886
|
+
fromArray(array: number[], offset?: number): Quaternion;
|
|
5887
|
+
toArray(array?: number[], offset?: number): number[];
|
|
5888
|
+
fromObject({ x, y, z, w }: {
|
|
5889
|
+
x: number;
|
|
5890
|
+
y: number;
|
|
5891
|
+
z: number;
|
|
5892
|
+
w: number;
|
|
5893
|
+
}): Quaternion;
|
|
5894
|
+
toObject(): {
|
|
5895
|
+
x: number;
|
|
5896
|
+
y: number;
|
|
5897
|
+
};
|
|
5898
|
+
fromAxisAngle(axis: Vector3, radians: number): Quaternion;
|
|
5899
|
+
fromEuler(e: Euler): Quaternion;
|
|
5900
|
+
fromRotationMatrix(): Quaternion;
|
|
5901
|
+
set(x: number, y: number, z: number, w: number): Quaternion;
|
|
5902
|
+
length(): number;
|
|
5903
|
+
clone(): Quaternion;
|
|
5904
|
+
copy(q: Quaternion): Quaternion;
|
|
5905
|
+
equals(q: Quaternion): boolean;
|
|
5906
|
+
identity(): Quaternion;
|
|
5907
|
+
invert(): Quaternion;
|
|
5908
|
+
conjugate(): Quaternion;
|
|
5909
|
+
normalize(): Quaternion;
|
|
5910
|
+
rotateX(radians: number): Quaternion;
|
|
5911
|
+
rotateY(radians: number): Quaternion;
|
|
5912
|
+
rotateZ(radians: number): Quaternion;
|
|
5913
|
+
dot(q: Quaternion): number;
|
|
5914
|
+
angleTo(q: Quaternion): number;
|
|
5915
|
+
|
|
5916
|
+
}
|
|
5917
|
+
|
|
5918
|
+
/**
|
|
5919
|
+
* A `Query` object is a convenience wrapper for setting up and configuring a query string used
|
|
5920
|
+
* for API queries.
|
|
5921
|
+
*/
|
|
5922
|
+
export declare class Query {
|
|
5923
|
+
private _conditions;
|
|
5924
|
+
/**
|
|
5925
|
+
* Initializes a query instance, optionally with an array of query conditions.
|
|
5926
|
+
* @param conditions - An array of query conditions to initialize the query with.
|
|
5927
|
+
*/
|
|
5928
|
+
constructor(conditions?: QueryCondition[]);
|
|
5929
|
+
/**
|
|
5930
|
+
* Adds a query condition.
|
|
5931
|
+
* @param condition - The query condition to add.
|
|
5932
|
+
*/
|
|
5933
|
+
addCondition(condition: QueryCondition): Query;
|
|
5934
|
+
/**
|
|
5935
|
+
* Removes a query condition.
|
|
5936
|
+
* @param condition - The query condition to remove.
|
|
5937
|
+
*/
|
|
5938
|
+
removeCondition(condition: QueryCondition): Query;
|
|
5939
|
+
/**
|
|
5940
|
+
* Removes all query conditions.
|
|
5941
|
+
*/
|
|
5942
|
+
removeAllConditions(): Query;
|
|
5943
|
+
/**
|
|
5944
|
+
* Returns the formatted string from all query conditions to be used for API requests.
|
|
5945
|
+
*/
|
|
5946
|
+
toString(): string;
|
|
5947
|
+
}
|
|
5948
|
+
|
|
5949
|
+
/**
|
|
5950
|
+
* A `QueryCondition` object stores information about a single property-value condition.
|
|
5285
5951
|
*/
|
|
5286
5952
|
export declare class QueryCondition {
|
|
5287
5953
|
/**
|
|
@@ -5396,7 +6062,7 @@ export declare interface RemoteSymbolImage {
|
|
|
5396
6062
|
/** Indicates if the image is a pattern image. */
|
|
5397
6063
|
pattern?: boolean;
|
|
5398
6064
|
}
|
|
5399
|
-
|
|
6065
|
+
|
|
5400
6066
|
/**
|
|
5401
6067
|
* Context built by the layer each frame and passed to prerender() and draw().
|
|
5402
6068
|
* Contains all map and layer state needed for the render path so the renderer
|
|
@@ -5481,8 +6147,9 @@ export declare interface RenderFrameContextTileLayer {
|
|
|
5481
6147
|
allowExpiredTilesForRender?: boolean;
|
|
5482
6148
|
}
|
|
5483
6149
|
|
|
5484
|
-
|
|
5485
|
-
|
|
6150
|
+
/** Collapses `'temperature-delta'` to `'temperature'` — `MapUnits` (unlike `Measurement`) has no `'temperature-delta'` key of its own, since a temperature delta is always displayed in the same unit its absolute counterpart is. */
|
|
6151
|
+
declare const resolveMeasurementForUnits: (type: ConversionMeasurement) => keyof MapUnits;
|
|
6152
|
+
|
|
5486
6153
|
/**
|
|
5487
6154
|
* RGBAImage represents a 2D grid of image data. Them image data should NOT be premultipled since ImageData is not.
|
|
5488
6155
|
* Therefore, UNPACK_PREMULTIPLY_ALPHA_WEBGL must be used when uploading the image data to the GPU via a texture.
|
|
@@ -5497,11 +6164,11 @@ export declare class RGBAImage {
|
|
|
5497
6164
|
padding: number;
|
|
5498
6165
|
get width(): number;
|
|
5499
6166
|
get height(): number;
|
|
5500
|
-
|
|
5501
|
-
|
|
6167
|
+
|
|
6168
|
+
constructor(data: Uint8Array, dimension: number, pad?: number);
|
|
5502
6169
|
get(x: number, y: number): RGB;
|
|
5503
|
-
|
|
5504
|
-
|
|
6170
|
+
|
|
6171
|
+
/**
|
|
5505
6172
|
* Computes the index offset for the specified x and y coordinates and image width.
|
|
5506
6173
|
* @param x -
|
|
5507
6174
|
* @param y -
|
|
@@ -5544,6 +6211,21 @@ export declare const SampleExpression: {
|
|
|
5544
6211
|
|
|
5545
6212
|
export declare type SampleExpression = ObjectValue<typeof SampleExpression>;
|
|
5546
6213
|
|
|
6214
|
+
/** Optional nodata gate for interpolated sampling (matches shader `incompleteBilinearCell`). */
|
|
6215
|
+
export declare type SamplePixelOptions = {
|
|
6216
|
+
/** Nodata byte value (0–255). When unset or `< 0`, nodata gating is disabled. */
|
|
6217
|
+
noDataValue?: number;
|
|
6218
|
+
/** Channel used to detect nodata corners. Defaults to `r`. */
|
|
6219
|
+
channel?: ColorBand;
|
|
6220
|
+
/**
|
|
6221
|
+
* Fill-shader smoothing (`0`…`1`). CPU queries must use the same coarsened lattice as
|
|
6222
|
+
* `get_texel.glsl` or city labels / inspector values will not match the painted bands.
|
|
6223
|
+
*/
|
|
6224
|
+
smoothing?: number;
|
|
6225
|
+
/** Encoded-tile edge padding in texels, used to quantize the smoothing scale like the shader. */
|
|
6226
|
+
edgePad?: number;
|
|
6227
|
+
};
|
|
6228
|
+
|
|
5547
6229
|
/**
|
|
5548
6230
|
* Sample style properties control how encoded data gets rendered on a map. Sample rendering is performed by sampling
|
|
5549
6231
|
* values from the underlying data and mapping it to a desired result, such as color fill, contour line, etc.
|
|
@@ -5604,6 +6286,67 @@ export declare interface SampleStyleSpec {
|
|
|
5604
6286
|
drawRange: Partial<ValueRange>;
|
|
5605
6287
|
}
|
|
5606
6288
|
|
|
6289
|
+
/**
|
|
6290
|
+
* The type of shader.
|
|
6291
|
+
*/
|
|
6292
|
+
declare const enum ShaderType {
|
|
6293
|
+
VERTEX = "vertex",
|
|
6294
|
+
FRAGMENT = "fragment"
|
|
6295
|
+
}
|
|
6296
|
+
|
|
6297
|
+
export declare type Size = {
|
|
6298
|
+
width: number;
|
|
6299
|
+
height: number;
|
|
6300
|
+
};
|
|
6301
|
+
|
|
6302
|
+
/**
|
|
6303
|
+
* Definition of a MapsGL layer ordering slot.
|
|
6304
|
+
* Slots are logical bands; Mapbox/MapLibre adapters project them onto the host style stack.
|
|
6305
|
+
*/
|
|
6306
|
+
export declare interface SlotDefinition {
|
|
6307
|
+
id: SlotId;
|
|
6308
|
+
/**
|
|
6309
|
+
* Classic Mapbox / MapLibre: place this slot's ceiling below this style layer id.
|
|
6310
|
+
*/
|
|
6311
|
+
beforeId?: string;
|
|
6312
|
+
/**
|
|
6313
|
+
* Mapbox Standard only: place this slot's layers in a Standard style slot.
|
|
6314
|
+
*/
|
|
6315
|
+
mapboxSlot?: MapboxStandardSlot;
|
|
6316
|
+
}
|
|
6317
|
+
|
|
6318
|
+
/** Identifier for a MapsGL ordering slot (built-in or user-defined). */
|
|
6319
|
+
export declare type SlotId = string;
|
|
6320
|
+
|
|
6321
|
+
/**
|
|
6322
|
+
* Options for configuring the slot registry at controller construction.
|
|
6323
|
+
*/
|
|
6324
|
+
export declare interface SlotRegistryOptions {
|
|
6325
|
+
/**
|
|
6326
|
+
* Partial overrides for built-in or custom slots, keyed by slot id.
|
|
6327
|
+
* Use {@link SlotRegistry.defineSlot} / {@link SlotRegistry.setSlotBeforeId} /
|
|
6328
|
+
* {@link SlotRegistry.setSlotOrder} at runtime for full control.
|
|
6329
|
+
*/
|
|
6330
|
+
slots?: Partial<Record<SlotId, Omit<SlotDefinition, 'id'>>>;
|
|
6331
|
+
/**
|
|
6332
|
+
* Overrides for the default layer-type → slot mapping.
|
|
6333
|
+
*/
|
|
6334
|
+
typeMapping?: Partial<Record<LayerType, SlotId>>;
|
|
6335
|
+
/**
|
|
6336
|
+
* Default within-slot stack ranks keyed by weather layer code / stack key
|
|
6337
|
+
* (higher paints above siblings in the same slot). Merged over built-in defaults.
|
|
6338
|
+
*/
|
|
6339
|
+
stackRanks?: Record<string, number>;
|
|
6340
|
+
/**
|
|
6341
|
+
* Optional override for resolving a layer's stack rank. Return `undefined` to fall
|
|
6342
|
+
* through to {@link stackRanks} / built-in rules.
|
|
6343
|
+
*/
|
|
6344
|
+
resolveStackRank?: (ctx: StackRankContext) => number | undefined;
|
|
6345
|
+
}
|
|
6346
|
+
|
|
6347
|
+
/** Stable style-layer id for a slot sentinel (ceiling marker). */
|
|
6348
|
+
export declare const slotSentinelId: (slotId: SlotId) => string;
|
|
6349
|
+
|
|
5607
6350
|
export declare type SortProperty = {
|
|
5608
6351
|
property: string;
|
|
5609
6352
|
direction?: 'asc' | 'desc';
|
|
@@ -5851,6 +6594,14 @@ export declare interface SourceSpecification {
|
|
|
5851
6594
|
transformMetadata?: (source: DataSource, data: Record<string, any>, options?: SourceMetadataTransformOptions) => Partial<SourceMetadataSchema>;
|
|
5852
6595
|
}
|
|
5853
6596
|
|
|
6597
|
+
/** Context passed to a custom stack-rank resolver. */
|
|
6598
|
+
export declare interface StackRankContext {
|
|
6599
|
+
layerId: string;
|
|
6600
|
+
/** Weather layer code or other lookup key (often the weather id when the instance id differs). */
|
|
6601
|
+
stackKey?: string;
|
|
6602
|
+
type?: LayerType | string;
|
|
6603
|
+
}
|
|
6604
|
+
|
|
5854
6605
|
export declare class State<T> extends EventDispatcher {
|
|
5855
6606
|
#private;
|
|
5856
6607
|
get value(): T;
|
|
@@ -5983,12 +6734,30 @@ export declare interface StyledImageRenderer {
|
|
|
5983
6734
|
|
|
5984
6735
|
export declare type StyleEvaulatorFunction<T> = (properties: Record<string, any>) => T;
|
|
5985
6736
|
|
|
6737
|
+
/**
|
|
6738
|
+
* The expression *type* and operator vocabulary are owned by the shared weather spec package
|
|
6739
|
+
* (`@xweather/mapsgl-weather-spec`) so they can be authored declaratively in layer specs there;
|
|
6740
|
+
* re-exported here to preserve existing import paths. Only the type/vocabulary moved — the
|
|
6741
|
+
* interpreter below, animation-time globals, and legacy-filter-migration helpers are runtime
|
|
6742
|
+
* concerns and stay in webgl-maps.
|
|
6743
|
+
*/
|
|
5986
6744
|
export declare interface StyleExpression {
|
|
5987
6745
|
property: string;
|
|
5988
6746
|
type?: 'identity' | 'expression';
|
|
5989
6747
|
evaluator?: (value: any) => any;
|
|
5990
6748
|
}
|
|
5991
6749
|
|
|
6750
|
+
/**
|
|
6751
|
+
* Style layer descriptors used when resolving a default `underlay` slot ceiling from the
|
|
6752
|
+
* loaded Mapbox/MapLibre style.
|
|
6753
|
+
*/
|
|
6754
|
+
export declare type StyleLayerRef = {
|
|
6755
|
+
id?: string;
|
|
6756
|
+
type?: string;
|
|
6757
|
+
'source-layer'?: string;
|
|
6758
|
+
sourceLayer?: string;
|
|
6759
|
+
};
|
|
6760
|
+
|
|
5992
6761
|
export declare const styles: {
|
|
5993
6762
|
datasets: {};
|
|
5994
6763
|
colorscales: {
|
|
@@ -6243,6 +7012,29 @@ export declare interface TaskRunnerConfig<Task extends DownloadTask<any>> {
|
|
|
6243
7012
|
taskTransformer?: (task: Task) => Task;
|
|
6244
7013
|
}
|
|
6245
7014
|
|
|
7015
|
+
/**
|
|
7016
|
+
* Data that can be used to create a texture.
|
|
7017
|
+
*/
|
|
7018
|
+
export declare type TexImage2DData = GLintptr | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | ImageBitmap | ImageData | ArrayBufferView | ArrayBuffer | undefined;
|
|
7019
|
+
|
|
7020
|
+
/**
|
|
7021
|
+
* TextMetrics is a set of metrics for a single character in a font layout spec.
|
|
7022
|
+
*/
|
|
7023
|
+
export declare type TextMetrics_2 = {
|
|
7024
|
+
id: number;
|
|
7025
|
+
index: number;
|
|
7026
|
+
char: string;
|
|
7027
|
+
width: number;
|
|
7028
|
+
height: number;
|
|
7029
|
+
xoffset: number;
|
|
7030
|
+
yoffset: number;
|
|
7031
|
+
xadvance: number;
|
|
7032
|
+
chnl: number;
|
|
7033
|
+
x: number;
|
|
7034
|
+
y: number;
|
|
7035
|
+
page: number;
|
|
7036
|
+
};
|
|
7037
|
+
|
|
6246
7038
|
/**
|
|
6247
7039
|
* Text style properties control how text gets rendered on a map from vector features. Use these properties on
|
|
6248
7040
|
* conjunction with `symbol` to define the style for a text layer.
|
|
@@ -6606,6 +7398,10 @@ declare abstract class TileLayer<Data> extends WebGLLayer<TileSource> {
|
|
|
6606
7398
|
/**
|
|
6607
7399
|
* Returns whether expired tiles can still be used for rendering/LOD fallback.
|
|
6608
7400
|
* Default is disabled so stale tiles are not rendered after data refreshes.
|
|
7401
|
+
*
|
|
7402
|
+
* For dynamic (frequently-updated) GeoJSON sources such as the day/night terminator, keep
|
|
7403
|
+
* rendering the last-good tiles while the source re-slices the new data instead of blanking the
|
|
7404
|
+
* layer during the async reslice window. Mirrors {@link DataQueryTileLayer}.
|
|
6609
7405
|
*/
|
|
6610
7406
|
shouldRenderExpiredTiles(): boolean;
|
|
6611
7407
|
refresh(clear?: boolean): void;
|
|
@@ -6642,11 +7438,13 @@ declare abstract class TileLayer<Data> extends WebGLLayer<TileSource> {
|
|
|
6642
7438
|
* Returns the tile at the specified geographic coordinate.
|
|
6643
7439
|
* @param coord - Geographic coordinate to get the tile for.
|
|
6644
7440
|
* @param allowPartials - Whether to allow returning a tile that only partially contains the queried coordinate.
|
|
6645
|
-
* @returns Tile
|
|
7441
|
+
* @returns Tile, position within the tile for the specified coordinate, and the renderable the tile was resolved
|
|
7442
|
+
* from when a partial (ancestor or descendant) was used.
|
|
6646
7443
|
*/
|
|
6647
7444
|
protected getTile(coord: Coordinate, zoom?: number, allowPartials?: boolean): {
|
|
6648
7445
|
tile: Tile<Data>;
|
|
6649
7446
|
position: Point;
|
|
7447
|
+
renderable?: AnyTileRenderable;
|
|
6650
7448
|
} | undefined;
|
|
6651
7449
|
/**
|
|
6652
7450
|
* Returns the visible tile coordinates based on the map's current viewport.
|
|
@@ -6712,6 +7510,97 @@ export declare type TilePositionData = {
|
|
|
6712
7510
|
};
|
|
6713
7511
|
|
|
6714
7512
|
export declare type TileQuadrant = 'tl' | 'tc' | 'tr' | 'ml' | 'mc' | 'mr' | 'bl' | 'bc' | 'br';
|
|
7513
|
+
|
|
7514
|
+
/**
|
|
7515
|
+
* A renderable tile object that contains the necessary transformation information for rendering a tile to a WebGL
|
|
7516
|
+
* context on a map.
|
|
7517
|
+
* @template Data The type of data that the tile contains.
|
|
7518
|
+
*/
|
|
7519
|
+
export declare class TileRenderable<Data> {
|
|
7520
|
+
/**
|
|
7521
|
+
* The tile to be rendered.
|
|
7522
|
+
*/
|
|
7523
|
+
tile: Tile<Data>;
|
|
7524
|
+
/**
|
|
7525
|
+
* The scale to apply to the tile's mesh.
|
|
7526
|
+
*/
|
|
7527
|
+
readonly scale: Vector3;
|
|
7528
|
+
/**
|
|
7529
|
+
* The offset to apply to the tile's mesh.
|
|
7530
|
+
*/
|
|
7531
|
+
readonly offset: Vector3;
|
|
7532
|
+
/**
|
|
7533
|
+
* The UV offset and scale to use when sampling texture data for the tile. If the tile is not a partial tile,
|
|
7534
|
+
* then this value is `[0, 0, 1, 1]`.
|
|
7535
|
+
*/
|
|
7536
|
+
uvOffset: [number, number, number, number];
|
|
7537
|
+
/**
|
|
7538
|
+
* Scale of the mesh relative to the partial tile's scale. If the tile is not a partial tile, then this value
|
|
7539
|
+
* is `1`.
|
|
7540
|
+
*/
|
|
7541
|
+
partialScale: number;
|
|
7542
|
+
/**
|
|
7543
|
+
* The tile coordinate of the tile being rendered. This may be different than the tile's actual coordinate if
|
|
7544
|
+
* the tile is a partial tile.
|
|
7545
|
+
*/
|
|
7546
|
+
coord: TileCoord;
|
|
7547
|
+
/** Whether this renderable may use expired tile data (layer-level opt-in). */
|
|
7548
|
+
allowExpired: boolean;
|
|
7549
|
+
/**
|
|
7550
|
+
* Resolved textures or vector data for this renderable. When set, draw passes use this instead of
|
|
7551
|
+
* querying tile data or timeState. Resolved at LOD resolution time for both time-series and non-time-series.
|
|
7552
|
+
*/
|
|
7553
|
+
resolvedData?: ResolvedTileData;
|
|
7554
|
+
/**
|
|
7555
|
+
* The hash of the tile coordinate of the tile being rendered.
|
|
7556
|
+
* @readonly
|
|
7557
|
+
*/
|
|
7558
|
+
get hash(): string;
|
|
7559
|
+
constructor(tile: Tile<Data>, scale: Point, offset: Point, uvOffset?: UVOffset);
|
|
7560
|
+
/**
|
|
7561
|
+
* Updates an existing renderable in place to avoid per-frame allocations.
|
|
7562
|
+
* @param tile - The tile to be rendered.
|
|
7563
|
+
* @param coord - The unnormalized tile coordinate of the tile.
|
|
7564
|
+
*/
|
|
7565
|
+
updateFromTile(tile: Tile<Data>, coord: TileCoord): void;
|
|
7566
|
+
/**
|
|
7567
|
+
* Updates an existing renderable in place to avoid per-frame allocations.
|
|
7568
|
+
* @param partial - The tile partial to be rendered.
|
|
7569
|
+
* @param coord - The unnormalized tile coordinate of the tile.
|
|
7570
|
+
*/
|
|
7571
|
+
updateFromAncestorPartial(partial: TilePartial<Data>, coord: TileCoord): void;
|
|
7572
|
+
/**
|
|
7573
|
+
* Updates an existing renderable in place to avoid per-frame allocations.
|
|
7574
|
+
* @param partial - The tile partial to be rendered.
|
|
7575
|
+
* @param coord - The unnormalized tile coordinate of the tile.
|
|
7576
|
+
*/
|
|
7577
|
+
updateFromDescendantPartial(partial: TilePartial<Data>, coord: TileCoord): void;
|
|
7578
|
+
/**
|
|
7579
|
+
* Returns the view matrix for the tile including its scale and translation transformations.
|
|
7580
|
+
*/
|
|
7581
|
+
getViewMatrix(): ProjectionMatrix;
|
|
7582
|
+
/**
|
|
7583
|
+
* Creates and returns a new TileRenderable object from a source tile and a coordinate.
|
|
7584
|
+
* @param tile - The source tile.
|
|
7585
|
+
* @param coord - The coordinate of the tile being rendered.
|
|
7586
|
+
* @returns A new TileRenderable object.
|
|
7587
|
+
*/
|
|
7588
|
+
static fromTile<Data>(tile: Tile<Data>, coord: TileCoord): TileRenderable<Data>;
|
|
7589
|
+
/**
|
|
7590
|
+
* Creates and returns a TileRenderable object from an ancestor of the tile.
|
|
7591
|
+
* @param partial - The tile partial to be rendered.
|
|
7592
|
+
* @param coord - The unnormalized tile coordinate of the tile.
|
|
7593
|
+
* @returns
|
|
7594
|
+
*/
|
|
7595
|
+
static fromAncestorPartial<Data>(partial: TilePartial<Data>, coord: TileCoord): TileRenderable<Data>;
|
|
7596
|
+
/**
|
|
7597
|
+
* Creates and returns a TileRenderable object from an descendant of the tile.
|
|
7598
|
+
* @param partial - The tile partial to be rendered.
|
|
7599
|
+
* @param coord - The unnormalized tile coordinate of the tile.
|
|
7600
|
+
* @returns
|
|
7601
|
+
*/
|
|
7602
|
+
static fromDescendantPartial<Data>(partial: TilePartial<Data>, coord: TileCoord): TileRenderable<Data>;
|
|
7603
|
+
}
|
|
6715
7604
|
|
|
6716
7605
|
/**
|
|
6717
7606
|
* Options for a tile request.
|
|
@@ -7103,8 +7992,9 @@ export declare class TimeAnimation extends Animation {
|
|
|
7103
7992
|
playFromDate(date: Date): void;
|
|
7104
7993
|
/**
|
|
7105
7994
|
* Advances the animation to a specific position based on a date.
|
|
7106
|
-
* @param date - The date to advance to.
|
|
7107
|
-
*
|
|
7995
|
+
* @param date - The date to advance to. Must be within the animation's start and end date range.
|
|
7996
|
+
* @throws {TypeError} If `date` is not a valid `Date`.
|
|
7997
|
+
* @throws {RangeError} If `date` is outside the animation's start and end date range.
|
|
7108
7998
|
*/
|
|
7109
7999
|
goToDate(date: Date): void;
|
|
7110
8000
|
/**
|
|
@@ -7112,6 +8002,12 @@ export declare class TimeAnimation extends Animation {
|
|
|
7112
8002
|
* @param offset - The time offset in milliseconds.
|
|
7113
8003
|
*/
|
|
7114
8004
|
goToOffset(offset: number): void;
|
|
8005
|
+
/**
|
|
8006
|
+
* Gets the position of the animation based on a date clamped to the start and end date. The position is a value
|
|
8007
|
+
* between 0 and 1, where 0 is the start date and 1 is the end date.
|
|
8008
|
+
* @param date - The date to get the position from.
|
|
8009
|
+
* @returns The position of the animation.
|
|
8010
|
+
*/
|
|
7115
8011
|
getPositionFromDate(date: Date): number;
|
|
7116
8012
|
/**
|
|
7117
8013
|
* Restricts the animation to a specific date range relative to the overall start and end date.
|
|
@@ -7128,6 +8024,7 @@ export declare class TimeAnimation extends Animation {
|
|
|
7128
8024
|
private _captureRangeChangeAnchorDate;
|
|
7129
8025
|
/**
|
|
7130
8026
|
* Restores the anchor date for the range change event.
|
|
8027
|
+
* Clamps to the new range when the previous playhead falls outside it.
|
|
7131
8028
|
*/
|
|
7132
8029
|
private _restoreRangeChangeAnchorDate;
|
|
7133
8030
|
}
|
|
@@ -7301,7 +8198,7 @@ export declare type TimeSeriesOperation = {
|
|
|
7301
8198
|
period?: TimeSeriesOperationPeriod;
|
|
7302
8199
|
/**
|
|
7303
8200
|
* Whether to aggregate the data, meaning to combine the data from multiple intervals of the desired period into a
|
|
7304
|
-
* single value.
|
|
8201
|
+
* single value. When `period` is `full` (or `none`), this aggregates across the entire set of intervals.
|
|
7305
8202
|
*/
|
|
7306
8203
|
aggregate?: boolean;
|
|
7307
8204
|
/**
|
|
@@ -7319,13 +8216,14 @@ export declare type TimeSeriesOperation = {
|
|
|
7319
8216
|
* Period of time to perform an operation on the data within a time series.
|
|
7320
8217
|
*
|
|
7321
8218
|
* - `none`: Does not perform the operation on a periodic basis.
|
|
8219
|
+
* - `full`: Performs the operation once across the entire set of intervals (not grouped by calendar period).
|
|
7322
8220
|
* - `hour`: Performs the operation on an hourly basis.
|
|
7323
8221
|
* - `day`: Performs the operation on a daily basis.
|
|
7324
8222
|
* - `week`: Performs the operation on a weekly basis.
|
|
7325
8223
|
* - `month`: Performs the operation on a monthly basis.
|
|
7326
8224
|
* - `year`: Performs the operation on a yearly basis.
|
|
7327
8225
|
*/
|
|
7328
|
-
export declare type TimeSeriesOperationPeriod = 'none' | 'hour' | 'day' | 'week' | 'month' | 'year';
|
|
8226
|
+
export declare type TimeSeriesOperationPeriod = 'none' | 'full' | 'hour' | 'day' | 'week' | 'month' | 'year';
|
|
7329
8227
|
|
|
7330
8228
|
/**
|
|
7331
8229
|
* Type of operation to perform on the data within a time series.
|
|
@@ -7347,74 +8245,14 @@ export declare type TimestampledPixel = {
|
|
|
7347
8245
|
pixel: RGB;
|
|
7348
8246
|
};
|
|
7349
8247
|
|
|
8248
|
+
export declare type TypedArray = Float64Array | Float32Array | Uint16Array | Int16Array | Uint32Array | Int32Array | Uint8Array | Int8Array | Uint8ClampedArray;
|
|
8249
|
+
|
|
7350
8250
|
/**
|
|
7351
8251
|
* A unit converter function.
|
|
7352
8252
|
*/
|
|
7353
8253
|
export declare type UnitConverter = (value: number, from: string, to: string) => number;
|
|
7354
8254
|
|
|
7355
|
-
/**
|
|
7356
|
-
* The supported units of measurement.
|
|
7357
|
-
*/
|
|
7358
|
-
declare const Units: {
|
|
7359
|
-
readonly temperature: {
|
|
7360
|
-
readonly C: "C";
|
|
7361
|
-
readonly F: "F";
|
|
7362
|
-
};
|
|
7363
|
-
readonly speed: {
|
|
7364
|
-
readonly kmh: "km/h";
|
|
7365
|
-
readonly mph: "mph";
|
|
7366
|
-
readonly ms: "m/s";
|
|
7367
|
-
readonly kts: "kts";
|
|
7368
|
-
};
|
|
7369
|
-
readonly pressure: {
|
|
7370
|
-
readonly mb: "mb";
|
|
7371
|
-
readonly pa: "Pa";
|
|
7372
|
-
readonly hPa: "hPa";
|
|
7373
|
-
readonly hg: "inHg";
|
|
7374
|
-
};
|
|
7375
|
-
readonly distance: {
|
|
7376
|
-
readonly m: "m";
|
|
7377
|
-
readonly km: "km";
|
|
7378
|
-
readonly ft: "ft";
|
|
7379
|
-
readonly mi: "mi";
|
|
7380
|
-
};
|
|
7381
|
-
readonly precipitation: {
|
|
7382
|
-
readonly mm: "mm";
|
|
7383
|
-
readonly cm: "cm";
|
|
7384
|
-
readonly in: "in";
|
|
7385
|
-
readonly m: "m";
|
|
7386
|
-
readonly ft: "ft";
|
|
7387
|
-
};
|
|
7388
|
-
readonly direction: {
|
|
7389
|
-
readonly deg: "°";
|
|
7390
|
-
};
|
|
7391
|
-
readonly time: {
|
|
7392
|
-
readonly hr: "hr";
|
|
7393
|
-
readonly min: "min";
|
|
7394
|
-
readonly sec: "sec";
|
|
7395
|
-
readonly ms: "ms";
|
|
7396
|
-
};
|
|
7397
|
-
readonly rate: {
|
|
7398
|
-
readonly mmhr: "mm/hr";
|
|
7399
|
-
readonly inhr: "in/hr";
|
|
7400
|
-
readonly mms: "mm/sec";
|
|
7401
|
-
readonly dbz: "dBZ";
|
|
7402
|
-
};
|
|
7403
|
-
readonly concentration: {
|
|
7404
|
-
readonly ppm: "ppm";
|
|
7405
|
-
readonly ugm3: "ug/m^3";
|
|
7406
|
-
};
|
|
7407
|
-
readonly ratio: {
|
|
7408
|
-
readonly percent: "%";
|
|
7409
|
-
};
|
|
7410
|
-
};
|
|
7411
|
-
|
|
7412
8255
|
export declare const units: {
|
|
7413
|
-
UnitSystem: {
|
|
7414
|
-
readonly metric: "metric";
|
|
7415
|
-
readonly imperial: "imperial";
|
|
7416
|
-
readonly custom: "custom";
|
|
7417
|
-
};
|
|
7418
8256
|
Units: {
|
|
7419
8257
|
readonly temperature: {
|
|
7420
8258
|
readonly C: "C";
|
|
@@ -7467,10 +8305,23 @@ export declare const units: {
|
|
|
7467
8305
|
readonly ratio: {
|
|
7468
8306
|
readonly percent: "%";
|
|
7469
8307
|
};
|
|
8308
|
+
readonly index: {
|
|
8309
|
+
readonly uvi: "uvi";
|
|
8310
|
+
readonly aqi: "aqi";
|
|
8311
|
+
readonly aqhi: "aqhi";
|
|
8312
|
+
};
|
|
8313
|
+
};
|
|
8314
|
+
miToM: (mi: number) => number;
|
|
8315
|
+
inToMM: (ins: number) => number;
|
|
8316
|
+
inToMMRate: (ins: number) => number;
|
|
8317
|
+
UnitSystem: {
|
|
8318
|
+
readonly metric: "metric";
|
|
8319
|
+
readonly imperial: "imperial";
|
|
8320
|
+
readonly custom: "custom";
|
|
7470
8321
|
};
|
|
7471
|
-
resolveMeasurementForUnits: (type: _units.
|
|
8322
|
+
resolveMeasurementForUnits: (type: _units.Measurement) => keyof MapUnits;
|
|
7472
8323
|
defaultUnits: Record<"metric" | "imperial", MapUnits>;
|
|
7473
|
-
getDefaultUnit: (type: _units.
|
|
8324
|
+
getDefaultUnit: (type: _units.Measurement, system: "metric" | "imperial" | "custom") => string;
|
|
7474
8325
|
getDefaultUnitsForSystem: (system: "metric" | "imperial" | "custom") => MapUnits;
|
|
7475
8326
|
equalUnits: (units1: MapUnits, units2: MapUnits) => boolean;
|
|
7476
8327
|
getSystemForUnits: (units: MapUnits) => "metric" | "imperial" | "custom";
|
|
@@ -7493,17 +8344,15 @@ export declare const units: {
|
|
|
7493
8344
|
kmToM: (km: number) => number;
|
|
7494
8345
|
ftToM: (ft: number) => number;
|
|
7495
8346
|
kmToMi: (km: number) => number;
|
|
7496
|
-
miToM: (mi: number) => number;
|
|
7497
8347
|
mmToIn: (mm: number) => number;
|
|
7498
|
-
inToMM: (ins: number) => number;
|
|
7499
8348
|
inToM: (ins: number) => number;
|
|
7500
|
-
inToMMRate: (ins: number) => number;
|
|
7501
8349
|
mmToMMRate: (mm: number) => number;
|
|
7502
8350
|
CtoFUnit: (c: number) => number;
|
|
7503
8351
|
FtoCUnit: (f: number) => number;
|
|
7504
8352
|
mphToMsUnit: (mph: number) => number;
|
|
7505
8353
|
msToMphUnit: (ms: number) => number;
|
|
7506
8354
|
dbzToMMRate: (dbz: number, perSecond?: boolean) => number;
|
|
8355
|
+
mmRateToDbz: (mmRate: number, perSecond?: boolean) => number;
|
|
7507
8356
|
degToDir: (d: number) => string;
|
|
7508
8357
|
getUnitPrecision: (unit: string) => number;
|
|
7509
8358
|
convert: (type: string, value: number, from: string, to: string) => number;
|
|
@@ -7512,9 +8361,12 @@ export declare const units: {
|
|
|
7512
8361
|
|
|
7513
8362
|
declare namespace _units {
|
|
7514
8363
|
export {
|
|
7515
|
-
UnitSystem,
|
|
7516
8364
|
Units,
|
|
8365
|
+
miToM,
|
|
8366
|
+
inToMM,
|
|
8367
|
+
inToMMRate,
|
|
7517
8368
|
Measurement,
|
|
8369
|
+
UnitSystem,
|
|
7518
8370
|
ConversionMeasurement,
|
|
7519
8371
|
resolveMeasurementForUnits,
|
|
7520
8372
|
defaultUnits,
|
|
@@ -7541,17 +8393,15 @@ declare namespace _units {
|
|
|
7541
8393
|
kmToM,
|
|
7542
8394
|
ftToM,
|
|
7543
8395
|
kmToMi,
|
|
7544
|
-
miToM,
|
|
7545
8396
|
mmToIn,
|
|
7546
|
-
inToMM,
|
|
7547
8397
|
inToM,
|
|
7548
|
-
inToMMRate,
|
|
7549
8398
|
mmToMMRate,
|
|
7550
8399
|
CtoFUnit,
|
|
7551
8400
|
FtoCUnit,
|
|
7552
8401
|
mphToMsUnit,
|
|
7553
8402
|
msToMphUnit,
|
|
7554
8403
|
dbzToMMRate,
|
|
8404
|
+
mmRateToDbz,
|
|
7555
8405
|
degToDir,
|
|
7556
8406
|
getUnitPrecision,
|
|
7557
8407
|
convert,
|
|
@@ -7592,10 +8442,191 @@ export declare const utils: {
|
|
|
7592
8442
|
};
|
|
7593
8443
|
};
|
|
7594
8444
|
|
|
7595
|
-
|
|
7596
|
-
|
|
7597
|
-
|
|
7598
|
-
|
|
8445
|
+
/**
|
|
8446
|
+
* Represents the offset and scale for sampling texture data as `[ xOffset, yOffset, xScale, yScale ]`.
|
|
8447
|
+
*/
|
|
8448
|
+
export declare type UVOffset = [number, number, number, number];
|
|
8449
|
+
|
|
8450
|
+
/**
|
|
8451
|
+
* Base class for all vectors.
|
|
8452
|
+
*/
|
|
8453
|
+
export declare class Vector<T> {
|
|
8454
|
+
/**
|
|
8455
|
+
* The raw value of the vector.
|
|
8456
|
+
* @readonly
|
|
8457
|
+
*/
|
|
8458
|
+
get value(): T;
|
|
8459
|
+
/**
|
|
8460
|
+
* Assigns the vector values from an array.
|
|
8461
|
+
* @param array - The array to assign the values from.
|
|
8462
|
+
* @param offset - An optional offset to start assigning the values at.
|
|
8463
|
+
*/
|
|
8464
|
+
fromArray(array: number[], offset?: number): Vector<T>;
|
|
8465
|
+
/**
|
|
8466
|
+
* Returns the vector as an array. If an array is provided, the values will be set to that array.
|
|
8467
|
+
* @param array - An optional array to set the values to.
|
|
8468
|
+
* @param offset - An optional offset to start setting the values at.
|
|
8469
|
+
* @returns The array representation of the vector.
|
|
8470
|
+
*/
|
|
8471
|
+
toArray(array?: number[], offset?: number): number[];
|
|
8472
|
+
}
|
|
8473
|
+
|
|
8474
|
+
/**
|
|
8475
|
+
* Class representing a 2D vector and consisting of an ordered pair of numbers (x, y).
|
|
8476
|
+
*/
|
|
8477
|
+
export declare class Vector2 extends Vector<vec2> {
|
|
8478
|
+
private _value;
|
|
8479
|
+
get value(): vec2;
|
|
8480
|
+
get elements(): number;
|
|
8481
|
+
get x(): number;
|
|
8482
|
+
set x(value: number);
|
|
8483
|
+
get y(): number;
|
|
8484
|
+
set y(value: number);
|
|
8485
|
+
constructor(x?: number, y?: number);
|
|
8486
|
+
fromArray(array: number[], offset?: number): Vector2;
|
|
8487
|
+
toArray(array?: number[], offset?: number): number[];
|
|
8488
|
+
fromObject({ x, y }: {
|
|
8489
|
+
x: number;
|
|
8490
|
+
y: number;
|
|
8491
|
+
}): Vector2;
|
|
8492
|
+
toObject(): {
|
|
8493
|
+
x: number;
|
|
8494
|
+
y: number;
|
|
8495
|
+
};
|
|
8496
|
+
set(x: number, y: number): Vector2;
|
|
8497
|
+
setScalar(v: number): Vector2;
|
|
8498
|
+
length(): number;
|
|
8499
|
+
angle(): number;
|
|
8500
|
+
copy(v: Vector2): Vector2;
|
|
8501
|
+
clone(): Vector2;
|
|
8502
|
+
add(v: Vector2): Vector2;
|
|
8503
|
+
addScalar(s: number): Vector2;
|
|
8504
|
+
subtract(v: Vector2): Vector2;
|
|
8505
|
+
subtractScalar(s: number): Vector2;
|
|
8506
|
+
multiply(v: Vector2): Vector2;
|
|
8507
|
+
multiplyScalar(s: number): Vector2;
|
|
8508
|
+
divide(v: Vector2): Vector2;
|
|
8509
|
+
divideScalar(s: number): Vector2;
|
|
8510
|
+
distanceTo(v: Vector2): number;
|
|
8511
|
+
dot(v: Vector2): number;
|
|
8512
|
+
equals(v: Vector2): boolean;
|
|
8513
|
+
lerp(v: Vector2, factor: number): Vector2;
|
|
8514
|
+
normalize(): Vector2;
|
|
8515
|
+
scale(v: number): Vector2;
|
|
8516
|
+
applyMatrix3(m: Matrix3): Vector2;
|
|
8517
|
+
applyMatrix4(m: Matrix4): Vector2;
|
|
8518
|
+
}
|
|
8519
|
+
|
|
8520
|
+
/**
|
|
8521
|
+
* Class representing a 3D vector and consisting of an ordered triplet of numbers (x, y, z).
|
|
8522
|
+
*/
|
|
8523
|
+
export declare class Vector3 extends Vector<vec3> {
|
|
8524
|
+
private _value;
|
|
8525
|
+
get value(): vec3;
|
|
8526
|
+
get x(): number;
|
|
8527
|
+
set x(value: number);
|
|
8528
|
+
get y(): number;
|
|
8529
|
+
set y(value: number);
|
|
8530
|
+
get z(): number;
|
|
8531
|
+
set z(value: number);
|
|
8532
|
+
get elements(): number;
|
|
8533
|
+
constructor(x?: number, y?: number, z?: number);
|
|
8534
|
+
fromArray(array: number[], offset?: number): Vector3;
|
|
8535
|
+
toArray(array?: number[], offset?: number): number[];
|
|
8536
|
+
fromObject({ x, y, z }: {
|
|
8537
|
+
x: number;
|
|
8538
|
+
y: number;
|
|
8539
|
+
z: number;
|
|
8540
|
+
}): Vector3;
|
|
8541
|
+
toObject(): {
|
|
8542
|
+
x: number;
|
|
8543
|
+
y: number;
|
|
8544
|
+
z: number;
|
|
8545
|
+
};
|
|
8546
|
+
set(x: number, y: number, z: number): Vector3;
|
|
8547
|
+
setScalar(v: number): Vector3;
|
|
8548
|
+
length(): number;
|
|
8549
|
+
distanceToSquared(v: Vector3): number;
|
|
8550
|
+
angle(): number;
|
|
8551
|
+
copy(v: Vector3): Vector3;
|
|
8552
|
+
clone(): Vector3;
|
|
8553
|
+
add(v: Vector3): Vector3;
|
|
8554
|
+
addScalar(s: number): Vector3;
|
|
8555
|
+
subtract(v: Vector3): Vector3;
|
|
8556
|
+
subtractScalar(s: number): Vector3;
|
|
8557
|
+
subVectors(a: Vector3, b: Vector3): Vector3;
|
|
8558
|
+
multiply(v: Vector3): Vector3;
|
|
8559
|
+
multiplyScalar(s: number): Vector3;
|
|
8560
|
+
divide(v: Vector3): Vector3;
|
|
8561
|
+
divideScalar(s: number): Vector3;
|
|
8562
|
+
distanceTo(v: Vector3): number;
|
|
8563
|
+
angleTo(v: Vector3): number;
|
|
8564
|
+
dot(v: Vector3): number;
|
|
8565
|
+
equals(v: Vector3): boolean;
|
|
8566
|
+
lerp(v: Vector3, factor: number): Vector3;
|
|
8567
|
+
normalize(): Vector3;
|
|
8568
|
+
scale(v: number): Vector3;
|
|
8569
|
+
rotateX(angle: number): Vector3;
|
|
8570
|
+
rotateY(angle: number): Vector3;
|
|
8571
|
+
rotateZ(angle: number): Vector3;
|
|
8572
|
+
applyEuler(e: Euler): Vector3;
|
|
8573
|
+
applyMatrix3(m: Matrix3): Vector3;
|
|
8574
|
+
applyMatrix4(m: Matrix4): Vector3;
|
|
8575
|
+
applyQuaternion(q: Quaternion): Vector3;
|
|
8576
|
+
negate(): Vector3;
|
|
8577
|
+
}
|
|
8578
|
+
|
|
8579
|
+
/**
|
|
8580
|
+
* Class representing a 4D vector and consisting of an ordered quadruplet of numbers (x, y, z, w).
|
|
8581
|
+
*/
|
|
8582
|
+
export declare class Vector4 extends Vector<vec4> {
|
|
8583
|
+
private _value;
|
|
8584
|
+
get value(): vec4;
|
|
8585
|
+
get x(): number;
|
|
8586
|
+
set x(value: number);
|
|
8587
|
+
get y(): number;
|
|
8588
|
+
set y(value: number);
|
|
8589
|
+
get z(): number;
|
|
8590
|
+
set z(value: number);
|
|
8591
|
+
get w(): number;
|
|
8592
|
+
set w(value: number);
|
|
8593
|
+
get elements(): number;
|
|
8594
|
+
constructor(x?: number, y?: number, z?: number, w?: number);
|
|
8595
|
+
fromArray(array: number[], offset?: number): Vector4;
|
|
8596
|
+
toArray(array?: number[], offset?: number): number[];
|
|
8597
|
+
fromObject({ x, y, z, w }: {
|
|
8598
|
+
x: number;
|
|
8599
|
+
y: number;
|
|
8600
|
+
z: number;
|
|
8601
|
+
w: number;
|
|
8602
|
+
}): Vector4;
|
|
8603
|
+
toObject(): {
|
|
8604
|
+
x: number;
|
|
8605
|
+
y: number;
|
|
8606
|
+
z: number;
|
|
8607
|
+
w: number;
|
|
8608
|
+
};
|
|
8609
|
+
set(x: number, y: number, z: number, w: number): Vector4;
|
|
8610
|
+
setScalar(v: number): Vector4;
|
|
8611
|
+
length(): number;
|
|
8612
|
+
copy(v: Vector4): Vector4;
|
|
8613
|
+
clone(): Vector4;
|
|
8614
|
+
add(v: Vector4): Vector4;
|
|
8615
|
+
addScalar(s: number): Vector4;
|
|
8616
|
+
subtract(v: Vector4): Vector4;
|
|
8617
|
+
subtractScalar(s: number): Vector4;
|
|
8618
|
+
multiply(v: Vector4): Vector4;
|
|
8619
|
+
multiplyScalar(s: number): Vector4;
|
|
8620
|
+
divide(v: Vector4): Vector4;
|
|
8621
|
+
divideScalar(s: number): Vector4;
|
|
8622
|
+
distanceTo(v: Vector4): number;
|
|
8623
|
+
dot(v: Vector4): number;
|
|
8624
|
+
equals(v: Vector4): boolean;
|
|
8625
|
+
lerp(v: Vector4, factor: number): Vector4;
|
|
8626
|
+
normalize(): Vector4;
|
|
8627
|
+
scale(v: number): Vector4;
|
|
8628
|
+
applyMatrix4(m: Matrix4): Vector4;
|
|
8629
|
+
}
|
|
7599
8630
|
|
|
7600
8631
|
/**
|
|
7601
8632
|
* Represents the configuration for a vector tile data source.
|
|
@@ -7652,6 +8683,13 @@ export declare class VectorTileSource extends TileSource<VectorTileData, VectorS
|
|
|
7652
8683
|
|
|
7653
8684
|
export declare const version: string;
|
|
7654
8685
|
|
|
8686
|
+
export declare interface ViewBounds {
|
|
8687
|
+
left: number;
|
|
8688
|
+
right: number;
|
|
8689
|
+
top: number;
|
|
8690
|
+
bottom: number;
|
|
8691
|
+
}
|
|
8692
|
+
|
|
7655
8693
|
export declare const weather: {
|
|
7656
8694
|
/**
|
|
7657
8695
|
* @deprecated
|
|
@@ -7749,6 +8787,10 @@ export declare interface WeatherLayerMetadata {
|
|
|
7749
8787
|
* Update frequency of the layer's data.
|
|
7750
8788
|
*/
|
|
7751
8789
|
updateInterval: string;
|
|
8790
|
+
/**
|
|
8791
|
+
* Optional thumbnail image URL for the weather layer.
|
|
8792
|
+
*/
|
|
8793
|
+
imageUrl?: string;
|
|
7752
8794
|
}
|
|
7753
8795
|
|
|
7754
8796
|
/**
|
|
@@ -7846,6 +8888,18 @@ export declare type WeatherLayerOptions = {
|
|
|
7846
8888
|
* parameters and per-feature animation controllers.
|
|
7847
8889
|
*/
|
|
7848
8890
|
timeline: TimeAnimation;
|
|
8891
|
+
/**
|
|
8892
|
+
* MapsGL ordering slot for this weather layer. When omitted, the slot is chosen from the
|
|
8893
|
+
* layer type. Use with {@link MapController.defineSlot} / {@link MapController.moveLayerToSlot}.
|
|
8894
|
+
* Prefer this over a host `beforeId` when targeting a logical band; an explicit `beforeId`
|
|
8895
|
+
* argument to {@link MapController.addWeatherLayer} still wins for host placement.
|
|
8896
|
+
*/
|
|
8897
|
+
slot?: string;
|
|
8898
|
+
/**
|
|
8899
|
+
* Within-slot stack rank (higher paints above siblings). When omitted, defaults are
|
|
8900
|
+
* resolved from the weather layer code (e.g. radar above satellite above other underlays).
|
|
8901
|
+
*/
|
|
8902
|
+
stackRank?: number;
|
|
7849
8903
|
/**
|
|
7850
8904
|
* Options for configuring a mask to apply to the layer.
|
|
7851
8905
|
*/
|
|
@@ -7863,6 +8917,11 @@ export declare class WeatherLayerProvider {
|
|
|
7863
8917
|
constructor(account: Account);
|
|
7864
8918
|
initialize(account: Account, style: MapStyle): Promise<void>;
|
|
7865
8919
|
isWeatherLayer(code: string): boolean;
|
|
8920
|
+
/**
|
|
8921
|
+
* Returns the identifiers for all weather layers supported by this SDK build.
|
|
8922
|
+
* Values come from the provider's `layers` configuration set.
|
|
8923
|
+
*/
|
|
8924
|
+
getSupportedLayerIds(): Array<string>;
|
|
7866
8925
|
/**
|
|
7867
8926
|
* Returns whether or not the specified weather code is deprecated.
|
|
7868
8927
|
*/
|
|
@@ -7895,7 +8954,9 @@ constructor(account: Account);
|
|
|
7895
8954
|
export declare type WeatherLayerStyle = `${WeatherLayerType}` | 'composite';
|
|
7896
8955
|
|
|
7897
8956
|
export declare type WeatherLayerType = Exclude<LayerType, 'particles' | 'query' | 'voronoi' | 'data' | 'debug'>;
|
|
7898
|
-
|
|
8957
|
+
|
|
8958
|
+
export declare type WebGLContext = WebGLRenderingContext | WebGL2RenderingContext;
|
|
8959
|
+
|
|
7899
8960
|
/**
|
|
7900
8961
|
* The base class for all layers rendered with WebGL. This class should not be instantiated directly but rather extended
|
|
7901
8962
|
* by a subclass that is responsible for rendering a specific type of data from a data source.
|
|
@@ -7959,6 +9020,7 @@ get mask(): LayerMask;
|
|
|
7959
9020
|
* @readonly
|
|
7960
9021
|
*/
|
|
7961
9022
|
get visible(): boolean;
|
|
9023
|
+
protected get hasMapController(): boolean;
|
|
7962
9024
|
/**
|
|
7963
9025
|
* Registers another layer as depending on this layer (for example it reads this layer via `queryFeatures`
|
|
7964
9026
|
* while this layer may be hidden). When the registry is non-empty, time-series data providers may load tiles even
|
|
@@ -8020,6 +9082,25 @@ get mask(): LayerMask;
|
|
|
8020
9082
|
* @param value - New value of the paint style property to set.
|
|
8021
9083
|
*/
|
|
8022
9084
|
setPaintProperty(property: string, value: any): void;
|
|
9085
|
+
/**
|
|
9086
|
+
* Sets the layer mask used to stencil this layer's output.
|
|
9087
|
+
* Pass `null` or `undefined` to clear any existing mask.
|
|
9088
|
+
* Prefer {@link MapController.setMask} when mask layers need to be created from weather
|
|
9089
|
+
* layer codes or `type: 'water' | 'land'` presets.
|
|
9090
|
+
* @param mask - Resolved mask with live layer instances, or `null`/`undefined` to clear.
|
|
9091
|
+
*/
|
|
9092
|
+
setMask(mask: LayerMask | null | undefined): void;
|
|
9093
|
+
/**
|
|
9094
|
+
* Whether this layer would write a stencil bit at the given coordinate when used as a mask.
|
|
9095
|
+
* Override in subclasses that act as masks (coverage, vector fill, …).
|
|
9096
|
+
* Default is `false` so unknown mask layers fail closed for query gating.
|
|
9097
|
+
*/
|
|
9098
|
+
coversCoordinate(coord: Coordinate, zoom: number, allowPartials?: boolean): boolean;
|
|
9099
|
+
/**
|
|
9100
|
+
* Whether a point passes this layer's mask (mirrors GPU stencil `mode` / `inverted`).
|
|
9101
|
+
* Returns `true` when the layer has no mask.
|
|
9102
|
+
*/
|
|
9103
|
+
passesMask(coord: Coordinate, zoom: number, allowPartials?: boolean): boolean;
|
|
8023
9104
|
/**
|
|
8024
9105
|
* Returns all features found for the layer at the specified coordinate and zoom level (optional). If a value for
|
|
8025
9106
|
* `zoom` is not provided, then the map's current zoom level will be used.
|