@xweather/mapsgl 1.9.4 → 1.10.0
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 +1335 -236
- 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,24 @@ export declare interface LayerSpecification {
|
|
|
3557
3849
|
* loaded tile bounds. Default is `false`.
|
|
3558
3850
|
*/
|
|
3559
3851
|
preloadLowQuality?: boolean;
|
|
3852
|
+
/**
|
|
3853
|
+
* MapsGL ordering slot id. Ignored unless layer slots are enabled on the
|
|
3854
|
+
* controller (`slots: true` or a slots configuration object). When omitted
|
|
3855
|
+
* and slots are enabled, the slot is chosen from the layer type
|
|
3856
|
+
* (e.g. raster/sample/fill → `underlay`, particle/line → `inlay`).
|
|
3857
|
+
* @see MapController.defineSlot
|
|
3858
|
+
*/
|
|
3859
|
+
slot?: string;
|
|
3860
|
+
/**
|
|
3861
|
+
* Within-slot stack rank (higher paints above siblings in the same slot).
|
|
3862
|
+
* When omitted, resolved from {@link stackKey} / weather code defaults (radar > satellite > other).
|
|
3863
|
+
*/
|
|
3864
|
+
stackRank?: number;
|
|
3865
|
+
/**
|
|
3866
|
+
* Lookup key for default stack ranks (typically the weather layer code when the
|
|
3867
|
+
* instance id differs). Used with {@link SlotRegistryOptions.stackRanks}.
|
|
3868
|
+
*/
|
|
3869
|
+
stackKey?: string;
|
|
3560
3870
|
/**
|
|
3561
3871
|
* Render style configuration.
|
|
3562
3872
|
* @see PaintStyleSpec
|
|
@@ -3598,6 +3908,16 @@ export declare type LayerTiming = {
|
|
|
3598
3908
|
* beginning of the time range.
|
|
3599
3909
|
*/
|
|
3600
3910
|
interleaved: boolean;
|
|
3911
|
+
/**
|
|
3912
|
+
* Number of neighboring time intervals before AND after the currently visible interval to preload once the
|
|
3913
|
+
* visible interval has finished loading.
|
|
3914
|
+
* @remarks
|
|
3915
|
+
* Preloading neighboring intervals hides the network latency of stepping or scrubbing to an adjacent interval by
|
|
3916
|
+
* fetching them ahead of time at a lower download priority, so the visible interval is never blocked waiting on
|
|
3917
|
+
* non-visible data. A value of `0` disables preloading. The value is clamped to a maximum of `3`. Defaults to `0`.
|
|
3918
|
+
* NOTE: Larger values increase network and memory usage since more interval data is retained at once.
|
|
3919
|
+
*/
|
|
3920
|
+
preload: number;
|
|
3601
3921
|
/**
|
|
3602
3922
|
* The operation to perform on the data within the time series. Defaults to `none`.
|
|
3603
3923
|
*/
|
|
@@ -3695,7 +4015,18 @@ declare abstract class Legend extends EventDispatcher {
|
|
|
3695
4015
|
options: Partial<LegendOptions>;
|
|
3696
4016
|
|
|
3697
4017
|
private _rendered;
|
|
4018
|
+
|
|
3698
4019
|
get measurement(): string | undefined;
|
|
4020
|
+
/**
|
|
4021
|
+
* The measurement's native units — the units the legend should always display in when
|
|
4022
|
+
* {@link measurementFixed} is `true`.
|
|
4023
|
+
*/
|
|
4024
|
+
get measurementUnits(): string | undefined;
|
|
4025
|
+
/**
|
|
4026
|
+
* When `true`, the legend ignores the map's unit state and always displays in its native
|
|
4027
|
+
* {@link measurementUnits} (see `weather-spec`'s `LegendMeasurementSpec`).
|
|
4028
|
+
*/
|
|
4029
|
+
get measurementFixed(): boolean;
|
|
3699
4030
|
get size(): Size;
|
|
3700
4031
|
get canvas(): HTMLCanvasElement;
|
|
3701
4032
|
get layout(): LegendLayout;
|
|
@@ -3934,6 +4265,21 @@ export declare interface MapAdapterOptions {
|
|
|
3934
4265
|
*/
|
|
3935
4266
|
account: Account;
|
|
3936
4267
|
units?: Partial<MapUnits>;
|
|
4268
|
+
/**
|
|
4269
|
+
* Layer ordering slots. Opt-in — omitted or `false` keeps insertion/`beforeId`
|
|
4270
|
+
* stacking from previous releases so existing integrations are unchanged.
|
|
4271
|
+
*
|
|
4272
|
+
* Pass `true` to enable built-in slots (underlay / inlay / text / overlay) with
|
|
4273
|
+
* type-based stacking and default host pinning (Mapbox/MapLibre `underlay` below
|
|
4274
|
+
* the bottom-most admin boundary). Pass a {@link SlotRegistryOptions} object to
|
|
4275
|
+
* enable slots and customize definitions, type mapping, or stack ranks.
|
|
4276
|
+
*
|
|
4277
|
+
* Within a slot, {@link SlotRegistryOptions.stackRanks} control relative order
|
|
4278
|
+
* (e.g. radar above satellite above other underlays). See {@link SlotRegistry}.
|
|
4279
|
+
*
|
|
4280
|
+
* @default undefined (disabled)
|
|
4281
|
+
*/
|
|
4282
|
+
slots?: boolean | SlotRegistryOptions;
|
|
3937
4283
|
/**
|
|
3938
4284
|
* The {@link TimeAnimationOptions} containing configuration options for the map controller's timeline.
|
|
3939
4285
|
*/
|
|
@@ -3965,6 +4311,9 @@ export declare interface MapAdapterOptions {
|
|
|
3965
4311
|
}>;
|
|
3966
4312
|
}
|
|
3967
4313
|
|
|
4314
|
+
/** Mapbox Standard slot ids in paint order (bottom → top). */
|
|
4315
|
+
export declare const MAPBOX_STANDARD_SLOTS: readonly MapboxStandardSlot[];
|
|
4316
|
+
|
|
3968
4317
|
export declare type MapboxMap = mapboxgl.Map;
|
|
3969
4318
|
|
|
3970
4319
|
/**
|
|
@@ -3975,6 +4324,7 @@ export declare class MapboxMapController extends MapController<MapboxMap> implem
|
|
|
3975
4324
|
get container(): HTMLElement;
|
|
3976
4325
|
get libraryInfo(): MapLibraryInfo;
|
|
3977
4326
|
constructor(map: MapboxMap, opts: MapAdapterOptions);
|
|
4327
|
+
initialize(): Promise<void>;
|
|
3978
4328
|
getSize(): Size;
|
|
3979
4329
|
setSize(size: NumericalOrStringSize): void;
|
|
3980
4330
|
getCenter(): Coordinate;
|
|
@@ -3989,12 +4339,47 @@ get container(): HTMLElement;
|
|
|
3989
4339
|
redraw(): void;
|
|
3990
4340
|
moveLayer(id: string, beforeId?: string): void;
|
|
3991
4341
|
|
|
4342
|
+
/**
|
|
4343
|
+
* Classic styles: prefer explicit slot.beforeId, else bottom-most admin boundary for `underlay`.
|
|
4344
|
+
*/
|
|
4345
|
+
getSlotHostBeforeId(slotId: SlotId): string | undefined;
|
|
4346
|
+
/**
|
|
4347
|
+
* Host style layer id this MapsGL layer is pinned below.
|
|
4348
|
+
*/
|
|
4349
|
+
getLayerHostBeforeId(layerId: string): string | undefined;
|
|
4350
|
+
|
|
3992
4351
|
getProjection(): ProjectionType;
|
|
3993
4352
|
setProjection(projection: ProjectionType): void;
|
|
3994
4353
|
|
|
4354
|
+
/**
|
|
4355
|
+
* Pin a MapsGL ordering slot into a Mapbox Standard style slot (`bottom` / `middle` / `top`),
|
|
4356
|
+
* or clear the pin (`undefined` / `null`) to restore adapter defaults
|
|
4357
|
+
* (`underlay` → `middle`, other built-ins → `top`).
|
|
4358
|
+
* Repositions slot sentinels and reprojects layers in the slot.
|
|
4359
|
+
*/
|
|
4360
|
+
setSlotMapboxSlot(slotId: SlotId, mapboxSlot?: MapboxStandardSlot | null): void;
|
|
4361
|
+
/**
|
|
4362
|
+
* Whether the current Mapbox style exposes Standard slots (`bottom` / `middle` / `top`).
|
|
4363
|
+
*/
|
|
4364
|
+
usesMapboxStandardSlots(): boolean;
|
|
4365
|
+
/**
|
|
4366
|
+
* Mapbox Standard slot ids available on the current style.
|
|
4367
|
+
* Empty when {@link usesMapboxStandardSlots} is false.
|
|
4368
|
+
*/
|
|
4369
|
+
listMapboxStandardSlots(): MapboxStandardSlot[];
|
|
4370
|
+
/**
|
|
4371
|
+
* Resolve the Mapbox Standard slot a MapsGL slot maps into, if any.
|
|
4372
|
+
* On Standard styles this is the explicit pin or an adapter default
|
|
4373
|
+
* (`underlay` → `middle`, other built-ins → `top`).
|
|
4374
|
+
*/
|
|
4375
|
+
getSlotMapboxSlot(slotId: SlotId): MapboxStandardSlot | undefined;
|
|
4376
|
+
|
|
3995
4377
|
dispose(all?: boolean): void;
|
|
3996
4378
|
}
|
|
3997
4379
|
|
|
4380
|
+
/** Mapbox Standard Style native slot bands. */
|
|
4381
|
+
export declare type MapboxStandardSlot = 'bottom' | 'middle' | 'top';
|
|
4382
|
+
|
|
3998
4383
|
export declare class MapCamera {
|
|
3999
4384
|
private _transform;
|
|
4000
4385
|
private _orientation;
|
|
@@ -4045,6 +4430,11 @@ declare abstract class MapController<MapType> extends EventDispatcher {
|
|
|
4045
4430
|
* The {@link WeatherLayerProvider} instance used for managing weather layer configurations and data.
|
|
4046
4431
|
*/
|
|
4047
4432
|
readonly weatherProvider: WeatherLayerProvider;
|
|
4433
|
+
/**
|
|
4434
|
+
* Whether layer ordering slots are enabled for this controller.
|
|
4435
|
+
* `true` when constructed with `slots: true` or a {@link SlotRegistryOptions} object.
|
|
4436
|
+
*/
|
|
4437
|
+
readonly useLayerSlots: boolean;
|
|
4048
4438
|
|
|
4049
4439
|
get needsViewportUpdate(): boolean;
|
|
4050
4440
|
|
|
@@ -4200,6 +4590,14 @@ get needsViewportUpdate(): boolean;
|
|
|
4200
4590
|
* @param value - New value of the paint style property to set.
|
|
4201
4591
|
*/
|
|
4202
4592
|
setPaintProperty(layerId: string, property: string, value: any): void;
|
|
4593
|
+
/**
|
|
4594
|
+
* Sets the stencil mask for the specified layer. Accepts the same mask configuration shape used when adding
|
|
4595
|
+
* layers (`type: 'water' | 'land'`, `layers` by id, `mode`, and `invert`). Weather layer codes in
|
|
4596
|
+
* `layers` are created as `::mask` instances when needed. Pass `null` or `undefined` to clear the mask.
|
|
4597
|
+
* @param layerId - Map layer id or weather layer code for the target layer.
|
|
4598
|
+
* @param mask - Mask configuration, a single mask layer id string, or `null`/`undefined` to clear.
|
|
4599
|
+
*/
|
|
4600
|
+
setMask(layerId: string, mask?: LayerMaskConfiguration | LayerMaskSpecification | string | null): void;
|
|
4203
4601
|
/**
|
|
4204
4602
|
* Adds a legend control to the map in the specified DOM element.
|
|
4205
4603
|
* @param target - The DOM element to add the legend control to.
|
|
@@ -4209,7 +4607,9 @@ get needsViewportUpdate(): boolean;
|
|
|
4209
4607
|
addLegendControl(target: HTMLElement, options?: Partial<LegendControlOptions>): LegendControl;
|
|
4210
4608
|
/**
|
|
4211
4609
|
* Adds a data inspector control to the map.
|
|
4212
|
-
* @param options -
|
|
4610
|
+
* @param options - Control options (`event`, `stream`, `showCoordinates`, `layout`, `tooltip`).
|
|
4611
|
+
* `layout`: `'auto'` (default) side-by-side for compact rows (scalars, badge, badge+value);
|
|
4612
|
+
* stack title above value for multi-line/block content; `'stacked'` always stacks.
|
|
4213
4613
|
* @returns The newly added data inspector control instance.
|
|
4214
4614
|
*/
|
|
4215
4615
|
addDataInspectorControl(options?: Partial<DataInspectorControlOptions>): DataInspectorControl;
|
|
@@ -4221,12 +4621,88 @@ get needsViewportUpdate(): boolean;
|
|
|
4221
4621
|
* Removes the data inspector control from the map.
|
|
4222
4622
|
*/
|
|
4223
4623
|
removeDataInspectorControl(): void;
|
|
4224
|
-
|
|
4624
|
+
/**
|
|
4625
|
+
* Adds the day/night terminator overlay to the map, or updates it if already present.
|
|
4626
|
+
* The overlay is always kept at the top of the MapsGL layer stack.
|
|
4627
|
+
* @param options - Optional overlay settings such as {@link DayNightOverlayOptions.opacity}.
|
|
4628
|
+
*/
|
|
4629
|
+
addDayNightOverlay(options?: DayNightOverlayOptions): void;
|
|
4225
4630
|
removeDayNightOverlay(): void;
|
|
4226
4631
|
/**
|
|
4632
|
+
* Keep the day/night terminator above every other MapsGL layer. Weather layers added or
|
|
4633
|
+
* reordered later would otherwise land on top of the overlay and hide the terminator.
|
|
4634
|
+
*
|
|
4635
|
+
* Updates the internal layer stack only, then asks the host map adapter to mirror that order.
|
|
4636
|
+
* Avoid calling {@link moveLayer} here — Mapbox's override re-applies the original move after
|
|
4637
|
+
* `super`, which would put content layers back above the overlay.
|
|
4638
|
+
*/
|
|
4639
|
+
private bringDayNightOverlayToTop;
|
|
4640
|
+
|
|
4641
|
+
/**
|
|
4642
|
+
* Define or update a layer ordering slot. Custom slots are inserted below `overlay` by default.
|
|
4643
|
+
* @param id - Slot identifier.
|
|
4644
|
+
* @param definition - Optional host placement (`beforeId`).
|
|
4645
|
+
*/
|
|
4646
|
+
defineSlot(id: SlotId, definition?: Omit<SlotDefinition, 'id'>): SlotDefinition;
|
|
4647
|
+
/**
|
|
4648
|
+
* Pin a MapsGL ordering slot below a host style layer (Mapbox/MapLibre `beforeId`),
|
|
4649
|
+
* or clear the pin (`undefined` / `null`) to restore the slot's default host placement.
|
|
4650
|
+
* Repositions the slot sentinel and reprojects layers currently in the slot.
|
|
4651
|
+
*/
|
|
4652
|
+
setSlotBeforeId(slotId: SlotId, beforeId?: string | null): void;
|
|
4653
|
+
/**
|
|
4654
|
+
* Replace the bottom → top ordering of slots.
|
|
4655
|
+
* @param ids - Slot identifiers in bottom-to-top order.
|
|
4656
|
+
*/
|
|
4657
|
+
setSlotOrder(ids: SlotId[]): void;
|
|
4658
|
+
/**
|
|
4659
|
+
* Returns all slot definitions in bottom → top order.
|
|
4660
|
+
*/
|
|
4661
|
+
listSlots(): SlotDefinition[];
|
|
4662
|
+
/**
|
|
4663
|
+
* Resolve the host style layer id a slot pins below, if any.
|
|
4664
|
+
* Mapbox/MapLibre may return a runtime default (e.g. bottom-most admin boundary for `underlay`).
|
|
4665
|
+
*/
|
|
4666
|
+
getSlotHostBeforeId(slotId: SlotId): string | undefined;
|
|
4667
|
+
/**
|
|
4668
|
+
* Host style layer id this MapsGL layer is pinned below (Mapbox/MapLibre `beforeId`).
|
|
4669
|
+
* Undefined when the layer sits at the top of the host stack, or the host has no style layers.
|
|
4670
|
+
*/
|
|
4671
|
+
getLayerHostBeforeId(_layerId: string): string | undefined;
|
|
4672
|
+
/**
|
|
4673
|
+
* Returns the slot id currently assigned to a MapsGL layer, if any.
|
|
4674
|
+
* @param layerId - MapsGL layer identifier.
|
|
4675
|
+
*/
|
|
4676
|
+
getSlot(layerId: string): SlotId | undefined;
|
|
4677
|
+
/**
|
|
4678
|
+
* Move a MapsGL layer into a different ordering slot, preserving its stack rank
|
|
4679
|
+
* (or appending when ranks are equal / unset).
|
|
4680
|
+
* @param layerId - MapsGL layer identifier.
|
|
4681
|
+
* @param slotId - Target slot identifier.
|
|
4682
|
+
*/
|
|
4683
|
+
moveLayerToSlot(layerId: string, slotId: SlotId): void;
|
|
4684
|
+
/**
|
|
4685
|
+
* Returns the within-slot stack rank for a layer (higher paints above siblings).
|
|
4686
|
+
*/
|
|
4687
|
+
getStackRank(layerId: string): number | undefined;
|
|
4688
|
+
/**
|
|
4689
|
+
* Set the within-slot stack rank for a layer and re-insert it among siblings.
|
|
4690
|
+
*/
|
|
4691
|
+
setStackRank(layerId: string, rank: number): void;
|
|
4692
|
+
/**
|
|
4693
|
+
* Override the default stack rank for a weather layer code / stack key.
|
|
4694
|
+
* Applies to future inserts that resolve rank from that key.
|
|
4695
|
+
*/
|
|
4696
|
+
setCodeStackRank(code: string, rank: number): void;
|
|
4697
|
+
|
|
4698
|
+
/**
|
|
4227
4699
|
* Returns whether the map currently contains a weather layer with the specified identifier.
|
|
4228
4700
|
* @param id - Weather layer identifier to check for.
|
|
4229
4701
|
* @returns `true` if the weather layer exists, otherwise `false`
|
|
4702
|
+
* @remarks
|
|
4703
|
+
* Layers that exist only as inactive hidden dependencies (e.g. a sample source auto-added for a
|
|
4704
|
+
* {@link DataQueryTileLayer} text layer) are treated as not present until explicitly added via
|
|
4705
|
+
* {@link MapController.addWeatherLayer}.
|
|
4230
4706
|
*/
|
|
4231
4707
|
hasWeatherLayer(id: string): boolean;
|
|
4232
4708
|
/**
|
|
@@ -4249,9 +4725,13 @@ get needsViewportUpdate(): boolean;
|
|
|
4249
4725
|
* Adds a new weather layer to the map.
|
|
4250
4726
|
* @param idOrConfig - One of the supported weather layer identifiers or a weather layer configuration object.
|
|
4251
4727
|
* @param overrides - An object containing data and render style overrides for the weather layer.
|
|
4252
|
-
*
|
|
4253
|
-
*
|
|
4254
|
-
*
|
|
4728
|
+
* When layer slots are enabled, may include `slot` to force a MapsGL ordering band
|
|
4729
|
+
* (see {@link MapController.defineSlot}).
|
|
4730
|
+
* @param beforeId - Optional insert-before id (MapsGL layer or Mapbox/MapLibre style layer).
|
|
4731
|
+
* When layer slots are disabled (the default), omitted `beforeId` appends the layer above all
|
|
4732
|
+
* other MapsGL layers. When slots are enabled (`slots: true` or a slots config object), omitted
|
|
4733
|
+
* `beforeId` places the layer by type (raster/sample/fill → `underlay`; particle/line/circle/symbol
|
|
4734
|
+
* → `inlay`; text → `text`) and within-slot `stackRank`.
|
|
4255
4735
|
* @returns The newly added map layer or an array of layers if the weather layer identifier maps to multiple layers.
|
|
4256
4736
|
*/
|
|
4257
4737
|
addWeatherLayer(idOrConfig: WeatherLayerConfiguration | string, overrides?: Partial<WeatherLayerOptions>, beforeId?: string): WebGLLayer | Array<WebGLLayer>;
|
|
@@ -4302,8 +4782,9 @@ get needsViewportUpdate(): boolean;
|
|
|
4302
4782
|
* @param id - A unique identifier for the layer.
|
|
4303
4783
|
* @param config - The configuration options for the layer.
|
|
4304
4784
|
* @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,
|
|
4306
|
-
*
|
|
4785
|
+
* the new layer appearing below the target layer. If not provided, the new layer is added above all other
|
|
4786
|
+
* MapsGL layers — or, when layer slots are enabled, according to its ordering slot (from layer type or
|
|
4787
|
+
* `config.slot`).
|
|
4307
4788
|
* @returns The newly added layer.
|
|
4308
4789
|
*/
|
|
4309
4790
|
addLayer(id: string, config: Partial<LayerSpecification> | WebGLLayer, beforeId?: string): WebGLLayer;
|
|
@@ -4392,7 +4873,15 @@ get needsViewportUpdate(): boolean;
|
|
|
4392
4873
|
protected getViewportState(): MapViewState;
|
|
4393
4874
|
|
|
4394
4875
|
protected fadeSymbolsIfNeeded(): void;
|
|
4395
|
-
|
|
4876
|
+
|
|
4877
|
+
/**
|
|
4878
|
+
* Ensures a weather element's legend is registered when a legend control is present.
|
|
4879
|
+
* Used both on initial add and when promoting a previously hidden query/dependency layer.
|
|
4880
|
+
*
|
|
4881
|
+
* `WeatherElement.addTo` assigns `legendId` from the legend config before the control
|
|
4882
|
+
* exists, so presence of `legendId` does not mean the legend is already mounted.
|
|
4883
|
+
*/
|
|
4884
|
+
private ensureWeatherLayerLegend;
|
|
4396
4885
|
private setupLegendEvents;
|
|
4397
4886
|
|
|
4398
4887
|
private _handleLayerLoadEvent;
|
|
@@ -4456,6 +4945,13 @@ export declare class MaplibreMapController extends MapboxMapController {
|
|
|
4456
4945
|
|
|
4457
4946
|
getProjection(): ProjectionType;
|
|
4458
4947
|
setProjection(projection: ProjectionType): void;
|
|
4948
|
+
/**
|
|
4949
|
+
* MapLibre has no Mapbox Standard slots. Inherited Mapbox Standard APIs are no-ops.
|
|
4950
|
+
*/
|
|
4951
|
+
setSlotMapboxSlot(_slotId: SlotId, _mapboxSlot?: MapboxStandardSlot | null): void;
|
|
4952
|
+
usesMapboxStandardSlots(): boolean;
|
|
4953
|
+
listMapboxStandardSlots(): MapboxStandardSlot[];
|
|
4954
|
+
getSlotMapboxSlot(_slotId: SlotId): MapboxStandardSlot | undefined;
|
|
4459
4955
|
}
|
|
4460
4956
|
|
|
4461
4957
|
/**
|
|
@@ -4778,6 +5274,11 @@ export declare type MapUnits = {
|
|
|
4778
5274
|
* The current unit of measurement for ratio.
|
|
4779
5275
|
*/
|
|
4780
5276
|
ratio: (typeof Units.ratio)[keyof typeof Units.ratio];
|
|
5277
|
+
/**
|
|
5278
|
+
* The current unit of measurement for index-based values (UVI, AQI, etc.).
|
|
5279
|
+
* Index values have no unit conversion — they are always displayed as floored integers.
|
|
5280
|
+
*/
|
|
5281
|
+
index: (typeof Units.index)[keyof typeof Units.index];
|
|
4781
5282
|
};
|
|
4782
5283
|
|
|
4783
5284
|
export declare interface MapViewState {
|
|
@@ -4816,15 +5317,134 @@ export declare interface MapViewState {
|
|
|
4816
5317
|
projectionMatrix?: Matrix4;
|
|
4817
5318
|
}
|
|
4818
5319
|
|
|
5320
|
+
/**
|
|
5321
|
+
* Base class for all matrices.
|
|
5322
|
+
*/
|
|
5323
|
+
export declare class Matrix<T> {
|
|
5324
|
+
/**
|
|
5325
|
+
* The raw value of the matrix.
|
|
5326
|
+
* @readonly
|
|
5327
|
+
*/
|
|
5328
|
+
get value(): T;
|
|
5329
|
+
/**
|
|
5330
|
+
* Assigns the matrix values from an array.
|
|
5331
|
+
* @param array - The array to assign the values from.
|
|
5332
|
+
* @param offset - An optional offset to start assigning the values at.
|
|
5333
|
+
*/
|
|
5334
|
+
fromArray(array: number[], offset?: number): Matrix<T>;
|
|
5335
|
+
/**
|
|
5336
|
+
* Returns the matrix as an array. If an array is provided, the values will be set to that array.
|
|
5337
|
+
* @param array - An optional array to set the values to.
|
|
5338
|
+
* @param offset - An optional offset to start setting the values at.
|
|
5339
|
+
* @returns The array representation of the matrix.
|
|
5340
|
+
*/
|
|
5341
|
+
toArray(array?: number[], offset?: number): number[];
|
|
5342
|
+
}
|
|
5343
|
+
|
|
5344
|
+
/**
|
|
5345
|
+
* Class representing a 3x3 matrix.
|
|
5346
|
+
*/
|
|
5347
|
+
export declare class Matrix3 extends Matrix<mat3> {
|
|
5348
|
+
private _value;
|
|
5349
|
+
get value(): mat3;
|
|
5350
|
+
get elements(): number;
|
|
5351
|
+
static get identity(): Matrix3;
|
|
5352
|
+
static get zero(): Matrix3;
|
|
5353
|
+
fromArray(array: number[], offset?: number): Matrix3;
|
|
5354
|
+
toArray(array?: number[], offset?: number): number[];
|
|
5355
|
+
clone(): Matrix3;
|
|
5356
|
+
copy(m: Matrix3): Matrix3;
|
|
5357
|
+
set(m00: number, m10: number, m20: number, m01: number, m11: number, m21: number, m02: number, m12: number, m22: number): Matrix3;
|
|
5358
|
+
determinant(): number;
|
|
5359
|
+
equals(m: Matrix3): boolean;
|
|
5360
|
+
getNormalMatrix(m: Matrix4): void;
|
|
5361
|
+
identity(): Matrix3;
|
|
5362
|
+
invert(): Matrix3;
|
|
5363
|
+
inverse(m: Matrix3): Matrix3;
|
|
5364
|
+
rotate(radians: number): Matrix3;
|
|
5365
|
+
scale(v: Vector2): Matrix3;
|
|
5366
|
+
scaleScalar(s: number): Matrix3;
|
|
5367
|
+
translate(v: Vector2): Matrix3;
|
|
5368
|
+
transpose(): Matrix3;
|
|
5369
|
+
multiply(m: Matrix3): Matrix3;
|
|
5370
|
+
multiplyScalar(s: number): Matrix3;
|
|
5371
|
+
toString(): string;
|
|
5372
|
+
}
|
|
5373
|
+
|
|
5374
|
+
/**
|
|
5375
|
+
* Class representing a 4x4 matrix.
|
|
5376
|
+
*/
|
|
5377
|
+
export declare class Matrix4 extends Matrix<mat4> {
|
|
5378
|
+
private _value;
|
|
5379
|
+
get value(): mat4;
|
|
5380
|
+
get elements(): number;
|
|
5381
|
+
get x(): number;
|
|
5382
|
+
get y(): number;
|
|
5383
|
+
get z(): number;
|
|
5384
|
+
get w(): number;
|
|
5385
|
+
static get identity(): Matrix4;
|
|
5386
|
+
static get zero(): Matrix4;
|
|
5387
|
+
fromArray(array: number[], offset?: number): Matrix4;
|
|
5388
|
+
toArray(array?: number[], offset?: number): number[];
|
|
5389
|
+
fromRotationX(radians: number): Matrix4;
|
|
5390
|
+
fromRotationY(radians: number): Matrix4;
|
|
5391
|
+
fromRotationZ(radians: number): Matrix4;
|
|
5392
|
+
fromScale(v: Vector3): Matrix4;
|
|
5393
|
+
fromTranslation(v: Vector3): Matrix4;
|
|
5394
|
+
fromPerspective(fovy: number, aspect: number, near: number, far: number): Matrix4;
|
|
5395
|
+
fromOrthogonal(left: number, right: number, top: number, bottom: number, near: number, far: number): Matrix4;
|
|
5396
|
+
fromQuaternion(q: Quaternion): Matrix4;
|
|
5397
|
+
clone(): Matrix4;
|
|
5398
|
+
copy(m: Matrix4): Matrix4;
|
|
5399
|
+
determinant(): number;
|
|
5400
|
+
equals(m: Matrix4): boolean;
|
|
5401
|
+
getColumn(col: number): Vector4;
|
|
5402
|
+
setColumn(col: number, v: Vector4): Matrix4;
|
|
5403
|
+
getRotation(q?: Quaternion): Quaternion;
|
|
5404
|
+
getScale(v?: Vector3): Vector3;
|
|
5405
|
+
getTranslation(v?: Vector3): Vector3;
|
|
5406
|
+
identity(): Matrix4;
|
|
5407
|
+
invert(): Matrix4;
|
|
5408
|
+
inverse(m: Matrix4): Matrix4;
|
|
5409
|
+
transpose(): Matrix4;
|
|
5410
|
+
lookAt(eye: Vector3, center?: Vector3, up?: Vector3): Matrix4;
|
|
5411
|
+
multiply(m1: Matrix4, m2?: Matrix4): Matrix4;
|
|
5412
|
+
multiplyScalar(s: number): Matrix4;
|
|
5413
|
+
premultiply(m: Matrix4): Matrix4;
|
|
5414
|
+
rotateX(radians: number): Matrix4;
|
|
5415
|
+
rotateY(radians: number): Matrix4;
|
|
5416
|
+
rotateZ(radians: number): Matrix4;
|
|
5417
|
+
scale(v: Vector3): Matrix4;
|
|
5418
|
+
scaleScalar(s: number): Matrix4;
|
|
5419
|
+
translate(v: Vector3): Matrix4;
|
|
5420
|
+
compose(translation: Vector3, quaternion: Quaternion, scale: Vector3): Matrix4;
|
|
5421
|
+
decompose(): {
|
|
5422
|
+
rotation: Quaternion;
|
|
5423
|
+
scale: Vector3;
|
|
5424
|
+
translation: Vector3;
|
|
5425
|
+
};
|
|
5426
|
+
toString(): string;
|
|
5427
|
+
}
|
|
5428
|
+
|
|
4819
5429
|
declare const mbToHg: (mb: number) => number;
|
|
4820
5430
|
|
|
4821
5431
|
declare const mbToPa: (mb: number) => number;
|
|
4822
|
-
|
|
4823
|
-
export declare type Measurement = keyof typeof Units | 'height' | 'snowfall' | 'intensity';
|
|
4824
5432
|
|
|
4825
5433
|
export declare type MessageHandler = (result: any) => any;
|
|
4826
5434
|
|
|
4827
|
-
|
|
5435
|
+
/**
|
|
5436
|
+
* Converts precipitation rate in mm/hr (or mm/s if perSecond=true) to dBZ.
|
|
5437
|
+
* This is the inverse of the dbzToMMRate formula:
|
|
5438
|
+
* dbzToMMRate(dbz) = (10 ** (dbz / 10) / 200) ** (5/8)
|
|
5439
|
+
*
|
|
5440
|
+
* So,
|
|
5441
|
+
* dbz = 10 * log10(200 * (mmRate) ** (8/5))
|
|
5442
|
+
*
|
|
5443
|
+
* @param mmRate Precipitation rate in mm/hr or mm/s
|
|
5444
|
+
* @param perSecond If true, mmRate is in mm/s (default: false, expects mm/hr)
|
|
5445
|
+
* @returns Equivalent reflectivity (dBZ)
|
|
5446
|
+
*/
|
|
5447
|
+
declare const mmRateToDbz: (mmRate: number, perSecond?: boolean) => number;
|
|
4828
5448
|
|
|
4829
5449
|
declare const mmToIn: (mm: number) => number;
|
|
4830
5450
|
|
|
@@ -5200,6 +5820,18 @@ export declare interface PointLegendOptions extends LegendOptions {
|
|
|
5200
5820
|
|
|
5201
5821
|
export declare type Polygon = Array<Array<Point>>;
|
|
5202
5822
|
|
|
5823
|
+
export declare interface ProgramConfiguration {
|
|
5824
|
+
vertexShader: string;
|
|
5825
|
+
fragmentShader: string;
|
|
5826
|
+
includes?: Record<string, string>;
|
|
5827
|
+
defines?: Array<string>;
|
|
5828
|
+
uniforms?: Record<string, any>;
|
|
5829
|
+
onBeforeCompile?: (shader: {
|
|
5830
|
+
vertex: string;
|
|
5831
|
+
fragment: string;
|
|
5832
|
+
}) => void;
|
|
5833
|
+
}
|
|
5834
|
+
|
|
5203
5835
|
export declare interface Projection {
|
|
5204
5836
|
type: ProjectionType;
|
|
5205
5837
|
zAxisUnit: 'meters' | 'pixels';
|
|
@@ -5242,6 +5874,13 @@ export declare interface Projection {
|
|
|
5242
5874
|
metersPerPixel(lat: number, zoom: number): number;
|
|
5243
5875
|
}
|
|
5244
5876
|
|
|
5877
|
+
export declare class ProjectionMatrix extends Matrix4 {
|
|
5878
|
+
frustum(left: number, right: number, top: number, bottom: number, near: number, far: number): ProjectionMatrix;
|
|
5879
|
+
orthographic(left: number, right: number, top: number, bottom: number, near: number, far: number): ProjectionMatrix;
|
|
5880
|
+
perspective(fovy: number, aspect: number, near: number, far: number): ProjectionMatrix;
|
|
5881
|
+
lookAt(eye: Vector3, center?: Vector3, up?: Vector3): ProjectionMatrix;
|
|
5882
|
+
}
|
|
5883
|
+
|
|
5245
5884
|
declare const ProjectionType: {
|
|
5246
5885
|
readonly mercator: "mercator";
|
|
5247
5886
|
readonly globe: "globe";
|
|
@@ -5250,30 +5889,80 @@ declare const ProjectionType: {
|
|
|
5250
5889
|
export declare type ProjectionType = ObjectValue<typeof ProjectionType>;
|
|
5251
5890
|
|
|
5252
5891
|
/**
|
|
5253
|
-
*
|
|
5254
|
-
*
|
|
5892
|
+
* Implementation of a quaternion that is used to represent rotations.
|
|
5893
|
+
* @see https://en.wikipedia.org/wiki/Quaternion
|
|
5894
|
+
* @see https://en.wikipedia.org/wiki/Quaternions_and_spatial_rotation
|
|
5255
5895
|
*/
|
|
5256
|
-
export declare class
|
|
5257
|
-
|
|
5258
|
-
|
|
5259
|
-
|
|
5260
|
-
|
|
5261
|
-
|
|
5262
|
-
|
|
5263
|
-
|
|
5264
|
-
|
|
5265
|
-
|
|
5266
|
-
|
|
5267
|
-
|
|
5268
|
-
|
|
5269
|
-
|
|
5270
|
-
|
|
5271
|
-
|
|
5272
|
-
|
|
5273
|
-
|
|
5274
|
-
|
|
5275
|
-
|
|
5276
|
-
|
|
5896
|
+
export declare class Quaternion {
|
|
5897
|
+
|
|
5898
|
+
get x(): number;
|
|
5899
|
+
set x(value: number);
|
|
5900
|
+
get y(): number;
|
|
5901
|
+
set y(value: number);
|
|
5902
|
+
get z(): number;
|
|
5903
|
+
set z(value: number);
|
|
5904
|
+
get w(): number;
|
|
5905
|
+
set w(value: number);
|
|
5906
|
+
get value(): quat;
|
|
5907
|
+
get elements(): number;
|
|
5908
|
+
constructor(x?: number, y?: number, z?: number, w?: number);
|
|
5909
|
+
fromArray(array: number[], offset?: number): Quaternion;
|
|
5910
|
+
toArray(array?: number[], offset?: number): number[];
|
|
5911
|
+
fromObject({ x, y, z, w }: {
|
|
5912
|
+
x: number;
|
|
5913
|
+
y: number;
|
|
5914
|
+
z: number;
|
|
5915
|
+
w: number;
|
|
5916
|
+
}): Quaternion;
|
|
5917
|
+
toObject(): {
|
|
5918
|
+
x: number;
|
|
5919
|
+
y: number;
|
|
5920
|
+
};
|
|
5921
|
+
fromAxisAngle(axis: Vector3, radians: number): Quaternion;
|
|
5922
|
+
fromEuler(e: Euler): Quaternion;
|
|
5923
|
+
fromRotationMatrix(): Quaternion;
|
|
5924
|
+
set(x: number, y: number, z: number, w: number): Quaternion;
|
|
5925
|
+
length(): number;
|
|
5926
|
+
clone(): Quaternion;
|
|
5927
|
+
copy(q: Quaternion): Quaternion;
|
|
5928
|
+
equals(q: Quaternion): boolean;
|
|
5929
|
+
identity(): Quaternion;
|
|
5930
|
+
invert(): Quaternion;
|
|
5931
|
+
conjugate(): Quaternion;
|
|
5932
|
+
normalize(): Quaternion;
|
|
5933
|
+
rotateX(radians: number): Quaternion;
|
|
5934
|
+
rotateY(radians: number): Quaternion;
|
|
5935
|
+
rotateZ(radians: number): Quaternion;
|
|
5936
|
+
dot(q: Quaternion): number;
|
|
5937
|
+
angleTo(q: Quaternion): number;
|
|
5938
|
+
|
|
5939
|
+
}
|
|
5940
|
+
|
|
5941
|
+
/**
|
|
5942
|
+
* A `Query` object is a convenience wrapper for setting up and configuring a query string used
|
|
5943
|
+
* for API queries.
|
|
5944
|
+
*/
|
|
5945
|
+
export declare class Query {
|
|
5946
|
+
private _conditions;
|
|
5947
|
+
/**
|
|
5948
|
+
* Initializes a query instance, optionally with an array of query conditions.
|
|
5949
|
+
* @param conditions - An array of query conditions to initialize the query with.
|
|
5950
|
+
*/
|
|
5951
|
+
constructor(conditions?: QueryCondition[]);
|
|
5952
|
+
/**
|
|
5953
|
+
* Adds a query condition.
|
|
5954
|
+
* @param condition - The query condition to add.
|
|
5955
|
+
*/
|
|
5956
|
+
addCondition(condition: QueryCondition): Query;
|
|
5957
|
+
/**
|
|
5958
|
+
* Removes a query condition.
|
|
5959
|
+
* @param condition - The query condition to remove.
|
|
5960
|
+
*/
|
|
5961
|
+
removeCondition(condition: QueryCondition): Query;
|
|
5962
|
+
/**
|
|
5963
|
+
* Removes all query conditions.
|
|
5964
|
+
*/
|
|
5965
|
+
removeAllConditions(): Query;
|
|
5277
5966
|
/**
|
|
5278
5967
|
* Returns the formatted string from all query conditions to be used for API requests.
|
|
5279
5968
|
*/
|
|
@@ -5396,7 +6085,7 @@ export declare interface RemoteSymbolImage {
|
|
|
5396
6085
|
/** Indicates if the image is a pattern image. */
|
|
5397
6086
|
pattern?: boolean;
|
|
5398
6087
|
}
|
|
5399
|
-
|
|
6088
|
+
|
|
5400
6089
|
/**
|
|
5401
6090
|
* Context built by the layer each frame and passed to prerender() and draw().
|
|
5402
6091
|
* Contains all map and layer state needed for the render path so the renderer
|
|
@@ -5481,8 +6170,9 @@ export declare interface RenderFrameContextTileLayer {
|
|
|
5481
6170
|
allowExpiredTilesForRender?: boolean;
|
|
5482
6171
|
}
|
|
5483
6172
|
|
|
5484
|
-
|
|
5485
|
-
|
|
6173
|
+
/** 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. */
|
|
6174
|
+
declare const resolveMeasurementForUnits: (type: ConversionMeasurement) => keyof MapUnits;
|
|
6175
|
+
|
|
5486
6176
|
/**
|
|
5487
6177
|
* RGBAImage represents a 2D grid of image data. Them image data should NOT be premultipled since ImageData is not.
|
|
5488
6178
|
* Therefore, UNPACK_PREMULTIPLY_ALPHA_WEBGL must be used when uploading the image data to the GPU via a texture.
|
|
@@ -5497,11 +6187,11 @@ export declare class RGBAImage {
|
|
|
5497
6187
|
padding: number;
|
|
5498
6188
|
get width(): number;
|
|
5499
6189
|
get height(): number;
|
|
5500
|
-
|
|
5501
|
-
|
|
6190
|
+
|
|
6191
|
+
constructor(data: Uint8Array, dimension: number, pad?: number);
|
|
5502
6192
|
get(x: number, y: number): RGB;
|
|
5503
|
-
|
|
5504
|
-
|
|
6193
|
+
|
|
6194
|
+
/**
|
|
5505
6195
|
* Computes the index offset for the specified x and y coordinates and image width.
|
|
5506
6196
|
* @param x -
|
|
5507
6197
|
* @param y -
|
|
@@ -5544,6 +6234,21 @@ export declare const SampleExpression: {
|
|
|
5544
6234
|
|
|
5545
6235
|
export declare type SampleExpression = ObjectValue<typeof SampleExpression>;
|
|
5546
6236
|
|
|
6237
|
+
/** Optional nodata gate for interpolated sampling (matches shader `incompleteBilinearCell`). */
|
|
6238
|
+
export declare type SamplePixelOptions = {
|
|
6239
|
+
/** Nodata byte value (0–255). When unset or `< 0`, nodata gating is disabled. */
|
|
6240
|
+
noDataValue?: number;
|
|
6241
|
+
/** Channel used to detect nodata corners. Defaults to `r`. */
|
|
6242
|
+
channel?: ColorBand;
|
|
6243
|
+
/**
|
|
6244
|
+
* Fill-shader smoothing (`0`…`1`). CPU queries must use the same coarsened lattice as
|
|
6245
|
+
* `get_texel.glsl` or city labels / inspector values will not match the painted bands.
|
|
6246
|
+
*/
|
|
6247
|
+
smoothing?: number;
|
|
6248
|
+
/** Encoded-tile edge padding in texels, used to quantize the smoothing scale like the shader. */
|
|
6249
|
+
edgePad?: number;
|
|
6250
|
+
};
|
|
6251
|
+
|
|
5547
6252
|
/**
|
|
5548
6253
|
* Sample style properties control how encoded data gets rendered on a map. Sample rendering is performed by sampling
|
|
5549
6254
|
* values from the underlying data and mapping it to a desired result, such as color fill, contour line, etc.
|
|
@@ -5604,6 +6309,68 @@ export declare interface SampleStyleSpec {
|
|
|
5604
6309
|
drawRange: Partial<ValueRange>;
|
|
5605
6310
|
}
|
|
5606
6311
|
|
|
6312
|
+
/**
|
|
6313
|
+
* The type of shader.
|
|
6314
|
+
*/
|
|
6315
|
+
declare const enum ShaderType {
|
|
6316
|
+
VERTEX = "vertex",
|
|
6317
|
+
FRAGMENT = "fragment"
|
|
6318
|
+
}
|
|
6319
|
+
|
|
6320
|
+
export declare type Size = {
|
|
6321
|
+
width: number;
|
|
6322
|
+
height: number;
|
|
6323
|
+
};
|
|
6324
|
+
|
|
6325
|
+
/**
|
|
6326
|
+
* Definition of a MapsGL layer ordering slot.
|
|
6327
|
+
* Slots are logical bands; Mapbox/MapLibre adapters project them onto the host style stack.
|
|
6328
|
+
*/
|
|
6329
|
+
export declare interface SlotDefinition {
|
|
6330
|
+
id: SlotId;
|
|
6331
|
+
/**
|
|
6332
|
+
* Classic Mapbox / MapLibre: place this slot's ceiling below this style layer id.
|
|
6333
|
+
*/
|
|
6334
|
+
beforeId?: string;
|
|
6335
|
+
/**
|
|
6336
|
+
* Mapbox Standard only: place this slot's layers in a Standard style slot.
|
|
6337
|
+
*/
|
|
6338
|
+
mapboxSlot?: MapboxStandardSlot;
|
|
6339
|
+
}
|
|
6340
|
+
|
|
6341
|
+
/** Identifier for a MapsGL ordering slot (built-in or user-defined). */
|
|
6342
|
+
export declare type SlotId = string;
|
|
6343
|
+
|
|
6344
|
+
/**
|
|
6345
|
+
* Options for configuring the slot registry at controller construction.
|
|
6346
|
+
* Passed as {@link MapAdapterOptions.slots} to opt in to layer ordering slots.
|
|
6347
|
+
*/
|
|
6348
|
+
export declare interface SlotRegistryOptions {
|
|
6349
|
+
/**
|
|
6350
|
+
* Partial overrides for built-in or custom slots, keyed by slot id.
|
|
6351
|
+
* Use {@link SlotRegistry.defineSlot} / {@link SlotRegistry.setSlotBeforeId} /
|
|
6352
|
+
* {@link SlotRegistry.setSlotOrder} at runtime for full control.
|
|
6353
|
+
*/
|
|
6354
|
+
slots?: Partial<Record<SlotId, Omit<SlotDefinition, 'id'>>>;
|
|
6355
|
+
/**
|
|
6356
|
+
* Overrides for the default layer-type → slot mapping.
|
|
6357
|
+
*/
|
|
6358
|
+
typeMapping?: Partial<Record<LayerType, SlotId>>;
|
|
6359
|
+
/**
|
|
6360
|
+
* Default within-slot stack ranks keyed by weather layer code / stack key
|
|
6361
|
+
* (higher paints above siblings in the same slot). Merged over built-in defaults.
|
|
6362
|
+
*/
|
|
6363
|
+
stackRanks?: Record<string, number>;
|
|
6364
|
+
/**
|
|
6365
|
+
* Optional override for resolving a layer's stack rank. Return `undefined` to fall
|
|
6366
|
+
* through to {@link stackRanks} / built-in rules.
|
|
6367
|
+
*/
|
|
6368
|
+
resolveStackRank?: (ctx: StackRankContext) => number | undefined;
|
|
6369
|
+
}
|
|
6370
|
+
|
|
6371
|
+
/** Stable style-layer id for a slot sentinel (ceiling marker). */
|
|
6372
|
+
export declare const slotSentinelId: (slotId: SlotId) => string;
|
|
6373
|
+
|
|
5607
6374
|
export declare type SortProperty = {
|
|
5608
6375
|
property: string;
|
|
5609
6376
|
direction?: 'asc' | 'desc';
|
|
@@ -5851,6 +6618,14 @@ export declare interface SourceSpecification {
|
|
|
5851
6618
|
transformMetadata?: (source: DataSource, data: Record<string, any>, options?: SourceMetadataTransformOptions) => Partial<SourceMetadataSchema>;
|
|
5852
6619
|
}
|
|
5853
6620
|
|
|
6621
|
+
/** Context passed to a custom stack-rank resolver. */
|
|
6622
|
+
export declare interface StackRankContext {
|
|
6623
|
+
layerId: string;
|
|
6624
|
+
/** Weather layer code or other lookup key (often the weather id when the instance id differs). */
|
|
6625
|
+
stackKey?: string;
|
|
6626
|
+
type?: LayerType | string;
|
|
6627
|
+
}
|
|
6628
|
+
|
|
5854
6629
|
export declare class State<T> extends EventDispatcher {
|
|
5855
6630
|
#private;
|
|
5856
6631
|
get value(): T;
|
|
@@ -5983,12 +6758,30 @@ export declare interface StyledImageRenderer {
|
|
|
5983
6758
|
|
|
5984
6759
|
export declare type StyleEvaulatorFunction<T> = (properties: Record<string, any>) => T;
|
|
5985
6760
|
|
|
6761
|
+
/**
|
|
6762
|
+
* The expression *type* and operator vocabulary are owned by the shared weather spec package
|
|
6763
|
+
* (`@xweather/mapsgl-weather-spec`) so they can be authored declaratively in layer specs there;
|
|
6764
|
+
* re-exported here to preserve existing import paths. Only the type/vocabulary moved — the
|
|
6765
|
+
* interpreter below, animation-time globals, and legacy-filter-migration helpers are runtime
|
|
6766
|
+
* concerns and stay in webgl-maps.
|
|
6767
|
+
*/
|
|
5986
6768
|
export declare interface StyleExpression {
|
|
5987
6769
|
property: string;
|
|
5988
6770
|
type?: 'identity' | 'expression';
|
|
5989
6771
|
evaluator?: (value: any) => any;
|
|
5990
6772
|
}
|
|
5991
6773
|
|
|
6774
|
+
/**
|
|
6775
|
+
* Style layer descriptors used when resolving a default `underlay` slot ceiling from the
|
|
6776
|
+
* loaded Mapbox/MapLibre style.
|
|
6777
|
+
*/
|
|
6778
|
+
export declare type StyleLayerRef = {
|
|
6779
|
+
id?: string;
|
|
6780
|
+
type?: string;
|
|
6781
|
+
'source-layer'?: string;
|
|
6782
|
+
sourceLayer?: string;
|
|
6783
|
+
};
|
|
6784
|
+
|
|
5992
6785
|
export declare const styles: {
|
|
5993
6786
|
datasets: {};
|
|
5994
6787
|
colorscales: {
|
|
@@ -6243,6 +7036,29 @@ export declare interface TaskRunnerConfig<Task extends DownloadTask<any>> {
|
|
|
6243
7036
|
taskTransformer?: (task: Task) => Task;
|
|
6244
7037
|
}
|
|
6245
7038
|
|
|
7039
|
+
/**
|
|
7040
|
+
* Data that can be used to create a texture.
|
|
7041
|
+
*/
|
|
7042
|
+
export declare type TexImage2DData = GLintptr | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | ImageBitmap | ImageData | ArrayBufferView | ArrayBuffer | undefined;
|
|
7043
|
+
|
|
7044
|
+
/**
|
|
7045
|
+
* TextMetrics is a set of metrics for a single character in a font layout spec.
|
|
7046
|
+
*/
|
|
7047
|
+
export declare type TextMetrics_2 = {
|
|
7048
|
+
id: number;
|
|
7049
|
+
index: number;
|
|
7050
|
+
char: string;
|
|
7051
|
+
width: number;
|
|
7052
|
+
height: number;
|
|
7053
|
+
xoffset: number;
|
|
7054
|
+
yoffset: number;
|
|
7055
|
+
xadvance: number;
|
|
7056
|
+
chnl: number;
|
|
7057
|
+
x: number;
|
|
7058
|
+
y: number;
|
|
7059
|
+
page: number;
|
|
7060
|
+
};
|
|
7061
|
+
|
|
6246
7062
|
/**
|
|
6247
7063
|
* Text style properties control how text gets rendered on a map from vector features. Use these properties on
|
|
6248
7064
|
* conjunction with `symbol` to define the style for a text layer.
|
|
@@ -6606,6 +7422,10 @@ declare abstract class TileLayer<Data> extends WebGLLayer<TileSource> {
|
|
|
6606
7422
|
/**
|
|
6607
7423
|
* Returns whether expired tiles can still be used for rendering/LOD fallback.
|
|
6608
7424
|
* Default is disabled so stale tiles are not rendered after data refreshes.
|
|
7425
|
+
*
|
|
7426
|
+
* For dynamic (frequently-updated) GeoJSON sources such as the day/night terminator, keep
|
|
7427
|
+
* rendering the last-good tiles while the source re-slices the new data instead of blanking the
|
|
7428
|
+
* layer during the async reslice window. Mirrors {@link DataQueryTileLayer}.
|
|
6609
7429
|
*/
|
|
6610
7430
|
shouldRenderExpiredTiles(): boolean;
|
|
6611
7431
|
refresh(clear?: boolean): void;
|
|
@@ -6642,11 +7462,13 @@ declare abstract class TileLayer<Data> extends WebGLLayer<TileSource> {
|
|
|
6642
7462
|
* Returns the tile at the specified geographic coordinate.
|
|
6643
7463
|
* @param coord - Geographic coordinate to get the tile for.
|
|
6644
7464
|
* @param allowPartials - Whether to allow returning a tile that only partially contains the queried coordinate.
|
|
6645
|
-
* @returns Tile
|
|
7465
|
+
* @returns Tile, position within the tile for the specified coordinate, and the renderable the tile was resolved
|
|
7466
|
+
* from when a partial (ancestor or descendant) was used.
|
|
6646
7467
|
*/
|
|
6647
7468
|
protected getTile(coord: Coordinate, zoom?: number, allowPartials?: boolean): {
|
|
6648
7469
|
tile: Tile<Data>;
|
|
6649
7470
|
position: Point;
|
|
7471
|
+
renderable?: AnyTileRenderable;
|
|
6650
7472
|
} | undefined;
|
|
6651
7473
|
/**
|
|
6652
7474
|
* Returns the visible tile coordinates based on the map's current viewport.
|
|
@@ -6712,6 +7534,97 @@ export declare type TilePositionData = {
|
|
|
6712
7534
|
};
|
|
6713
7535
|
|
|
6714
7536
|
export declare type TileQuadrant = 'tl' | 'tc' | 'tr' | 'ml' | 'mc' | 'mr' | 'bl' | 'bc' | 'br';
|
|
7537
|
+
|
|
7538
|
+
/**
|
|
7539
|
+
* A renderable tile object that contains the necessary transformation information for rendering a tile to a WebGL
|
|
7540
|
+
* context on a map.
|
|
7541
|
+
* @template Data The type of data that the tile contains.
|
|
7542
|
+
*/
|
|
7543
|
+
export declare class TileRenderable<Data> {
|
|
7544
|
+
/**
|
|
7545
|
+
* The tile to be rendered.
|
|
7546
|
+
*/
|
|
7547
|
+
tile: Tile<Data>;
|
|
7548
|
+
/**
|
|
7549
|
+
* The scale to apply to the tile's mesh.
|
|
7550
|
+
*/
|
|
7551
|
+
readonly scale: Vector3;
|
|
7552
|
+
/**
|
|
7553
|
+
* The offset to apply to the tile's mesh.
|
|
7554
|
+
*/
|
|
7555
|
+
readonly offset: Vector3;
|
|
7556
|
+
/**
|
|
7557
|
+
* The UV offset and scale to use when sampling texture data for the tile. If the tile is not a partial tile,
|
|
7558
|
+
* then this value is `[0, 0, 1, 1]`.
|
|
7559
|
+
*/
|
|
7560
|
+
uvOffset: [number, number, number, number];
|
|
7561
|
+
/**
|
|
7562
|
+
* Scale of the mesh relative to the partial tile's scale. If the tile is not a partial tile, then this value
|
|
7563
|
+
* is `1`.
|
|
7564
|
+
*/
|
|
7565
|
+
partialScale: number;
|
|
7566
|
+
/**
|
|
7567
|
+
* The tile coordinate of the tile being rendered. This may be different than the tile's actual coordinate if
|
|
7568
|
+
* the tile is a partial tile.
|
|
7569
|
+
*/
|
|
7570
|
+
coord: TileCoord;
|
|
7571
|
+
/** Whether this renderable may use expired tile data (layer-level opt-in). */
|
|
7572
|
+
allowExpired: boolean;
|
|
7573
|
+
/**
|
|
7574
|
+
* Resolved textures or vector data for this renderable. When set, draw passes use this instead of
|
|
7575
|
+
* querying tile data or timeState. Resolved at LOD resolution time for both time-series and non-time-series.
|
|
7576
|
+
*/
|
|
7577
|
+
resolvedData?: ResolvedTileData;
|
|
7578
|
+
/**
|
|
7579
|
+
* The hash of the tile coordinate of the tile being rendered.
|
|
7580
|
+
* @readonly
|
|
7581
|
+
*/
|
|
7582
|
+
get hash(): string;
|
|
7583
|
+
constructor(tile: Tile<Data>, scale: Point, offset: Point, uvOffset?: UVOffset);
|
|
7584
|
+
/**
|
|
7585
|
+
* Updates an existing renderable in place to avoid per-frame allocations.
|
|
7586
|
+
* @param tile - The tile to be rendered.
|
|
7587
|
+
* @param coord - The unnormalized tile coordinate of the tile.
|
|
7588
|
+
*/
|
|
7589
|
+
updateFromTile(tile: Tile<Data>, coord: TileCoord): void;
|
|
7590
|
+
/**
|
|
7591
|
+
* Updates an existing renderable in place to avoid per-frame allocations.
|
|
7592
|
+
* @param partial - The tile partial to be rendered.
|
|
7593
|
+
* @param coord - The unnormalized tile coordinate of the tile.
|
|
7594
|
+
*/
|
|
7595
|
+
updateFromAncestorPartial(partial: TilePartial<Data>, coord: TileCoord): void;
|
|
7596
|
+
/**
|
|
7597
|
+
* Updates an existing renderable in place to avoid per-frame allocations.
|
|
7598
|
+
* @param partial - The tile partial to be rendered.
|
|
7599
|
+
* @param coord - The unnormalized tile coordinate of the tile.
|
|
7600
|
+
*/
|
|
7601
|
+
updateFromDescendantPartial(partial: TilePartial<Data>, coord: TileCoord): void;
|
|
7602
|
+
/**
|
|
7603
|
+
* Returns the view matrix for the tile including its scale and translation transformations.
|
|
7604
|
+
*/
|
|
7605
|
+
getViewMatrix(): ProjectionMatrix;
|
|
7606
|
+
/**
|
|
7607
|
+
* Creates and returns a new TileRenderable object from a source tile and a coordinate.
|
|
7608
|
+
* @param tile - The source tile.
|
|
7609
|
+
* @param coord - The coordinate of the tile being rendered.
|
|
7610
|
+
* @returns A new TileRenderable object.
|
|
7611
|
+
*/
|
|
7612
|
+
static fromTile<Data>(tile: Tile<Data>, coord: TileCoord): TileRenderable<Data>;
|
|
7613
|
+
/**
|
|
7614
|
+
* Creates and returns a TileRenderable object from an ancestor of the tile.
|
|
7615
|
+
* @param partial - The tile partial to be rendered.
|
|
7616
|
+
* @param coord - The unnormalized tile coordinate of the tile.
|
|
7617
|
+
* @returns
|
|
7618
|
+
*/
|
|
7619
|
+
static fromAncestorPartial<Data>(partial: TilePartial<Data>, coord: TileCoord): TileRenderable<Data>;
|
|
7620
|
+
/**
|
|
7621
|
+
* Creates and returns a TileRenderable object from an descendant of the tile.
|
|
7622
|
+
* @param partial - The tile partial to be rendered.
|
|
7623
|
+
* @param coord - The unnormalized tile coordinate of the tile.
|
|
7624
|
+
* @returns
|
|
7625
|
+
*/
|
|
7626
|
+
static fromDescendantPartial<Data>(partial: TilePartial<Data>, coord: TileCoord): TileRenderable<Data>;
|
|
7627
|
+
}
|
|
6715
7628
|
|
|
6716
7629
|
/**
|
|
6717
7630
|
* Options for a tile request.
|
|
@@ -6970,14 +7883,6 @@ export declare interface TileSourceSpecification extends SourceSpecification {
|
|
|
6970
7883
|
* Map projection of the source. Defaults to `EPSG:3857`.
|
|
6971
7884
|
*/
|
|
6972
7885
|
projection: 'EPSG:3857' | 'EPSG:4326';
|
|
6973
|
-
/**
|
|
6974
|
-
* A function that requests a tile from the source.
|
|
6975
|
-
* @param tile - The tile to load.
|
|
6976
|
-
* @param url - The URL template string to use when requesting the tile.
|
|
6977
|
-
* @param options - Additional options to use when requesting the tile.
|
|
6978
|
-
* @returns A promise that resolves to the response from the tile request.
|
|
6979
|
-
*/
|
|
6980
|
-
loadTile: (tile: TileCoord, url: string, options?: Partial<TileRequestOptions>) => Promise<Response>;
|
|
6981
7886
|
}
|
|
6982
7887
|
|
|
6983
7888
|
export declare const TileState: {
|
|
@@ -7103,8 +8008,9 @@ export declare class TimeAnimation extends Animation {
|
|
|
7103
8008
|
playFromDate(date: Date): void;
|
|
7104
8009
|
/**
|
|
7105
8010
|
* Advances the animation to a specific position based on a date.
|
|
7106
|
-
* @param date - The date to advance to.
|
|
7107
|
-
*
|
|
8011
|
+
* @param date - The date to advance to. Must be within the animation's start and end date range.
|
|
8012
|
+
* @throws {TypeError} If `date` is not a valid `Date`.
|
|
8013
|
+
* @throws {RangeError} If `date` is outside the animation's start and end date range.
|
|
7108
8014
|
*/
|
|
7109
8015
|
goToDate(date: Date): void;
|
|
7110
8016
|
/**
|
|
@@ -7112,6 +8018,12 @@ export declare class TimeAnimation extends Animation {
|
|
|
7112
8018
|
* @param offset - The time offset in milliseconds.
|
|
7113
8019
|
*/
|
|
7114
8020
|
goToOffset(offset: number): void;
|
|
8021
|
+
/**
|
|
8022
|
+
* Gets the position of the animation based on a date clamped to the start and end date. The position is a value
|
|
8023
|
+
* between 0 and 1, where 0 is the start date and 1 is the end date.
|
|
8024
|
+
* @param date - The date to get the position from.
|
|
8025
|
+
* @returns The position of the animation.
|
|
8026
|
+
*/
|
|
7115
8027
|
getPositionFromDate(date: Date): number;
|
|
7116
8028
|
/**
|
|
7117
8029
|
* Restricts the animation to a specific date range relative to the overall start and end date.
|
|
@@ -7128,6 +8040,7 @@ export declare class TimeAnimation extends Animation {
|
|
|
7128
8040
|
private _captureRangeChangeAnchorDate;
|
|
7129
8041
|
/**
|
|
7130
8042
|
* Restores the anchor date for the range change event.
|
|
8043
|
+
* Clamps to the new range when the previous playhead falls outside it.
|
|
7131
8044
|
*/
|
|
7132
8045
|
private _restoreRangeChangeAnchorDate;
|
|
7133
8046
|
}
|
|
@@ -7301,7 +8214,7 @@ export declare type TimeSeriesOperation = {
|
|
|
7301
8214
|
period?: TimeSeriesOperationPeriod;
|
|
7302
8215
|
/**
|
|
7303
8216
|
* Whether to aggregate the data, meaning to combine the data from multiple intervals of the desired period into a
|
|
7304
|
-
* single value.
|
|
8217
|
+
* single value. When `period` is `full` (or `none`), this aggregates across the entire set of intervals.
|
|
7305
8218
|
*/
|
|
7306
8219
|
aggregate?: boolean;
|
|
7307
8220
|
/**
|
|
@@ -7319,13 +8232,14 @@ export declare type TimeSeriesOperation = {
|
|
|
7319
8232
|
* Period of time to perform an operation on the data within a time series.
|
|
7320
8233
|
*
|
|
7321
8234
|
* - `none`: Does not perform the operation on a periodic basis.
|
|
8235
|
+
* - `full`: Performs the operation once across the entire set of intervals (not grouped by calendar period).
|
|
7322
8236
|
* - `hour`: Performs the operation on an hourly basis.
|
|
7323
8237
|
* - `day`: Performs the operation on a daily basis.
|
|
7324
8238
|
* - `week`: Performs the operation on a weekly basis.
|
|
7325
8239
|
* - `month`: Performs the operation on a monthly basis.
|
|
7326
8240
|
* - `year`: Performs the operation on a yearly basis.
|
|
7327
8241
|
*/
|
|
7328
|
-
export declare type TimeSeriesOperationPeriod = 'none' | 'hour' | 'day' | 'week' | 'month' | 'year';
|
|
8242
|
+
export declare type TimeSeriesOperationPeriod = 'none' | 'full' | 'hour' | 'day' | 'week' | 'month' | 'year';
|
|
7329
8243
|
|
|
7330
8244
|
/**
|
|
7331
8245
|
* Type of operation to perform on the data within a time series.
|
|
@@ -7347,74 +8261,14 @@ export declare type TimestampledPixel = {
|
|
|
7347
8261
|
pixel: RGB;
|
|
7348
8262
|
};
|
|
7349
8263
|
|
|
8264
|
+
export declare type TypedArray = Float64Array | Float32Array | Uint16Array | Int16Array | Uint32Array | Int32Array | Uint8Array | Int8Array | Uint8ClampedArray;
|
|
8265
|
+
|
|
7350
8266
|
/**
|
|
7351
8267
|
* A unit converter function.
|
|
7352
8268
|
*/
|
|
7353
8269
|
export declare type UnitConverter = (value: number, from: string, to: string) => number;
|
|
7354
8270
|
|
|
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
8271
|
export declare const units: {
|
|
7413
|
-
UnitSystem: {
|
|
7414
|
-
readonly metric: "metric";
|
|
7415
|
-
readonly imperial: "imperial";
|
|
7416
|
-
readonly custom: "custom";
|
|
7417
|
-
};
|
|
7418
8272
|
Units: {
|
|
7419
8273
|
readonly temperature: {
|
|
7420
8274
|
readonly C: "C";
|
|
@@ -7467,10 +8321,23 @@ export declare const units: {
|
|
|
7467
8321
|
readonly ratio: {
|
|
7468
8322
|
readonly percent: "%";
|
|
7469
8323
|
};
|
|
8324
|
+
readonly index: {
|
|
8325
|
+
readonly uvi: "uvi";
|
|
8326
|
+
readonly aqi: "aqi";
|
|
8327
|
+
readonly aqhi: "aqhi";
|
|
8328
|
+
};
|
|
8329
|
+
};
|
|
8330
|
+
miToM: (mi: number) => number;
|
|
8331
|
+
inToMM: (ins: number) => number;
|
|
8332
|
+
inToMMRate: (ins: number) => number;
|
|
8333
|
+
UnitSystem: {
|
|
8334
|
+
readonly metric: "metric";
|
|
8335
|
+
readonly imperial: "imperial";
|
|
8336
|
+
readonly custom: "custom";
|
|
7470
8337
|
};
|
|
7471
|
-
resolveMeasurementForUnits: (type: _units.
|
|
8338
|
+
resolveMeasurementForUnits: (type: _units.Measurement) => keyof MapUnits;
|
|
7472
8339
|
defaultUnits: Record<"metric" | "imperial", MapUnits>;
|
|
7473
|
-
getDefaultUnit: (type: _units.
|
|
8340
|
+
getDefaultUnit: (type: _units.Measurement, system: "metric" | "imperial" | "custom") => string;
|
|
7474
8341
|
getDefaultUnitsForSystem: (system: "metric" | "imperial" | "custom") => MapUnits;
|
|
7475
8342
|
equalUnits: (units1: MapUnits, units2: MapUnits) => boolean;
|
|
7476
8343
|
getSystemForUnits: (units: MapUnits) => "metric" | "imperial" | "custom";
|
|
@@ -7493,17 +8360,15 @@ export declare const units: {
|
|
|
7493
8360
|
kmToM: (km: number) => number;
|
|
7494
8361
|
ftToM: (ft: number) => number;
|
|
7495
8362
|
kmToMi: (km: number) => number;
|
|
7496
|
-
miToM: (mi: number) => number;
|
|
7497
8363
|
mmToIn: (mm: number) => number;
|
|
7498
|
-
inToMM: (ins: number) => number;
|
|
7499
8364
|
inToM: (ins: number) => number;
|
|
7500
|
-
inToMMRate: (ins: number) => number;
|
|
7501
8365
|
mmToMMRate: (mm: number) => number;
|
|
7502
8366
|
CtoFUnit: (c: number) => number;
|
|
7503
8367
|
FtoCUnit: (f: number) => number;
|
|
7504
8368
|
mphToMsUnit: (mph: number) => number;
|
|
7505
8369
|
msToMphUnit: (ms: number) => number;
|
|
7506
8370
|
dbzToMMRate: (dbz: number, perSecond?: boolean) => number;
|
|
8371
|
+
mmRateToDbz: (mmRate: number, perSecond?: boolean) => number;
|
|
7507
8372
|
degToDir: (d: number) => string;
|
|
7508
8373
|
getUnitPrecision: (unit: string) => number;
|
|
7509
8374
|
convert: (type: string, value: number, from: string, to: string) => number;
|
|
@@ -7512,9 +8377,12 @@ export declare const units: {
|
|
|
7512
8377
|
|
|
7513
8378
|
declare namespace _units {
|
|
7514
8379
|
export {
|
|
7515
|
-
UnitSystem,
|
|
7516
8380
|
Units,
|
|
8381
|
+
miToM,
|
|
8382
|
+
inToMM,
|
|
8383
|
+
inToMMRate,
|
|
7517
8384
|
Measurement,
|
|
8385
|
+
UnitSystem,
|
|
7518
8386
|
ConversionMeasurement,
|
|
7519
8387
|
resolveMeasurementForUnits,
|
|
7520
8388
|
defaultUnits,
|
|
@@ -7541,17 +8409,15 @@ declare namespace _units {
|
|
|
7541
8409
|
kmToM,
|
|
7542
8410
|
ftToM,
|
|
7543
8411
|
kmToMi,
|
|
7544
|
-
miToM,
|
|
7545
8412
|
mmToIn,
|
|
7546
|
-
inToMM,
|
|
7547
8413
|
inToM,
|
|
7548
|
-
inToMMRate,
|
|
7549
8414
|
mmToMMRate,
|
|
7550
8415
|
CtoFUnit,
|
|
7551
8416
|
FtoCUnit,
|
|
7552
8417
|
mphToMsUnit,
|
|
7553
8418
|
msToMphUnit,
|
|
7554
8419
|
dbzToMMRate,
|
|
8420
|
+
mmRateToDbz,
|
|
7555
8421
|
degToDir,
|
|
7556
8422
|
getUnitPrecision,
|
|
7557
8423
|
convert,
|
|
@@ -7592,10 +8458,191 @@ export declare const utils: {
|
|
|
7592
8458
|
};
|
|
7593
8459
|
};
|
|
7594
8460
|
|
|
7595
|
-
|
|
7596
|
-
|
|
7597
|
-
|
|
7598
|
-
|
|
8461
|
+
/**
|
|
8462
|
+
* Represents the offset and scale for sampling texture data as `[ xOffset, yOffset, xScale, yScale ]`.
|
|
8463
|
+
*/
|
|
8464
|
+
export declare type UVOffset = [number, number, number, number];
|
|
8465
|
+
|
|
8466
|
+
/**
|
|
8467
|
+
* Base class for all vectors.
|
|
8468
|
+
*/
|
|
8469
|
+
export declare class Vector<T> {
|
|
8470
|
+
/**
|
|
8471
|
+
* The raw value of the vector.
|
|
8472
|
+
* @readonly
|
|
8473
|
+
*/
|
|
8474
|
+
get value(): T;
|
|
8475
|
+
/**
|
|
8476
|
+
* Assigns the vector values from an array.
|
|
8477
|
+
* @param array - The array to assign the values from.
|
|
8478
|
+
* @param offset - An optional offset to start assigning the values at.
|
|
8479
|
+
*/
|
|
8480
|
+
fromArray(array: number[], offset?: number): Vector<T>;
|
|
8481
|
+
/**
|
|
8482
|
+
* Returns the vector as an array. If an array is provided, the values will be set to that array.
|
|
8483
|
+
* @param array - An optional array to set the values to.
|
|
8484
|
+
* @param offset - An optional offset to start setting the values at.
|
|
8485
|
+
* @returns The array representation of the vector.
|
|
8486
|
+
*/
|
|
8487
|
+
toArray(array?: number[], offset?: number): number[];
|
|
8488
|
+
}
|
|
8489
|
+
|
|
8490
|
+
/**
|
|
8491
|
+
* Class representing a 2D vector and consisting of an ordered pair of numbers (x, y).
|
|
8492
|
+
*/
|
|
8493
|
+
export declare class Vector2 extends Vector<vec2> {
|
|
8494
|
+
private _value;
|
|
8495
|
+
get value(): vec2;
|
|
8496
|
+
get elements(): number;
|
|
8497
|
+
get x(): number;
|
|
8498
|
+
set x(value: number);
|
|
8499
|
+
get y(): number;
|
|
8500
|
+
set y(value: number);
|
|
8501
|
+
constructor(x?: number, y?: number);
|
|
8502
|
+
fromArray(array: number[], offset?: number): Vector2;
|
|
8503
|
+
toArray(array?: number[], offset?: number): number[];
|
|
8504
|
+
fromObject({ x, y }: {
|
|
8505
|
+
x: number;
|
|
8506
|
+
y: number;
|
|
8507
|
+
}): Vector2;
|
|
8508
|
+
toObject(): {
|
|
8509
|
+
x: number;
|
|
8510
|
+
y: number;
|
|
8511
|
+
};
|
|
8512
|
+
set(x: number, y: number): Vector2;
|
|
8513
|
+
setScalar(v: number): Vector2;
|
|
8514
|
+
length(): number;
|
|
8515
|
+
angle(): number;
|
|
8516
|
+
copy(v: Vector2): Vector2;
|
|
8517
|
+
clone(): Vector2;
|
|
8518
|
+
add(v: Vector2): Vector2;
|
|
8519
|
+
addScalar(s: number): Vector2;
|
|
8520
|
+
subtract(v: Vector2): Vector2;
|
|
8521
|
+
subtractScalar(s: number): Vector2;
|
|
8522
|
+
multiply(v: Vector2): Vector2;
|
|
8523
|
+
multiplyScalar(s: number): Vector2;
|
|
8524
|
+
divide(v: Vector2): Vector2;
|
|
8525
|
+
divideScalar(s: number): Vector2;
|
|
8526
|
+
distanceTo(v: Vector2): number;
|
|
8527
|
+
dot(v: Vector2): number;
|
|
8528
|
+
equals(v: Vector2): boolean;
|
|
8529
|
+
lerp(v: Vector2, factor: number): Vector2;
|
|
8530
|
+
normalize(): Vector2;
|
|
8531
|
+
scale(v: number): Vector2;
|
|
8532
|
+
applyMatrix3(m: Matrix3): Vector2;
|
|
8533
|
+
applyMatrix4(m: Matrix4): Vector2;
|
|
8534
|
+
}
|
|
8535
|
+
|
|
8536
|
+
/**
|
|
8537
|
+
* Class representing a 3D vector and consisting of an ordered triplet of numbers (x, y, z).
|
|
8538
|
+
*/
|
|
8539
|
+
export declare class Vector3 extends Vector<vec3> {
|
|
8540
|
+
private _value;
|
|
8541
|
+
get value(): vec3;
|
|
8542
|
+
get x(): number;
|
|
8543
|
+
set x(value: number);
|
|
8544
|
+
get y(): number;
|
|
8545
|
+
set y(value: number);
|
|
8546
|
+
get z(): number;
|
|
8547
|
+
set z(value: number);
|
|
8548
|
+
get elements(): number;
|
|
8549
|
+
constructor(x?: number, y?: number, z?: number);
|
|
8550
|
+
fromArray(array: number[], offset?: number): Vector3;
|
|
8551
|
+
toArray(array?: number[], offset?: number): number[];
|
|
8552
|
+
fromObject({ x, y, z }: {
|
|
8553
|
+
x: number;
|
|
8554
|
+
y: number;
|
|
8555
|
+
z: number;
|
|
8556
|
+
}): Vector3;
|
|
8557
|
+
toObject(): {
|
|
8558
|
+
x: number;
|
|
8559
|
+
y: number;
|
|
8560
|
+
z: number;
|
|
8561
|
+
};
|
|
8562
|
+
set(x: number, y: number, z: number): Vector3;
|
|
8563
|
+
setScalar(v: number): Vector3;
|
|
8564
|
+
length(): number;
|
|
8565
|
+
distanceToSquared(v: Vector3): number;
|
|
8566
|
+
angle(): number;
|
|
8567
|
+
copy(v: Vector3): Vector3;
|
|
8568
|
+
clone(): Vector3;
|
|
8569
|
+
add(v: Vector3): Vector3;
|
|
8570
|
+
addScalar(s: number): Vector3;
|
|
8571
|
+
subtract(v: Vector3): Vector3;
|
|
8572
|
+
subtractScalar(s: number): Vector3;
|
|
8573
|
+
subVectors(a: Vector3, b: Vector3): Vector3;
|
|
8574
|
+
multiply(v: Vector3): Vector3;
|
|
8575
|
+
multiplyScalar(s: number): Vector3;
|
|
8576
|
+
divide(v: Vector3): Vector3;
|
|
8577
|
+
divideScalar(s: number): Vector3;
|
|
8578
|
+
distanceTo(v: Vector3): number;
|
|
8579
|
+
angleTo(v: Vector3): number;
|
|
8580
|
+
dot(v: Vector3): number;
|
|
8581
|
+
equals(v: Vector3): boolean;
|
|
8582
|
+
lerp(v: Vector3, factor: number): Vector3;
|
|
8583
|
+
normalize(): Vector3;
|
|
8584
|
+
scale(v: number): Vector3;
|
|
8585
|
+
rotateX(angle: number): Vector3;
|
|
8586
|
+
rotateY(angle: number): Vector3;
|
|
8587
|
+
rotateZ(angle: number): Vector3;
|
|
8588
|
+
applyEuler(e: Euler): Vector3;
|
|
8589
|
+
applyMatrix3(m: Matrix3): Vector3;
|
|
8590
|
+
applyMatrix4(m: Matrix4): Vector3;
|
|
8591
|
+
applyQuaternion(q: Quaternion): Vector3;
|
|
8592
|
+
negate(): Vector3;
|
|
8593
|
+
}
|
|
8594
|
+
|
|
8595
|
+
/**
|
|
8596
|
+
* Class representing a 4D vector and consisting of an ordered quadruplet of numbers (x, y, z, w).
|
|
8597
|
+
*/
|
|
8598
|
+
export declare class Vector4 extends Vector<vec4> {
|
|
8599
|
+
private _value;
|
|
8600
|
+
get value(): vec4;
|
|
8601
|
+
get x(): number;
|
|
8602
|
+
set x(value: number);
|
|
8603
|
+
get y(): number;
|
|
8604
|
+
set y(value: number);
|
|
8605
|
+
get z(): number;
|
|
8606
|
+
set z(value: number);
|
|
8607
|
+
get w(): number;
|
|
8608
|
+
set w(value: number);
|
|
8609
|
+
get elements(): number;
|
|
8610
|
+
constructor(x?: number, y?: number, z?: number, w?: number);
|
|
8611
|
+
fromArray(array: number[], offset?: number): Vector4;
|
|
8612
|
+
toArray(array?: number[], offset?: number): number[];
|
|
8613
|
+
fromObject({ x, y, z, w }: {
|
|
8614
|
+
x: number;
|
|
8615
|
+
y: number;
|
|
8616
|
+
z: number;
|
|
8617
|
+
w: number;
|
|
8618
|
+
}): Vector4;
|
|
8619
|
+
toObject(): {
|
|
8620
|
+
x: number;
|
|
8621
|
+
y: number;
|
|
8622
|
+
z: number;
|
|
8623
|
+
w: number;
|
|
8624
|
+
};
|
|
8625
|
+
set(x: number, y: number, z: number, w: number): Vector4;
|
|
8626
|
+
setScalar(v: number): Vector4;
|
|
8627
|
+
length(): number;
|
|
8628
|
+
copy(v: Vector4): Vector4;
|
|
8629
|
+
clone(): Vector4;
|
|
8630
|
+
add(v: Vector4): Vector4;
|
|
8631
|
+
addScalar(s: number): Vector4;
|
|
8632
|
+
subtract(v: Vector4): Vector4;
|
|
8633
|
+
subtractScalar(s: number): Vector4;
|
|
8634
|
+
multiply(v: Vector4): Vector4;
|
|
8635
|
+
multiplyScalar(s: number): Vector4;
|
|
8636
|
+
divide(v: Vector4): Vector4;
|
|
8637
|
+
divideScalar(s: number): Vector4;
|
|
8638
|
+
distanceTo(v: Vector4): number;
|
|
8639
|
+
dot(v: Vector4): number;
|
|
8640
|
+
equals(v: Vector4): boolean;
|
|
8641
|
+
lerp(v: Vector4, factor: number): Vector4;
|
|
8642
|
+
normalize(): Vector4;
|
|
8643
|
+
scale(v: number): Vector4;
|
|
8644
|
+
applyMatrix4(m: Matrix4): Vector4;
|
|
8645
|
+
}
|
|
7599
8646
|
|
|
7600
8647
|
/**
|
|
7601
8648
|
* Represents the configuration for a vector tile data source.
|
|
@@ -7652,6 +8699,13 @@ export declare class VectorTileSource extends TileSource<VectorTileData, VectorS
|
|
|
7652
8699
|
|
|
7653
8700
|
export declare const version: string;
|
|
7654
8701
|
|
|
8702
|
+
export declare interface ViewBounds {
|
|
8703
|
+
left: number;
|
|
8704
|
+
right: number;
|
|
8705
|
+
top: number;
|
|
8706
|
+
bottom: number;
|
|
8707
|
+
}
|
|
8708
|
+
|
|
7655
8709
|
export declare const weather: {
|
|
7656
8710
|
/**
|
|
7657
8711
|
* @deprecated
|
|
@@ -7749,6 +8803,10 @@ export declare interface WeatherLayerMetadata {
|
|
|
7749
8803
|
* Update frequency of the layer's data.
|
|
7750
8804
|
*/
|
|
7751
8805
|
updateInterval: string;
|
|
8806
|
+
/**
|
|
8807
|
+
* Optional thumbnail image URL for the weather layer.
|
|
8808
|
+
*/
|
|
8809
|
+
imageUrl?: string;
|
|
7752
8810
|
}
|
|
7753
8811
|
|
|
7754
8812
|
/**
|
|
@@ -7846,6 +8904,20 @@ export declare type WeatherLayerOptions = {
|
|
|
7846
8904
|
* parameters and per-feature animation controllers.
|
|
7847
8905
|
*/
|
|
7848
8906
|
timeline: TimeAnimation;
|
|
8907
|
+
/**
|
|
8908
|
+
* MapsGL ordering slot for this weather layer. Ignored unless layer slots are
|
|
8909
|
+
* enabled on the controller (`slots: true` or a slots configuration object).
|
|
8910
|
+
* When omitted and slots are enabled, the slot is chosen from the layer type.
|
|
8911
|
+
* Use with {@link MapController.defineSlot} / {@link MapController.moveLayerToSlot}.
|
|
8912
|
+
* Prefer this over a host `beforeId` when targeting a logical band; an explicit `beforeId`
|
|
8913
|
+
* argument to {@link MapController.addWeatherLayer} still wins for host placement.
|
|
8914
|
+
*/
|
|
8915
|
+
slot?: string;
|
|
8916
|
+
/**
|
|
8917
|
+
* Within-slot stack rank (higher paints above siblings). When omitted, defaults are
|
|
8918
|
+
* resolved from the weather layer code (e.g. radar above satellite above other underlays).
|
|
8919
|
+
*/
|
|
8920
|
+
stackRank?: number;
|
|
7849
8921
|
/**
|
|
7850
8922
|
* Options for configuring a mask to apply to the layer.
|
|
7851
8923
|
*/
|
|
@@ -7863,6 +8935,11 @@ export declare class WeatherLayerProvider {
|
|
|
7863
8935
|
constructor(account: Account);
|
|
7864
8936
|
initialize(account: Account, style: MapStyle): Promise<void>;
|
|
7865
8937
|
isWeatherLayer(code: string): boolean;
|
|
8938
|
+
/**
|
|
8939
|
+
* Returns the identifiers for all weather layers supported by this SDK build.
|
|
8940
|
+
* Values come from the provider's `layers` configuration set.
|
|
8941
|
+
*/
|
|
8942
|
+
getSupportedLayerIds(): Array<string>;
|
|
7866
8943
|
/**
|
|
7867
8944
|
* Returns whether or not the specified weather code is deprecated.
|
|
7868
8945
|
*/
|
|
@@ -7895,7 +8972,9 @@ constructor(account: Account);
|
|
|
7895
8972
|
export declare type WeatherLayerStyle = `${WeatherLayerType}` | 'composite';
|
|
7896
8973
|
|
|
7897
8974
|
export declare type WeatherLayerType = Exclude<LayerType, 'particles' | 'query' | 'voronoi' | 'data' | 'debug'>;
|
|
7898
|
-
|
|
8975
|
+
|
|
8976
|
+
export declare type WebGLContext = WebGLRenderingContext | WebGL2RenderingContext;
|
|
8977
|
+
|
|
7899
8978
|
/**
|
|
7900
8979
|
* The base class for all layers rendered with WebGL. This class should not be instantiated directly but rather extended
|
|
7901
8980
|
* by a subclass that is responsible for rendering a specific type of data from a data source.
|
|
@@ -7959,6 +9038,7 @@ get mask(): LayerMask;
|
|
|
7959
9038
|
* @readonly
|
|
7960
9039
|
*/
|
|
7961
9040
|
get visible(): boolean;
|
|
9041
|
+
protected get hasMapController(): boolean;
|
|
7962
9042
|
/**
|
|
7963
9043
|
* Registers another layer as depending on this layer (for example it reads this layer via `queryFeatures`
|
|
7964
9044
|
* while this layer may be hidden). When the registry is non-empty, time-series data providers may load tiles even
|
|
@@ -8020,6 +9100,25 @@ get mask(): LayerMask;
|
|
|
8020
9100
|
* @param value - New value of the paint style property to set.
|
|
8021
9101
|
*/
|
|
8022
9102
|
setPaintProperty(property: string, value: any): void;
|
|
9103
|
+
/**
|
|
9104
|
+
* Sets the layer mask used to stencil this layer's output.
|
|
9105
|
+
* Pass `null` or `undefined` to clear any existing mask.
|
|
9106
|
+
* Prefer {@link MapController.setMask} when mask layers need to be created from weather
|
|
9107
|
+
* layer codes or `type: 'water' | 'land'` presets.
|
|
9108
|
+
* @param mask - Resolved mask with live layer instances, or `null`/`undefined` to clear.
|
|
9109
|
+
*/
|
|
9110
|
+
setMask(mask: LayerMask | null | undefined): void;
|
|
9111
|
+
/**
|
|
9112
|
+
* Whether this layer would write a stencil bit at the given coordinate when used as a mask.
|
|
9113
|
+
* Override in subclasses that act as masks (coverage, vector fill, …).
|
|
9114
|
+
* Default is `false` so unknown mask layers fail closed for query gating.
|
|
9115
|
+
*/
|
|
9116
|
+
coversCoordinate(coord: Coordinate, zoom: number, allowPartials?: boolean): boolean;
|
|
9117
|
+
/**
|
|
9118
|
+
* Whether a point passes this layer's mask (mirrors GPU stencil `mode` / `inverted`).
|
|
9119
|
+
* Returns `true` when the layer has no mask.
|
|
9120
|
+
*/
|
|
9121
|
+
passesMask(coord: Coordinate, zoom: number, allowPartials?: boolean): boolean;
|
|
8023
9122
|
/**
|
|
8024
9123
|
* Returns all features found for the layer at the specified coordinate and zoom level (optional). If a value for
|
|
8025
9124
|
* `zoom` is not provided, then the map's current zoom level will be used.
|