@xweather/mapsgl 1.8.3 → 1.8.5
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 +418 -181
- package/dist/mapsgl.js +5 -5
- package/package.json +1 -1
package/dist/mapsgl.d.ts
CHANGED
|
@@ -1589,6 +1589,13 @@ export declare interface BarLegendOptions {
|
|
|
1589
1589
|
* Whether the edges of the color scale bar should be rounded.
|
|
1590
1590
|
*/
|
|
1591
1591
|
rounded: boolean;
|
|
1592
|
+
/**
|
|
1593
|
+
* Whether the color scale bar should have equal widths for each color stop. Default is `false`.
|
|
1594
|
+
*
|
|
1595
|
+
* When `false`, each cell will have a variable width that is proportional to its value and the next cell's value
|
|
1596
|
+
* relative to the value range of the bar.
|
|
1597
|
+
*/
|
|
1598
|
+
equalWidth: boolean;
|
|
1592
1599
|
/**
|
|
1593
1600
|
* Defines the base measurement type and units for the legend which corresponds to the color scale's value range.
|
|
1594
1601
|
*/
|
|
@@ -1648,6 +1655,11 @@ export declare interface BarLegendOptions {
|
|
|
1648
1655
|
* The placement of the labels relative to the color scale bar.
|
|
1649
1656
|
*/
|
|
1650
1657
|
placement: 'top' | 'middle' | 'bottom';
|
|
1658
|
+
/**
|
|
1659
|
+
* Whether the labels should be centered on their corresponding color scale bar cell. Default is `false`,
|
|
1660
|
+
* which means the labels will be aligned to the left (beginning) of the corresponding color scale bar cell.
|
|
1661
|
+
*/
|
|
1662
|
+
centered: boolean;
|
|
1651
1663
|
/**
|
|
1652
1664
|
* The marks to display at the label positions along the color scale bar.
|
|
1653
1665
|
*/
|
|
@@ -1657,6 +1669,10 @@ export declare interface BarLegendOptions {
|
|
|
1657
1669
|
*/
|
|
1658
1670
|
margin: number | [number, number];
|
|
1659
1671
|
normalized: boolean;
|
|
1672
|
+
/**
|
|
1673
|
+
* Whether the labels should be allowed to overlap each other. Default is `false`.
|
|
1674
|
+
*/
|
|
1675
|
+
allowOverlap: boolean;
|
|
1660
1676
|
}>;
|
|
1661
1677
|
}
|
|
1662
1678
|
|
|
@@ -1677,15 +1693,6 @@ export declare class Bounds {
|
|
|
1677
1693
|
constructor(left: number, right: number, top: number, bottom: number);
|
|
1678
1694
|
}
|
|
1679
1695
|
|
|
1680
|
-
/**
|
|
1681
|
-
* Defines the granularity of subdivision for circles with `circle-pitch-alignment: 'map'` and for heatmap kernels.
|
|
1682
|
-
* More subdivision will cause circles to more closely follow the planet's surface.
|
|
1683
|
-
*
|
|
1684
|
-
* Possible values: 1, 3, 5, 7.
|
|
1685
|
-
* Subdivision of 1 results in a simple quad.
|
|
1686
|
-
*/
|
|
1687
|
-
export declare type CircleGranularity = 1 | 3 | 5 | 7;
|
|
1688
|
-
|
|
1689
1696
|
/**
|
|
1690
1697
|
* Circle style properties control how circles get rendered on a map. Use these properties in conjunction with `fill`
|
|
1691
1698
|
* and `stroke` to define the style for a circle layer.
|
|
@@ -2065,20 +2072,243 @@ declare const dbzToMMRate: (dbz: number, perSecond?: boolean) => number;
|
|
|
2065
2072
|
|
|
2066
2073
|
declare const defaultUnits: Record<Exclude<UnitSystem, 'custom'>, MapUnits>;
|
|
2067
2074
|
|
|
2075
|
+
export declare class Deferred<T> {
|
|
2076
|
+
promise: Promise<T>;
|
|
2077
|
+
resolve: (value: T | PromiseLike<T>) => void;
|
|
2078
|
+
reject: (reason?: any) => void;
|
|
2079
|
+
constructor();
|
|
2080
|
+
}
|
|
2081
|
+
|
|
2068
2082
|
declare const degToDir: (d: number) => string;
|
|
2069
2083
|
|
|
2070
2084
|
export declare interface Disposable {
|
|
2071
2085
|
dispose(): void;
|
|
2072
2086
|
}
|
|
2073
2087
|
|
|
2088
|
+
/**
|
|
2089
|
+
* Manages download tasks with queuing, concurrency control, retry logic, and caching.
|
|
2090
|
+
* Supports per-host concurrency limits and priority-based task ordering.
|
|
2091
|
+
*
|
|
2092
|
+
* @template Task - The download task type that extends DownloadTask
|
|
2093
|
+
*/
|
|
2094
|
+
export declare class DownloadManager<Task extends DownloadTask<any>> extends EventDispatcher {
|
|
2095
|
+
|
|
2096
|
+
/**
|
|
2097
|
+
* Gets the progress tracker for download operations.
|
|
2098
|
+
* Progress is calculated from actual task states for accuracy.
|
|
2099
|
+
* @returns The Progress instance tracking download statistics.
|
|
2100
|
+
*/
|
|
2101
|
+
get progress(): Progress;
|
|
2102
|
+
/**
|
|
2103
|
+
* Creates a new DownloadManager instance.
|
|
2104
|
+
* @param options - Configuration options for the download manager.
|
|
2105
|
+
* @param options.fetcher - Function that performs the fetch operation for tasks.
|
|
2106
|
+
* @param options.taskRunner - Optional custom task runner function. Defaults to runDownloadTask.
|
|
2107
|
+
* @param options.maxRetries - Maximum number of retry attempts for failed tasks.
|
|
2108
|
+
* @param options.defaultConcurrency - Default maximum concurrent downloads. Defaults to 16.
|
|
2109
|
+
* @param options.perHostConcurrency - Per-host concurrency limits, keyed by host name.
|
|
2110
|
+
*/
|
|
2111
|
+
constructor(options?: Partial<DownloadManagerOptions<TaskData<Task>>>);
|
|
2112
|
+
/**
|
|
2113
|
+
* Checks if a task result exists in the cache.
|
|
2114
|
+
* @param key - The unique identifier for the task.
|
|
2115
|
+
* @returns True if the task result is cached, false otherwise.
|
|
2116
|
+
*/
|
|
2117
|
+
has(key: string): boolean;
|
|
2118
|
+
/**
|
|
2119
|
+
* Retrieves a cached task result.
|
|
2120
|
+
* @param key - The unique identifier for the task.
|
|
2121
|
+
* @returns The cached task data, or undefined if not found.
|
|
2122
|
+
*/
|
|
2123
|
+
get(key: string): TaskData<Task> | undefined;
|
|
2124
|
+
/**
|
|
2125
|
+
* Sets the task runner function used to execute download tasks.
|
|
2126
|
+
* @param runner - The task runner function that handles task execution with retry logic.
|
|
2127
|
+
*/
|
|
2128
|
+
setTaskRunner(runner: TaskRunner<Task>): void;
|
|
2129
|
+
/**
|
|
2130
|
+
* Sets the task transformer function that modifies tasks before execution.
|
|
2131
|
+
* @param transformer - Function that receives a task and returns a (possibly modified) task.
|
|
2132
|
+
*/
|
|
2133
|
+
setTaskTransformer(transformer: (task: Task) => Task): void;
|
|
2134
|
+
/**
|
|
2135
|
+
* Finds all tasks that match the provided predicate function.
|
|
2136
|
+
* @param predicate - A callback that receives a task and returns true if it should be included.
|
|
2137
|
+
*/
|
|
2138
|
+
find(predicate: (task: Task) => boolean): Task[];
|
|
2139
|
+
/**
|
|
2140
|
+
* Finds the first task that matches the provided predicate function.
|
|
2141
|
+
* @param predicate - A callback that receives a task and returns true for a match.
|
|
2142
|
+
*/
|
|
2143
|
+
findOne(predicate: (task: Task) => boolean): Task | undefined;
|
|
2144
|
+
/**
|
|
2145
|
+
* Returns true if any task matches the provided predicate function.
|
|
2146
|
+
* @param predicate - A callback that receives a task and returns true for a match.
|
|
2147
|
+
*/
|
|
2148
|
+
hasTask(predicate: (task: Task) => boolean): boolean;
|
|
2149
|
+
private _totalTasks;
|
|
2150
|
+
/**
|
|
2151
|
+
* Adds a task to the download queue and optionally starts processing.
|
|
2152
|
+
* Tasks are organized by host for per-host concurrency control and sorted by priority.
|
|
2153
|
+
* @param task - The download task to enqueue.
|
|
2154
|
+
* @param start - If true, immediately starts processing the queue. Defaults to true.
|
|
2155
|
+
* @param isRetry - If true, this is a retry and should not increment total. Defaults to false.
|
|
2156
|
+
*/
|
|
2157
|
+
enqueue(task: Task, start?: boolean, isRetryParam?: boolean): void;
|
|
2158
|
+
/**
|
|
2159
|
+
* Aborts a specific download task.
|
|
2160
|
+
* If the task is in-flight, the request is aborted. If pending, it's removed from the queue.
|
|
2161
|
+
* Updates progress tracking accordingly.
|
|
2162
|
+
* @param task - The task to abort.
|
|
2163
|
+
*/
|
|
2164
|
+
abort(task: Task): void;
|
|
2165
|
+
/**
|
|
2166
|
+
* Aborts all tasks that match the provided predicate function.
|
|
2167
|
+
* @param predicate - A callback that receives a task and returns true if it should be aborted.
|
|
2168
|
+
*/
|
|
2169
|
+
abortWhere(predicate: (task: Task) => boolean): void;
|
|
2170
|
+
/**
|
|
2171
|
+
* Aborts all tasks.
|
|
2172
|
+
*/
|
|
2173
|
+
abortAll(): void;
|
|
2174
|
+
|
|
2175
|
+
}
|
|
2176
|
+
|
|
2177
|
+
/**
|
|
2178
|
+
* Configuration options for creating a DownloadManager instance.
|
|
2179
|
+
* @template Task - The download task type that extends DownloadTask
|
|
2180
|
+
*/
|
|
2181
|
+
export declare interface DownloadManagerOptions<Task extends DownloadTask<any>> {
|
|
2182
|
+
/** Function that performs the fetch operation for tasks. */
|
|
2183
|
+
fetcher: Fetcher<Task>;
|
|
2184
|
+
/** Optional custom task runner function. Defaults to runDownloadTask if not provided. */
|
|
2185
|
+
taskRunner?: TaskRunner<Task>;
|
|
2186
|
+
/** Maximum number of retry attempts for failed tasks. */
|
|
2187
|
+
maxRetries?: number;
|
|
2188
|
+
/** Default maximum concurrent downloads across all hosts. Defaults to 16 if not provided. */
|
|
2189
|
+
defaultConcurrency?: number;
|
|
2190
|
+
/** Per-host concurrency limits, keyed by host name. */
|
|
2191
|
+
perHostConcurrency?: Record<string, number>;
|
|
2192
|
+
}
|
|
2193
|
+
|
|
2194
|
+
/**
|
|
2195
|
+
* Priority levels for download tasks. Lower numbers indicate higher priority.
|
|
2196
|
+
* Tasks with lower priority values are processed before tasks with higher values.
|
|
2197
|
+
*/
|
|
2074
2198
|
declare const DownloadPriority: {
|
|
2199
|
+
/** Critical priority (0) - highest priority, processed first. */
|
|
2075
2200
|
readonly critical: 0;
|
|
2201
|
+
/** High priority (1) - processed after critical tasks. */
|
|
2076
2202
|
readonly high: 1;
|
|
2203
|
+
/** Warm priority (2) - lowest priority, processed last. */
|
|
2077
2204
|
readonly warm: 2;
|
|
2078
2205
|
};
|
|
2079
2206
|
|
|
2207
|
+
/**
|
|
2208
|
+
* Type representing a download priority value.
|
|
2209
|
+
*/
|
|
2080
2210
|
export declare type DownloadPriority = ObjectValue<typeof DownloadPriority>;
|
|
2081
2211
|
|
|
2212
|
+
/**
|
|
2213
|
+
* Status values for download tasks throughout their lifecycle.
|
|
2214
|
+
*/
|
|
2215
|
+
declare const DownloadStatus: {
|
|
2216
|
+
/** Task is queued and waiting to be processed. */
|
|
2217
|
+
readonly pending: "pending";
|
|
2218
|
+
/** Task is currently being executed (fetch in progress). */
|
|
2219
|
+
readonly inFlight: "in-flight";
|
|
2220
|
+
/** Task completed successfully. */
|
|
2221
|
+
readonly success: "success";
|
|
2222
|
+
/** Task failed after all retry attempts. */
|
|
2223
|
+
readonly failed: "failed";
|
|
2224
|
+
/** Task was cancelled before completion. */
|
|
2225
|
+
readonly cancelled: "cancelled";
|
|
2226
|
+
};
|
|
2227
|
+
|
|
2228
|
+
/**
|
|
2229
|
+
* Type representing a download status value.
|
|
2230
|
+
*/
|
|
2231
|
+
export declare type DownloadStatus = ObjectValue<typeof DownloadStatus>;
|
|
2232
|
+
|
|
2233
|
+
/**
|
|
2234
|
+
* Represents a single download task with its configuration, state, and result handling.
|
|
2235
|
+
* @template ResultType - The type of data that will be returned when the task completes.
|
|
2236
|
+
*/
|
|
2237
|
+
export declare class DownloadTask<ResultType> {
|
|
2238
|
+
/** Unique identifier for this task. */
|
|
2239
|
+
readonly key: string;
|
|
2240
|
+
/** URL to fetch data from. */
|
|
2241
|
+
readonly url: string;
|
|
2242
|
+
/** Request options for the download task. */
|
|
2243
|
+
readonly options: Partial<DownloadTaskRequestOptions>;
|
|
2244
|
+
/** AbortController for cancelling the request. */
|
|
2245
|
+
readonly controller: AbortController;
|
|
2246
|
+
/** Expected result type for the response ('blob', 'json', 'arrayBuffer', or 'text'). */
|
|
2247
|
+
resultType: 'blob' | 'json' | 'arrayBuffer' | 'text';
|
|
2248
|
+
/** Priority level for this task. Lower numbers indicate higher priority. */
|
|
2249
|
+
priority: DownloadPriority;
|
|
2250
|
+
/** Current status of the download task. */
|
|
2251
|
+
status: DownloadStatus;
|
|
2252
|
+
/** Number of retry attempts made for this task. */
|
|
2253
|
+
retries: number;
|
|
2254
|
+
/** The Response object from the fetch operation, if available. */
|
|
2255
|
+
response: Response | undefined;
|
|
2256
|
+
/** Optional custom parser function to transform the Response into ResultType. */
|
|
2257
|
+
parse: ((response: Response) => Promise<ResultType>) | undefined;
|
|
2258
|
+
/** Deferred promise that resolves when the task completes. Set externally by the download scheduler. */
|
|
2259
|
+
readonly deferred: Deferred<ResultType>;
|
|
2260
|
+
/**
|
|
2261
|
+
* Gets the promise that resolves when the task completes.
|
|
2262
|
+
* @returns A Promise that resolves with the task result.
|
|
2263
|
+
*/
|
|
2264
|
+
get promise(): Promise<ResultType>;
|
|
2265
|
+
/** Optional host name for per-host concurrency control. */
|
|
2266
|
+
host?: string;
|
|
2267
|
+
/**
|
|
2268
|
+
* Creates a new DownloadTask instance.
|
|
2269
|
+
* @param key - Unique identifier for the task.
|
|
2270
|
+
* @param url - URL to fetch data from.
|
|
2271
|
+
* @param options - Request options for the download task.
|
|
2272
|
+
* @param priority - Priority level for the task. Defaults to DownloadPriority.warm if not provided.
|
|
2273
|
+
*/
|
|
2274
|
+
constructor(key: string, url: string, options: Partial<DownloadTaskRequestOptions>, priority?: DownloadPriority);
|
|
2275
|
+
getResponseResult(response: Response | Record<string, any>): Promise<any>;
|
|
2276
|
+
}
|
|
2277
|
+
|
|
2278
|
+
/**
|
|
2279
|
+
* Options for configuring a download task request.
|
|
2280
|
+
*/
|
|
2281
|
+
export declare type DownloadTaskRequestOptions = {
|
|
2282
|
+
/**
|
|
2283
|
+
* The HTTP method to use for the request.
|
|
2284
|
+
*/
|
|
2285
|
+
method: 'GET' | 'POST';
|
|
2286
|
+
/**
|
|
2287
|
+
* The authenticator to use for the request, if any.
|
|
2288
|
+
*/
|
|
2289
|
+
authenticator?: AnyAuthenticator;
|
|
2290
|
+
/**
|
|
2291
|
+
* The request body to send, if any.
|
|
2292
|
+
*/
|
|
2293
|
+
body?: any;
|
|
2294
|
+
/**
|
|
2295
|
+
* The request headers to send, if any.
|
|
2296
|
+
*/
|
|
2297
|
+
headers?: Record<string, string>;
|
|
2298
|
+
/**
|
|
2299
|
+
* The request parameters to send, if any.
|
|
2300
|
+
*/
|
|
2301
|
+
params: Record<string, any>;
|
|
2302
|
+
/**
|
|
2303
|
+
* The {@link AbortSignal} to use for the request.
|
|
2304
|
+
*/
|
|
2305
|
+
signal: AbortSignal;
|
|
2306
|
+
/**
|
|
2307
|
+
* The download priority of the request.
|
|
2308
|
+
*/
|
|
2309
|
+
priority: DownloadPriority;
|
|
2310
|
+
};
|
|
2311
|
+
|
|
2082
2312
|
/**
|
|
2083
2313
|
* Set of common easing functions.
|
|
2084
2314
|
*/
|
|
@@ -2174,16 +2404,25 @@ export declare interface EncodedRasterDataset {
|
|
|
2174
2404
|
*/
|
|
2175
2405
|
export declare interface EncodedSourceSpecification<Dataset extends EncodedRasterDataset> extends TileSourceSpecification {
|
|
2176
2406
|
/**
|
|
2177
|
-
* The datasets that are encoded in the tile data.
|
|
2407
|
+
* The datasets that are encoded in the tile data. These are used for requesting tiles from the server.
|
|
2408
|
+
* If the data is transformed (e.g., converting precip to snowfall), use `effectiveDatasets` to provide
|
|
2409
|
+
* the transformed datasets with updated dataMin/dataMax values for operations and rendering.
|
|
2178
2410
|
*/
|
|
2179
2411
|
datasets: Array<Partial<Dataset>>;
|
|
2412
|
+
/**
|
|
2413
|
+
* The effective datasets used for operations and rendering. If not provided, defaults to `datasets`.
|
|
2414
|
+
* Use this when data transformations change the dataMin/dataMax values (e.g., converting precipitation
|
|
2415
|
+
* to snowfall). The original `datasets` are still used for tile requests.
|
|
2416
|
+
*/
|
|
2417
|
+
effectiveDatasets?: Array<Partial<Dataset>>;
|
|
2180
2418
|
/**
|
|
2181
2419
|
* Optional function to transform tile data after it has been loaded. This allows for custom processing or
|
|
2182
2420
|
* modification of the tile data before it is used for rendering, such as converting it to other values
|
|
2183
2421
|
* derived from the original encoded data.
|
|
2184
2422
|
* @param data - The loaded tile data as an RGBA image.
|
|
2185
2423
|
* @param datasets - An array of dataset objects associated with this source, which contains information about the
|
|
2186
|
-
* original encoded data and its value ranges.
|
|
2424
|
+
* original encoded data and its value ranges. This array can be modified in-place to update dataMin/dataMax
|
|
2425
|
+
* values for transformed data.
|
|
2187
2426
|
*/
|
|
2188
2427
|
transformTileData?: (data: RGBAImage, datasets: Array<Dataset>) => void;
|
|
2189
2428
|
}
|
|
@@ -2202,8 +2441,8 @@ export declare class EncodedTileSource<Source extends EncodedSourceSpecification
|
|
|
2202
2441
|
|
|
2203
2442
|
get type(): string;
|
|
2204
2443
|
constructor(id: string, spec: Partial<Source>);
|
|
2205
|
-
|
|
2206
|
-
|
|
2444
|
+
|
|
2445
|
+
/**
|
|
2207
2446
|
* Returns the metadata for the specified band, if available.
|
|
2208
2447
|
* @param band - The band to get metadata for.
|
|
2209
2448
|
* @returns
|
|
@@ -2335,6 +2574,14 @@ export declare type FeatureQueryResult = {
|
|
|
2335
2574
|
nodata: boolean;
|
|
2336
2575
|
};
|
|
2337
2576
|
|
|
2577
|
+
/**
|
|
2578
|
+
* Function type that performs the actual fetch operation for a download task.
|
|
2579
|
+
* @template Task - The download task type that extends DownloadTask
|
|
2580
|
+
* @param task - The download task to fetch data for.
|
|
2581
|
+
* @returns A Promise that resolves with a Response object.
|
|
2582
|
+
*/
|
|
2583
|
+
export declare type Fetcher<Task extends DownloadTask<any>> = (task: Task) => Promise<Response>;
|
|
2584
|
+
|
|
2338
2585
|
export declare type FillPattern = string | RemoteSymbolImage;
|
|
2339
2586
|
|
|
2340
2587
|
/**
|
|
@@ -2524,6 +2771,10 @@ export declare type GeoJsonProperties = {
|
|
|
2524
2771
|
* A subclass of {@link VectorTileSource} that is used to represent GeoJSON data.
|
|
2525
2772
|
*/
|
|
2526
2773
|
export declare class GeoJSONSource extends VectorTileSource {
|
|
2774
|
+
/**
|
|
2775
|
+
* Whether the GeoJSON data is dynamic, meaning it will be updated frequently. Default is `false`.
|
|
2776
|
+
*/
|
|
2777
|
+
dynamic: boolean;
|
|
2527
2778
|
|
|
2528
2779
|
private _transformGeoJSON?;
|
|
2529
2780
|
get type(): string;
|
|
@@ -2536,8 +2787,9 @@ export declare class GeoJSONSource extends VectorTileSource {
|
|
|
2536
2787
|
* The GeoJSON data associated with the source, either provided statically or from a remote source.
|
|
2537
2788
|
*/
|
|
2538
2789
|
get data(): GeoJSONFeatureCollection;
|
|
2539
|
-
private coalesce;
|
|
2540
2790
|
private pendingLoad;
|
|
2791
|
+
private needsUpdate;
|
|
2792
|
+
private dataRevision;
|
|
2541
2793
|
constructor(id: string, spec: Partial<GeoJSONSourceSpecification>);
|
|
2542
2794
|
/**
|
|
2543
2795
|
* Sets the URL of the GeoJSON data.
|
|
@@ -2558,6 +2810,7 @@ export declare class GeoJSONSource extends VectorTileSource {
|
|
|
2558
2810
|
expireAllTiles(): void;
|
|
2559
2811
|
reload(): void;
|
|
2560
2812
|
private updateWorkerData;
|
|
2813
|
+
private processWorkerUpdate;
|
|
2561
2814
|
}
|
|
2562
2815
|
|
|
2563
2816
|
/**
|
|
@@ -2572,6 +2825,10 @@ export declare interface GeoJSONSourceSpecification extends SourceSpecification
|
|
|
2572
2825
|
* The GeoJSON URL template string to use when requesting GeoJSON data.
|
|
2573
2826
|
*/
|
|
2574
2827
|
url: string;
|
|
2828
|
+
/**
|
|
2829
|
+
* Whether the GeoJSON data is dynamic, meaning it will be updated frequently. Default is `false`.
|
|
2830
|
+
*/
|
|
2831
|
+
dynamic?: boolean;
|
|
2575
2832
|
/**
|
|
2576
2833
|
* A function that transforms the GeoJSON data before it is sent to the worker for processing.
|
|
2577
2834
|
* @param source - The GeoJSON source.
|
|
@@ -2839,6 +3096,7 @@ export declare type LabelItem = {
|
|
|
2839
3096
|
value: number;
|
|
2840
3097
|
label: string;
|
|
2841
3098
|
position?: number;
|
|
3099
|
+
span?: number;
|
|
2842
3100
|
};
|
|
2843
3101
|
|
|
2844
3102
|
/**
|
|
@@ -2960,8 +3218,43 @@ export declare type LayerGroups = {
|
|
|
2960
3218
|
* Layer mask configuration.
|
|
2961
3219
|
*/
|
|
2962
3220
|
export declare type LayerMask = {
|
|
2963
|
-
|
|
3221
|
+
layers: Array<WebGLLayer>;
|
|
2964
3222
|
inverted?: boolean;
|
|
3223
|
+
mode?: 'all' | 'any';
|
|
3224
|
+
};
|
|
3225
|
+
|
|
3226
|
+
export declare type LayerMaskConfiguration = Partial<LayerMaskSpecification> & {
|
|
3227
|
+
/**
|
|
3228
|
+
* The type of mask to apply to the layer. This is an alternative to using the `layers` property. If both
|
|
3229
|
+
* are provided, the `layers` property will take precedence.
|
|
3230
|
+
*/
|
|
3231
|
+
type?: 'water' | 'land';
|
|
3232
|
+
};
|
|
3233
|
+
|
|
3234
|
+
/**
|
|
3235
|
+
* Layer mask specification.
|
|
3236
|
+
*/
|
|
3237
|
+
export declare type LayerMaskSpecification = {
|
|
3238
|
+
/**
|
|
3239
|
+
* An array of layer identifiers and optional overrides to use for masking this layer's output. If the `id` is a
|
|
3240
|
+
* weather layer identifier, use the `overrides` property to provide additional options for the layer and the mask
|
|
3241
|
+
* layer will be created automatically. Use this in combination with the `mode` property to control how the masks
|
|
3242
|
+
* are applied to the layer's final output.
|
|
3243
|
+
*/
|
|
3244
|
+
layers: Array<{
|
|
3245
|
+
id: string;
|
|
3246
|
+
overrides?: Partial<WeatherLayerOptions>;
|
|
3247
|
+
}>;
|
|
3248
|
+
/**
|
|
3249
|
+
* Whether to invert the mask, meaning the layer will be visible outside of the mask area.
|
|
3250
|
+
*/
|
|
3251
|
+
invert?: boolean;
|
|
3252
|
+
/**
|
|
3253
|
+
* The mode to use applying the masks, either 'all' (default) or 'any'.
|
|
3254
|
+
* - 'all': The layer will be visible only if all the masks are visible (intersection of all masks).
|
|
3255
|
+
* - 'any': The layer will be visible if any of the masks are visible (union of all masks).
|
|
3256
|
+
*/
|
|
3257
|
+
mode?: 'all' | 'any';
|
|
2965
3258
|
};
|
|
2966
3259
|
|
|
2967
3260
|
export declare type LayerMetadata = {
|
|
@@ -3075,6 +3368,14 @@ export declare interface LayerSpecification {
|
|
|
3075
3368
|
* Type of layer.
|
|
3076
3369
|
*/
|
|
3077
3370
|
type: LayerType;
|
|
3371
|
+
/**
|
|
3372
|
+
* The minimum zoom level for the layer.
|
|
3373
|
+
*/
|
|
3374
|
+
minZoom?: number;
|
|
3375
|
+
/**
|
|
3376
|
+
* The maximum zoom level for the layer.
|
|
3377
|
+
*/
|
|
3378
|
+
maxZoom?: number;
|
|
3078
3379
|
/**
|
|
3079
3380
|
* Data source associated with the layer.
|
|
3080
3381
|
* @remarks
|
|
@@ -3104,10 +3405,10 @@ export declare interface LayerSpecification {
|
|
|
3104
3405
|
*/
|
|
3105
3406
|
queryType?: ObjectValueFromKeys<typeof LayerType, 'text' | 'symbol' | 'circle'>;
|
|
3106
3407
|
/**
|
|
3107
|
-
* Layer
|
|
3108
|
-
*
|
|
3408
|
+
* Layer mask configuration to use when rendering the the layer, if any. The layer(s) used for masking must have
|
|
3409
|
+
* already been added to the map.
|
|
3109
3410
|
*/
|
|
3110
|
-
mask?:
|
|
3411
|
+
mask?: LayerMaskSpecification;
|
|
3111
3412
|
/**
|
|
3112
3413
|
* Filter expression to use for filtering features from the data source. This is only used for vector tile data
|
|
3113
3414
|
* sources whose tiles are in the Mapbox Vector Tile (MVT) format.
|
|
@@ -3818,14 +4119,14 @@ get needsViewportUpdate(): boolean;
|
|
|
3818
4119
|
|
|
3819
4120
|
/**
|
|
3820
4121
|
* Adds a new weather layer to the map.
|
|
3821
|
-
* @param
|
|
4122
|
+
* @param idOrConfig - One of the supported weather layer identifiers or a weather layer configuration object.
|
|
3822
4123
|
* @param overrides - An object containing data and render style overrides for the weather layer.
|
|
3823
4124
|
* @param beforeId - The identifier of an existing map layer to insert the new layer before, which will result in
|
|
3824
4125
|
* the new layer appearing below the target layer. If not provided, then the new layer will be added to the end of
|
|
3825
4126
|
* the layer stack and above all other layers.
|
|
3826
4127
|
* @returns The newly added map layer or an array of layers if the weather layer identifier maps to multiple layers.
|
|
3827
4128
|
*/
|
|
3828
|
-
addWeatherLayer(
|
|
4129
|
+
addWeatherLayer(idOrConfig: WeatherLayerConfiguration | string, overrides?: Partial<WeatherLayerOptions>, beforeId?: string): WebGLLayer | Array<WebGLLayer>;
|
|
3829
4130
|
/**
|
|
3830
4131
|
* Removes a weather layer from the map.
|
|
3831
4132
|
* @param id - One of the supported weather layer identifiers.
|
|
@@ -4367,18 +4668,6 @@ export declare interface MapViewState {
|
|
|
4367
4668
|
projectionMatrix?: Matrix4;
|
|
4368
4669
|
}
|
|
4369
4670
|
|
|
4370
|
-
export declare type MaskConfiguration = {
|
|
4371
|
-
id?: string;
|
|
4372
|
-
layerId: string;
|
|
4373
|
-
invert?: boolean;
|
|
4374
|
-
overrides?: Record<string, any>;
|
|
4375
|
-
};
|
|
4376
|
-
|
|
4377
|
-
export declare type MaskLayerSpecification = {
|
|
4378
|
-
id: string;
|
|
4379
|
-
invert?: boolean;
|
|
4380
|
-
};
|
|
4381
|
-
|
|
4382
4671
|
declare const mbToHg: (mb: number) => number;
|
|
4383
4672
|
|
|
4384
4673
|
declare const mbToPa: (mb: number) => number;
|
|
@@ -4638,22 +4927,22 @@ export declare const ParticleDensity: {
|
|
|
4638
4927
|
* Least amount of particles will be rendered. This density setting may not provide enough speed and direction
|
|
4639
4928
|
* information on the map since coverage is minimal. Sets the particle count per tile to 8^2.
|
|
4640
4929
|
*/
|
|
4641
|
-
readonly minimal:
|
|
4930
|
+
readonly minimal: 16;
|
|
4642
4931
|
/**
|
|
4643
4932
|
* Slightly less particle density than `normal`, allowing the most visibiilty to content underneath while
|
|
4644
4933
|
* providing good speed and direction information. Sets the particle count per tile to 16^2.
|
|
4645
4934
|
*/
|
|
4646
|
-
readonly low:
|
|
4935
|
+
readonly low: 32;
|
|
4647
4936
|
/**
|
|
4648
4937
|
* Provides a good amount of particles and speed and direction information while still allowing a good portion
|
|
4649
4938
|
* of content underneath to remain visible. Sets the particle count per tile to 48^2.
|
|
4650
4939
|
*/
|
|
4651
|
-
readonly normal:
|
|
4940
|
+
readonly normal: 64;
|
|
4652
4941
|
/**
|
|
4653
4942
|
* Slightly higher particle density than `normal` while still allowing some content underneath to remain visible.
|
|
4654
4943
|
* Sets the particle count per tile to 76^2.
|
|
4655
4944
|
*/
|
|
4656
|
-
readonly high:
|
|
4945
|
+
readonly high: 96;
|
|
4657
4946
|
/**
|
|
4658
4947
|
* Highest density that will essentially fill the layer with particle data, preventing content underneath from
|
|
4659
4948
|
* being visible. Note that overall map performance may be affected with this setting for some hardware
|
|
@@ -4901,8 +5190,18 @@ export declare type QueryLayerConfiguration = {
|
|
|
4901
5190
|
overrides?: Record<string, any>;
|
|
4902
5191
|
};
|
|
4903
5192
|
|
|
5193
|
+
/**
|
|
5194
|
+
* Query layer specification.
|
|
5195
|
+
*/
|
|
4904
5196
|
export declare type QueryLayerSpecification = {
|
|
5197
|
+
/**
|
|
5198
|
+
* Layer identifier of the layer to use for querying/sampling data from.
|
|
5199
|
+
*/
|
|
4905
5200
|
id: string;
|
|
5201
|
+
/**
|
|
5202
|
+
* Whether to hide the query layer. Default value is `false` which means the query layer will be visible. If you
|
|
5203
|
+
* set this to `true`, then the query layer will be hidden while still being available for querying/sampling data.
|
|
5204
|
+
*/
|
|
4906
5205
|
hidden?: boolean;
|
|
4907
5206
|
};
|
|
4908
5207
|
|
|
@@ -5120,6 +5419,7 @@ export declare class SourceMetadata extends EventDispatcher {
|
|
|
5120
5419
|
private _transformer;
|
|
5121
5420
|
private _hasLoaded;
|
|
5122
5421
|
private _lastRequestOptions;
|
|
5422
|
+
|
|
5123
5423
|
/**
|
|
5124
5424
|
* Creates an instance of SourceMetadata
|
|
5125
5425
|
* @param url - URL to request metadata from if needed.
|
|
@@ -5167,6 +5467,7 @@ export declare class SourceMetadata extends EventDispatcher {
|
|
|
5167
5467
|
* @readonly
|
|
5168
5468
|
*/
|
|
5169
5469
|
get hasValidTimes(): boolean;
|
|
5470
|
+
get validTimeRange(): TimeRange;
|
|
5170
5471
|
getAllValidTimes(): Array<Date>;
|
|
5171
5472
|
/**
|
|
5172
5473
|
* Returns an array of valid times for the source. If the source has multiple datasets, the valid times
|
|
@@ -5490,6 +5791,8 @@ export declare const styles: {
|
|
|
5490
5791
|
};
|
|
5491
5792
|
prate: (string | number)[];
|
|
5492
5793
|
precip_accum: (string | number)[];
|
|
5794
|
+
sleet_accum: (string | number)[];
|
|
5795
|
+
ice_accum: (string | number)[];
|
|
5493
5796
|
radar: {
|
|
5494
5797
|
rain: (string | number)[];
|
|
5495
5798
|
mix: (string | number)[];
|
|
@@ -5511,93 +5814,7 @@ export declare const styles: {
|
|
|
5511
5814
|
* data-driven styling.
|
|
5512
5815
|
*/
|
|
5513
5816
|
export declare type StyleValue<T> = T | ((data: StylableData) => T);
|
|
5514
|
-
|
|
5515
|
-
/**
|
|
5516
|
-
* Controls how much subdivision happens for a given type of geometry at different zoom levels.
|
|
5517
|
-
*/
|
|
5518
|
-
export declare class SubdivisionGranularityExpression {
|
|
5519
|
-
/**
|
|
5520
|
-
* A tile of zoom level 0 will be subdivided to this granularity level.
|
|
5521
|
-
* Each subsequent zoom level will have its granularity halved.
|
|
5522
|
-
*/
|
|
5523
|
-
private readonly _baseZoomGranularity;
|
|
5524
|
-
/**
|
|
5525
|
-
* No tile will have granularity level smaller than this.
|
|
5526
|
-
*/
|
|
5527
|
-
private readonly _minGranularity;
|
|
5528
|
-
constructor(baseZoomGranularity: number, minGranularity: number);
|
|
5529
|
-
getGranularityForZoomLevel(zoomLevel: number): number;
|
|
5530
|
-
}
|
|
5531
|
-
|
|
5532
|
-
export declare interface SubdivisionGranularityOptions {
|
|
5533
|
-
/**
|
|
5534
|
-
* Granularity settings used for fill and fill-extrusion layers (for fill, both polygons and their anti-aliasing outlines).
|
|
5535
|
-
*/
|
|
5536
|
-
fill: {
|
|
5537
|
-
base: number;
|
|
5538
|
-
min: number;
|
|
5539
|
-
};
|
|
5540
|
-
/**
|
|
5541
|
-
* Granularity used for the line layer.
|
|
5542
|
-
*/
|
|
5543
|
-
line: {
|
|
5544
|
-
base: number;
|
|
5545
|
-
min: number;
|
|
5546
|
-
};
|
|
5547
|
-
/**
|
|
5548
|
-
* Granularity used for geometry covering the entire tile: stencil masks, raster tiles, etc.
|
|
5549
|
-
*/
|
|
5550
|
-
tile: {
|
|
5551
|
-
base: number;
|
|
5552
|
-
min: number;
|
|
5553
|
-
};
|
|
5554
|
-
/**
|
|
5555
|
-
* Granularity used for stencil masks for tiles.
|
|
5556
|
-
*/
|
|
5557
|
-
stencil: {
|
|
5558
|
-
base: number;
|
|
5559
|
-
min: number;
|
|
5560
|
-
};
|
|
5561
|
-
/**
|
|
5562
|
-
* Controls the granularity of `pitch-alignment: map` circles and heatmap kernels.
|
|
5563
|
-
* More granular circles will more closely follow the map's surface.
|
|
5564
|
-
*/
|
|
5565
|
-
circle: CircleGranularity;
|
|
5566
|
-
}
|
|
5567
|
-
|
|
5568
|
-
/**
|
|
5569
|
-
* An object describing how much subdivision should be applied to different types of geometry at different zoom levels.
|
|
5570
|
-
*/
|
|
5571
|
-
export declare class SubdivisionGranularitySetting {
|
|
5572
|
-
/**
|
|
5573
|
-
* Granularity settings used for fill and fill-extrusion layers (for fill, both polygons and their anti-aliasing outlines).
|
|
5574
|
-
*/
|
|
5575
|
-
readonly fill: SubdivisionGranularityExpression;
|
|
5576
|
-
/**
|
|
5577
|
-
* Granularity used for the line layer.
|
|
5578
|
-
*/
|
|
5579
|
-
readonly line: SubdivisionGranularityExpression;
|
|
5580
|
-
/**
|
|
5581
|
-
* Granularity used for geometry covering the entire tile: raster tiles, etc.
|
|
5582
|
-
*/
|
|
5583
|
-
readonly tile: SubdivisionGranularityExpression;
|
|
5584
|
-
/**
|
|
5585
|
-
* Granularity used for stencil masks for tiles.
|
|
5586
|
-
*/
|
|
5587
|
-
readonly stencil: SubdivisionGranularityExpression;
|
|
5588
|
-
/**
|
|
5589
|
-
* Controls the granularity of `pitch-alignment: map` circles and heatmap kernels.
|
|
5590
|
-
* More granular circles will more closely follow the map's surface.
|
|
5591
|
-
*/
|
|
5592
|
-
readonly circle: CircleGranularity;
|
|
5593
|
-
constructor(options: SubdivisionGranularityOptions);
|
|
5594
|
-
/**
|
|
5595
|
-
* Granularity settings that disable subdivision altogether.
|
|
5596
|
-
*/
|
|
5597
|
-
static readonly noSubdivision: SubdivisionGranularityOptions;
|
|
5598
|
-
static readonly globeSubdivision: SubdivisionGranularityOptions;
|
|
5599
|
-
}
|
|
5600
|
-
|
|
5817
|
+
|
|
5601
5818
|
/**
|
|
5602
5819
|
* Supported color bands.
|
|
5603
5820
|
*/
|
|
@@ -5748,6 +5965,37 @@ export declare interface SymbolStyleSpec {
|
|
|
5748
5965
|
factor: StyleValue<number>;
|
|
5749
5966
|
}
|
|
5750
5967
|
|
|
5968
|
+
/**
|
|
5969
|
+
* Extracts the result type from a DownloadTask type.
|
|
5970
|
+
* @template Task - The download task type that extends DownloadTask
|
|
5971
|
+
* @example
|
|
5972
|
+
* type MyTask = DownloadTask<string>;
|
|
5973
|
+
* type MyResult = TaskData<MyTask>; // MyResult is 'string'
|
|
5974
|
+
*/
|
|
5975
|
+
export declare type TaskData<Task extends DownloadTask<any>> = Task extends DownloadTask<infer T> ? T : never;
|
|
5976
|
+
|
|
5977
|
+
/**
|
|
5978
|
+
* Function type that executes a download task with retry logic and error handling.
|
|
5979
|
+
* @template Task - The download task type that extends DownloadTask
|
|
5980
|
+
* @param task - The download task to execute.
|
|
5981
|
+
* @param config - Configuration for the task runner.
|
|
5982
|
+
* @returns A Promise that resolves when the task completes (successfully or after all retries fail).
|
|
5983
|
+
*/
|
|
5984
|
+
export declare type TaskRunner<Task extends DownloadTask<any>> = (task: Task, config: TaskRunnerConfig<Task>) => Promise<Response>;
|
|
5985
|
+
|
|
5986
|
+
/**
|
|
5987
|
+
* Configuration object for task runner execution.
|
|
5988
|
+
* @template Task - The download task type that extends DownloadTask
|
|
5989
|
+
*/
|
|
5990
|
+
export declare interface TaskRunnerConfig<Task extends DownloadTask<any>> {
|
|
5991
|
+
/** Maximum number of retry attempts for failed tasks. */
|
|
5992
|
+
maxRetries: number;
|
|
5993
|
+
/** HTTP status code range [min, max] that triggers retry attempts. */
|
|
5994
|
+
retryStatusRange: [number, number];
|
|
5995
|
+
/** Optional function to transform tasks before execution. */
|
|
5996
|
+
taskTransformer?: (task: Task) => Task;
|
|
5997
|
+
}
|
|
5998
|
+
|
|
5751
5999
|
/**
|
|
5752
6000
|
* Text style properties control how text gets rendered on a map from vector features. Use these properties on
|
|
5753
6001
|
* conjunction with `symbol` to define the style for a text layer.
|
|
@@ -6057,16 +6305,7 @@ export declare type TileCoordinateBounds = {
|
|
|
6057
6305
|
nw: TileCoordinate;
|
|
6058
6306
|
se: TileCoordinate;
|
|
6059
6307
|
};
|
|
6060
|
-
|
|
6061
|
-
/**
|
|
6062
|
-
* A function that fetches a tile from the given URL and options.
|
|
6063
|
-
* @param coord - The tile coordinate to load.
|
|
6064
|
-
* @param url - The tile URL to load.
|
|
6065
|
-
* @param options - The tile request options.
|
|
6066
|
-
* @returns A promise that resolves with the response.
|
|
6067
|
-
*/
|
|
6068
|
-
export declare type TileFetcher = (coord: TileCoord, url: string, options: Partial<TileRequestOptions>) => Promise<Response>;
|
|
6069
|
-
|
|
6308
|
+
|
|
6070
6309
|
export declare interface TileInfo {
|
|
6071
6310
|
x: number;
|
|
6072
6311
|
y: number;
|
|
@@ -6074,7 +6313,7 @@ export declare interface TileInfo {
|
|
|
6074
6313
|
}
|
|
6075
6314
|
|
|
6076
6315
|
export declare type TileQuadrant = 'tl' | 'tc' | 'tr' | 'ml' | 'mc' | 'mr' | 'bl' | 'bc' | 'br';
|
|
6077
|
-
|
|
6316
|
+
|
|
6078
6317
|
/**
|
|
6079
6318
|
* Options for a tile request.
|
|
6080
6319
|
*/
|
|
@@ -6121,16 +6360,6 @@ export declare type TileRequestOptions = {
|
|
|
6121
6360
|
intervals: Array<Date>;
|
|
6122
6361
|
};
|
|
6123
6362
|
|
|
6124
|
-
/**
|
|
6125
|
-
* A response from a tile request.
|
|
6126
|
-
* @property data The response data.
|
|
6127
|
-
* @property headers The response headers.
|
|
6128
|
-
*/
|
|
6129
|
-
export declare type TileResponse = {
|
|
6130
|
-
data: any;
|
|
6131
|
-
headers: any;
|
|
6132
|
-
};
|
|
6133
|
-
|
|
6134
6363
|
/**
|
|
6135
6364
|
* `TileSource` is an abstract class that provides the primary implementation of a tile-based data source object that
|
|
6136
6365
|
* loads tiles from a remote source. This class is not intended to be used directly, but rather extended by a concrete
|
|
@@ -6174,20 +6403,14 @@ declare abstract class TileSource<Data = any, Source extends TileSourceSpecifica
|
|
|
6174
6403
|
width: number;
|
|
6175
6404
|
height: number;
|
|
6176
6405
|
};
|
|
6177
|
-
|
|
6178
|
-
/**
|
|
6406
|
+
|
|
6407
|
+
/**
|
|
6179
6408
|
* Returns the coordinate bounds for the source if provided by the source configuration.
|
|
6180
6409
|
* When defined, data and/or tiles will not be requested outside of these bounds. This is useful for limiting the
|
|
6181
6410
|
* amount of data requested from a source when the data is only needed for a specific region.
|
|
6182
6411
|
* @readonly
|
|
6183
6412
|
*/
|
|
6184
6413
|
get bounds(): CoordinateBounds;
|
|
6185
|
-
get isReady(): boolean;
|
|
6186
|
-
/**
|
|
6187
|
-
* Returns whether or not the source is currently loading tiles.
|
|
6188
|
-
* @readonly
|
|
6189
|
-
*/
|
|
6190
|
-
get isLoading(): boolean;
|
|
6191
6414
|
|
|
6192
6415
|
constructor(id: string, spec: Partial<Source>);
|
|
6193
6416
|
/**
|
|
@@ -6216,13 +6439,13 @@ constructor(id: string, spec: Partial<Source>);
|
|
|
6216
6439
|
*/
|
|
6217
6440
|
hasTile(coord: TileCoord, layerId?: string): boolean;
|
|
6218
6441
|
/**
|
|
6219
|
-
*
|
|
6220
|
-
* this method will return `false` even if the tile has data.
|
|
6442
|
+
* Checks if tile data exists for the given coordinate.
|
|
6221
6443
|
* @param coord - The tile coordinate.
|
|
6222
|
-
* @param layerId -
|
|
6223
|
-
* @
|
|
6444
|
+
* @param layerId - Optional layer ID for per-layer data (unused but retained for API compatibility).
|
|
6445
|
+
* @param allowExpired - If true, allows expired tiles to be considered as having data.
|
|
6446
|
+
* @returns Whether tile data exists (optionally including expired/stale).
|
|
6224
6447
|
*/
|
|
6225
|
-
hasTileData(coord: TileCoord, layerId?: string): boolean;
|
|
6448
|
+
hasTileData(coord: TileCoord, layerId?: string, allowExpired?: boolean): boolean;
|
|
6226
6449
|
/**
|
|
6227
6450
|
* Returns the data for the given tile coordinate.
|
|
6228
6451
|
* @param coord - The tile coordinate.
|
|
@@ -6247,7 +6470,7 @@ constructor(id: string, spec: Partial<Source>);
|
|
|
6247
6470
|
* @param options - Additional options to use when requesting the tile.
|
|
6248
6471
|
* @returns A promise that resolves with the tile data.
|
|
6249
6472
|
*/
|
|
6250
|
-
requestTile(coord: TileCoord, options?: Partial<TileRequestOptions>): Promise<Data>;
|
|
6473
|
+
requestTile(coord: TileCoord, options?: Partial<TileRequestOptions>): Promise<Data | null>;
|
|
6251
6474
|
/**
|
|
6252
6475
|
* Returns a tile instance for the given tile coordinate. If the tile does not exist, it will be created and added
|
|
6253
6476
|
* to the cache.
|
|
@@ -6255,7 +6478,10 @@ constructor(id: string, spec: Partial<Source>);
|
|
|
6255
6478
|
* @returns The tile instance.
|
|
6256
6479
|
*/
|
|
6257
6480
|
protected getOrCreateTile(coord: TileCoord): Tile<Data>;
|
|
6258
|
-
protected loadTile(tile: Tile<Data>, options?: Partial<TileRequestOptions>): Promise<
|
|
6481
|
+
protected loadTile(tile: Tile<Data>, options?: Partial<TileRequestOptions>): Promise<{
|
|
6482
|
+
data: Blob;
|
|
6483
|
+
headers: Headers;
|
|
6484
|
+
}>;
|
|
6259
6485
|
getMetadata(options?: Partial<UrlRequestOptions>): Promise<unknown>;
|
|
6260
6486
|
removeConsumer(consumer: DataSourceConsumer): void;
|
|
6261
6487
|
/**
|
|
@@ -6458,6 +6684,7 @@ export declare class TimeAnimation extends Animation {
|
|
|
6458
6684
|
clampDateRange(min: Date, max: Date): void;
|
|
6459
6685
|
protected eventPayload(): Record<string, any>;
|
|
6460
6686
|
protected advanceToStopPosition(): void;
|
|
6687
|
+
private _debouncedRangeChangeEvent;
|
|
6461
6688
|
}
|
|
6462
6689
|
|
|
6463
6690
|
export declare type TimeAnimationInfo = {
|
|
@@ -6636,6 +6863,11 @@ export declare type TimeSeriesOperation = {
|
|
|
6636
6863
|
* Bands to restrict the operation to. If not specified, the operation will be applied to all bands.
|
|
6637
6864
|
*/
|
|
6638
6865
|
bands?: Array<ColorBand>;
|
|
6866
|
+
/**
|
|
6867
|
+
* The data range to remap the data to. If not specified, the data range will not be remapped and use provided data
|
|
6868
|
+
* range or the range based on the datasets being used by the operation.
|
|
6869
|
+
*/
|
|
6870
|
+
remappedDataRange?: ValueRange;
|
|
6639
6871
|
};
|
|
6640
6872
|
|
|
6641
6873
|
/**
|
|
@@ -6942,19 +7174,19 @@ export declare class VectorTileSource extends TileSource<VectorData, VectorSourc
|
|
|
6942
7174
|
|
|
6943
7175
|
constructor(id: string, spec: Partial<VectorSourceSpecification>);
|
|
6944
7176
|
hasTile(coord: TileCoord, layerId?: string): boolean;
|
|
6945
|
-
hasTileData(coord: TileCoord, layerId?: string): boolean;
|
|
7177
|
+
hasTileData(coord: TileCoord, layerId?: string, allowExpired?: boolean): boolean;
|
|
6946
7178
|
expireAllTiles(): void;
|
|
6947
7179
|
expireTile(tile: Tile<VectorData>): void;
|
|
6948
7180
|
/**
|
|
6949
7181
|
* Refreshes the data for all tiles in the source.
|
|
6950
7182
|
*/
|
|
6951
|
-
refreshAllTileData(): void;
|
|
7183
|
+
refreshAllTileData(layerId?: string): void;
|
|
6952
7184
|
/**
|
|
6953
7185
|
* Refreshes the data for a single tile in the source by re-parsing the existing data. This is useful when the
|
|
6954
7186
|
* filter expression has changed for a consuming layer.
|
|
6955
7187
|
* @param tile - The tile to refresh.
|
|
6956
7188
|
*/
|
|
6957
|
-
refreshTileData(tile: Tile<VectorData
|
|
7189
|
+
refreshTileData(tile: Tile<VectorData>, layerId?: string): Promise<void>;
|
|
6958
7190
|
|
|
6959
7191
|
}
|
|
6960
7192
|
|
|
@@ -7009,7 +7241,7 @@ export declare interface WeatherLayerConfiguration extends Identifiable {
|
|
|
7009
7241
|
/**
|
|
7010
7242
|
* The layer mask configuration to use when rendering the the layer, if any.
|
|
7011
7243
|
*/
|
|
7012
|
-
mask?:
|
|
7244
|
+
mask?: LayerMaskConfiguration;
|
|
7013
7245
|
/**
|
|
7014
7246
|
* The operation to perform on the data within the time series. Defaults to `none`.
|
|
7015
7247
|
*/
|
|
@@ -7071,6 +7303,14 @@ export declare type WeatherLayerOptions = {
|
|
|
7071
7303
|
* The render style to use for rendering the layer's data.
|
|
7072
7304
|
*/
|
|
7073
7305
|
type: LayerType;
|
|
7306
|
+
/**
|
|
7307
|
+
* The minimum zoom level for the layer.
|
|
7308
|
+
*/
|
|
7309
|
+
minZoom?: number;
|
|
7310
|
+
/**
|
|
7311
|
+
* The maximum zoom level for the layer.
|
|
7312
|
+
*/
|
|
7313
|
+
maxZoom?: number;
|
|
7074
7314
|
/**
|
|
7075
7315
|
* Whether the layer should be hidden by default. Default is `false`.
|
|
7076
7316
|
*/
|
|
@@ -7147,24 +7387,7 @@ export declare type WeatherLayerOptions = {
|
|
|
7147
7387
|
/**
|
|
7148
7388
|
* Options for configuring a mask to apply to the layer.
|
|
7149
7389
|
*/
|
|
7150
|
-
mask:
|
|
7151
|
-
/**
|
|
7152
|
-
* The unique identifier for the mask layer. If not provided, then the value of `layerId` will be used.
|
|
7153
|
-
*/
|
|
7154
|
-
id?: string;
|
|
7155
|
-
/**
|
|
7156
|
-
* Layer identifier of the layer to use for masking this layer's output.
|
|
7157
|
-
*/
|
|
7158
|
-
layerId: string;
|
|
7159
|
-
/**
|
|
7160
|
-
* Whether to invert the mask, meaning the layer will be visible outside of the mask area.
|
|
7161
|
-
*/
|
|
7162
|
-
invert?: boolean;
|
|
7163
|
-
/**
|
|
7164
|
-
* Additional configuration overrides for the mask layer.
|
|
7165
|
-
*/
|
|
7166
|
-
overrides?: Record<string, any>;
|
|
7167
|
-
};
|
|
7390
|
+
mask: LayerMaskConfiguration;
|
|
7168
7391
|
childLayers?: {
|
|
7169
7392
|
[id: string]: Partial<WeatherLayerOptions>;
|
|
7170
7393
|
};
|
|
@@ -7190,6 +7413,12 @@ constructor(account: Account);
|
|
|
7190
7413
|
* Returns the metadata for all available weather layers.
|
|
7191
7414
|
*/
|
|
7192
7415
|
getLayerMetadata(): Promise<Array<WeatherLayerMetadata>>;
|
|
7416
|
+
/**
|
|
7417
|
+
* Returns a weather layer configuration for the specified Xweather Raster Maps layer code.
|
|
7418
|
+
* @param code - The raster layer code to get the configuration for.
|
|
7419
|
+
* @returns The weather layer configuration.
|
|
7420
|
+
*/
|
|
7421
|
+
getRasterLayerConfig(code: string): WeatherLayerConfiguration;
|
|
7193
7422
|
/**
|
|
7194
7423
|
* Returns the weather layer configuration for the specified weather code. If the code represents a combined layer,
|
|
7195
7424
|
* then an array of weather codes will be returned instead.
|
|
@@ -7223,6 +7452,14 @@ declare abstract class WebGLLayer<Source extends DataSource = DataSource> extend
|
|
|
7223
7452
|
* The type of layer.
|
|
7224
7453
|
*/
|
|
7225
7454
|
type: LayerType;
|
|
7455
|
+
/**
|
|
7456
|
+
* The minimum zoom level for the layer.
|
|
7457
|
+
*/
|
|
7458
|
+
minZoom: number;
|
|
7459
|
+
/**
|
|
7460
|
+
* The maximum zoom level for the layer.
|
|
7461
|
+
*/
|
|
7462
|
+
maxZoom: number;
|
|
7226
7463
|
/**
|
|
7227
7464
|
* The map controller that this layer is associated with.
|
|
7228
7465
|
*/
|