@metoceanapi/wxtiles-leaflet 2.4.0-1 → 2.4.1-3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/README.md +214 -92
  3. package/dist/es/index.d.ts +12 -16
  4. package/dist/es/index.js +4 -4
  5. package/dist/es/wxAPI/WxAPI.d.ts +17 -0
  6. package/dist/es/wxAPI/WxDataSetManager.d.ts +14 -4
  7. package/dist/es/wxsource/wxsource.d.ts +24 -20
  8. package/dist/es/wxsource/wxsourcetypes.d.ts +22 -10
  9. package/dist/web/index.js +4 -4
  10. package/docs/docs/assets/highlight.css +12 -19
  11. package/docs/docs/assets/search.js +1 -1
  12. package/docs/docs/classes/WxAPI.html +31 -18
  13. package/docs/docs/classes/WxAPIControl.html +70 -24
  14. package/docs/docs/classes/WxDataSetManager.html +22 -21
  15. package/docs/docs/classes/WxInfoControl.html +37 -10
  16. package/docs/docs/classes/WxLegendControl.html +33 -11
  17. package/docs/docs/classes/WxStyleEditorControl.html +206 -94
  18. package/docs/docs/classes/WxTileSource.html +40 -40
  19. package/docs/docs/classes/WxTimeControl.html +58 -20
  20. package/docs/docs/index.html +188 -101
  21. package/docs/docs/interfaces/FrameworkOptions.html +3 -3
  22. package/docs/docs/interfaces/WxSourceLayerOptions.html +5 -5
  23. package/docs/docs/modules.html +12 -130
  24. package/docs/docs/types/Loader.html +3 -59
  25. package/docs/docs/types/Painter.html +3 -59
  26. package/docs/docs/types/WxLayer.html +3 -59
  27. package/docs/docs/variables/WxLayerBaseImplementation.html +3 -59
  28. package/docs/script/script.css +1 -1
  29. package/docs/script/script.js +6 -6
  30. package/package.json +3 -3
  31. package/src_example/frwrkdeps.ts +131 -80
  32. package/src_example/index.ts +2 -53
  33. package/src_example/start.ts +143 -300
  34. package/dep.dot +0 -33
  35. package/dep.svg +0 -233
  36. package/docs/docs/classes/DataIntegral.html +0 -154
  37. package/docs/docs/classes/QTree.html +0 -185
  38. package/docs/docs/classes/RawCLUT.html +0 -143
  39. package/docs/docs/classes/TilesCache.html +0 -108
  40. package/docs/docs/enums/TileType.html +0 -80
  41. package/docs/docs/functions/WXLOG.html +0 -127
  42. package/docs/docs/functions/WxCreateLegend.html +0 -135
  43. package/docs/docs/functions/WxGetColorSchemes.html +0 -122
  44. package/docs/docs/functions/WxGetColorStyles.html +0 -122
  45. package/docs/docs/functions/WxTilesLogging.html +0 -130
  46. package/docs/docs/interfaces/CachedUriLoaderPromiseFunc.html +0 -108
  47. package/docs/docs/interfaces/ColorStylesIncomplete.html +0 -125
  48. package/docs/docs/interfaces/Converter.html +0 -81
  49. package/docs/docs/interfaces/DataPicture.html +0 -95
  50. package/docs/docs/interfaces/IntegralPare.html +0 -81
  51. package/docs/docs/interfaces/SLinePoint.html +0 -77
  52. package/docs/docs/interfaces/Tree.html +0 -74
  53. package/docs/docs/interfaces/WxAPIOptions.html +0 -173
  54. package/docs/docs/interfaces/WxAllBoundariesMeta.html +0 -90
  55. package/docs/docs/interfaces/WxAllDatasetsShortMetas.html +0 -125
  56. package/docs/docs/interfaces/WxBoundaryMeta.html +0 -99
  57. package/docs/docs/interfaces/WxColorSchemes.html +0 -126
  58. package/docs/docs/interfaces/WxColorStyleStrict.html +0 -359
  59. package/docs/docs/interfaces/WxColorStyleWeak.html +0 -388
  60. package/docs/docs/interfaces/WxColorStylesStrict.html +0 -74
  61. package/docs/docs/interfaces/WxColorStylesWeakMixed.html +0 -125
  62. package/docs/docs/interfaces/WxData.html +0 -85
  63. package/docs/docs/interfaces/WxDataSetManagerOptions.html +0 -117
  64. package/docs/docs/interfaces/WxDatasetMeta.html +0 -144
  65. package/docs/docs/interfaces/WxDatasetShortMeta.html +0 -91
  66. package/docs/docs/interfaces/WxLayerAPI.html +0 -375
  67. package/docs/docs/interfaces/WxLayerBaseAPI.html +0 -242
  68. package/docs/docs/interfaces/WxLayerOptions.html +0 -113
  69. package/docs/docs/interfaces/WxLegend.html +0 -118
  70. package/docs/docs/interfaces/WxLngLat.html +0 -81
  71. package/docs/docs/interfaces/WxRasterData.html +0 -118
  72. package/docs/docs/interfaces/WxRequestInit.html +0 -70
  73. package/docs/docs/interfaces/WxTick.html +0 -100
  74. package/docs/docs/interfaces/WxTileInfo.html +0 -142
  75. package/docs/docs/interfaces/WxUnits.html +0 -125
  76. package/docs/docs/interfaces/WxVariableMeta.html +0 -109
  77. package/docs/docs/interfaces/WxVariablesMetas.html +0 -125
  78. package/docs/docs/interfaces/XYZ.html +0 -84
  79. package/docs/docs/types/DataIntegrals.html +0 -118
  80. package/docs/docs/types/DataPictures.html +0 -118
  81. package/docs/docs/types/ListenerMethod.html +0 -134
  82. package/docs/docs/types/SLine.html +0 -118
  83. package/docs/docs/types/SubTrees.html +0 -118
  84. package/docs/docs/types/SubTreesN.html +0 -118
  85. package/docs/docs/types/TreeN.html +0 -118
  86. package/docs/docs/types/WxDate.html +0 -125
  87. package/docs/docs/types/WxEventType.html +0 -121
  88. package/docs/docs/types/WxInstances.html +0 -118
  89. package/docs/docs/types/WxLayerVarsNames.html +0 -118
  90. package/docs/docs/types/WxURIs.html +0 -118
  91. package/docs/docs/types/WxUnitTuple.html +0 -118
package/CHANGELOG.md CHANGED
@@ -9,6 +9,10 @@ Write your changes below this section. `npm version [major|minor|patch]` will au
9
9
 
10
10
  ## [Unreleased]
11
11
 
12
+ ## [2.4.1-3] - 2025-09-18
13
+
14
+ ## [2.4.1-2] - 2025-09-16
15
+
12
16
  ## [2.4.0-1] - 2025-02-03
13
17
 
14
18
  ## [2.3.0-0] - 2024-06-13
package/README.md CHANGED
@@ -1,63 +1,58 @@
1
1
  # wxtiles
2
2
 
3
3
  This is a project for weather data visualization.
4
- There are three main parts of the project:
4
+ There are two main parts of the project:
5
5
 
6
- 1. [Splitter](https://github.com/metocean/wxtile-splitter) - a service that splits the datasets into tiles (PNG) and some metadata (JSON) served by a fileserver backend aka NGINX.
7
- 2. [WxTiles-mbox source code](https://github.com/metoceanapi/wxtiles-mbox), npm [@metoceanapi/wxtiles-mbox](https://www.npmjs.com/package/@metoceanapi/wxtiles-mbox) - a JS API providing work with metadata, dataset manager and an implementation of a Custom MapBox-gl-gs Layer for visualizing the tiles using [Mapbox-gl-gs](https://www.mapbox.com/).
8
- 3. [WxTiles-leaflet source code](https://github.com/metoceanapi/wxtiles-leaflet), npm [@metoceanapi/wxtiles-leaflet](https://www.npmjs.com/package/@metoceanapi/wxtiles-leaflet) - a JS API providing work with metadata, dataset manager and an implementation of a Custom Leaflet Layer for visualizing the tiles using [Leaflet](https://leafletjs.com/).
6
+ 1. [Splitter](https://github.com/metocean/wxtile-splitter) - a service that splits the datasets into tiles (PNG) and some metadata (JSON) served by a fileserver backend.
7
+ 2. [@metoceanapi/wxtiles-leaflet](https://www.npmjs.com/package/@metoceanapi/wxtiles-leaflet) - a JS API providing work with metadata, dataset manager and an implementation of a Custom Leaflet Layer for visualizing the tiles using [Leaflet](https://leafletjs.com/).
9
8
 
10
9
  ## API
11
10
 
12
- APIs for Leaflet and Mapbox-gl-gs are similar in many ways. The difference is in framework-specific implementations of the Custom Source/Layer.
13
-
14
- Usage and API documentation is mainly equal for both frameworks.
11
+ The API for Leaflet is designed for working with weather data tiles and allows the integration of custom layers for data visualization.
15
12
 
16
13
  ## DOCS
17
14
 
18
- - Mapbox-gl: https://metoceanapi.github.io/wxtiles-mbox/docs/
19
- - Leaflet: https://metoceanapi.github.io/wxtiles-leaflet/docs/
15
+ - [Leaflet](https://metoceanapi.github.io/wxtiles-leaflet/docs/)
20
16
 
21
17
  ## Examples
22
18
 
23
- 1. [SimpleDemo](https://metoceanapi.github.io/wxtiles-leaflet/examples/simpleDemo.html).
19
+ 1. [SimpleDemo](https://metoceanapi.github.io/wxtiles-leaflet/examples/simpleDemo.html)
24
20
  2. [Animated blur parameter](https://metoceanapi.github.io/wxtiles-leaflet/examples/seaMaskAndAnimatedBlur.html)
25
21
  3. [Mouse Interaction](https://metoceanapi.github.io/wxtiles-leaflet/examples/interactive.html)
26
22
 
27
23
  ### Leaflet
28
24
 
29
25
  ```ts
30
- import 'leaflet/dist/leaflet.css';
31
- import L from 'leaflet';start();
32
-
33
- /*
34
- start();
35
-
36
- /*
37
-
38
- import { WxAPI } from '@metoceanapi/wxtiles-leaflet';
39
-
40
- async func(){
41
- // Get the API ready - should be ONE per application
42
- // requestInit is used in every request to the server. Add your keys, credentials, mode, etc.
43
- const wxapi = new WxAPI({ dataServerURL: 'https://tiles.metoceanapi.com/data/',
44
- requestInit: { /* headers: new Headers([['x-api-key', 'key']]), */ } });
45
-
46
- // Create a dataset manager (may be used for many variables-layers from this dataset)
47
- const wxdatasetManager = await wxapi.createDatasetManager('gfs.global');
48
-
49
- // Automatically gets a proper set of variable(s) from the dataset and composes northward or eastward components if needed
50
- const variables = wxdatasetManager.checkCombineVariableIfVector('air.temperature.at-2m'); // 'wind.speed.eastward.at-10m' - Vector example
51
-
52
- // create a layer
53
- const leafletOptions: L.GridLayerOptions = { opacity: 1, attribution: 'WxTiles' };
54
- const wxsource = new WxTileSource({ wxdatasetManager, variables }, leafletOptions);
55
-
56
- // add the layer to the map
57
- const map = L.map('map', { center: [0, 0], zoom: 2, zoomControl: true });
58
- map.addLayer(wxsource);
59
- await new Promise((done) => wxsource.once('load', done)); // highly recommended to await for the first load
60
- }()
26
+ import "leaflet/dist/leaflet.css";
27
+ import L from "leaflet";
28
+
29
+ async function start() {
30
+ const wxapi = new WxAPI({
31
+ dataServerURL: "https://tiles.metoceanapi.com/data/",
32
+ requestInit: {
33
+ headers: new Headers({'x-api-key': 'your_key_here'}),
34
+ },
35
+ });
36
+
37
+ const wxdatasetManager = await wxapi.createDatasetManager("gfs.global");
38
+ const variable = "air.temperature.at-2m";
39
+ // 'wind.speed.eastward.at-10m' - Vector example
40
+
41
+ const leafletOptions = {
42
+ opacity: 1,
43
+ attribution: "WxTiles",
44
+ };
45
+
46
+ // Create a layer
47
+ const wxsource = wxdatasetManager.createSourceLayer(
48
+ { variable },
49
+ leafletOptions
50
+ );
51
+
52
+ const map = L.map("map", { center: [0, 0], zoom: 2, zoomControl: true });
53
+ map.addLayer(wxsource);
54
+ await new Promise((done) => wxsource.once("load", done)); // Highly recommended to await the first load
55
+ }
61
56
  ```
62
57
 
63
58
  ### Change the time step
@@ -69,7 +64,7 @@ await wxsource.setTimeStep(1); // 1 - index of the time step in the dataset
69
64
  or
70
65
 
71
66
  ```ts
72
- await wxsource.setTimeStep('2020-01-01T00:00:00Z'); // '2020-01-01T00:00:00Z' - time step in the dataset
67
+ await wxsource.setTimeStep("2020-01-01T00:00:00Z"); // '2020-01-01T00:00:00Z' - time step in the dataset
73
68
  ```
74
69
 
75
70
  or
@@ -81,95 +76,222 @@ await wxsource.setTimeStep(2345323454); // time in seconds since 1970-01-01T00:
81
76
  or
82
77
 
83
78
  ```ts
84
- await wxsource.setTimeStep(new Date('2020-01-01T00:00:00Z')); // Date object
79
+ await wxsource.setTimeStep(new Date("2020-01-01T00:00:00Z")); // Date object
85
80
  ```
86
81
 
87
- ### Update the style
82
+ ### Update the Style
88
83
 
89
84
  ```ts
90
- await wxsource.updateCurrentStyleObject({ units: 'm/s', levels: undefined }); // set levels to undefined - to automatically calculate the levels from the dataset
85
+ await wxsource.updateCurrentStyleObject({ units: "m/s", levels: undefined }); // set levels to undefined - to automatically calculate the levels from the dataset
91
86
  ```
92
87
 
93
- ### Preload the time steps
88
+ ### Preload the Time Steps
94
89
 
95
90
  ```ts
96
- // load the time step 10 to the cache but do not not render it
97
- const prom = wxsource.preloadTime(10);
98
- // do stuff asyncronously
91
+ const prom = wxsource.preloadTime(10); // Load the time step 10 to the cache but do not render it
92
+ // Do stuff asynchronously
99
93
  // ...
100
- await prom; // wait for the time step to finish loading
101
- // now set the time step to 10
102
- await wxsource.setTime(10); // will be fast rendered from the cache
94
+ await prom; // Wait for the time step to finish loading
95
+ await wxsource.setTime(10); // Now set the time step to 10; it will render quickly from the cache
103
96
  ```
104
97
 
105
- ### Abort loading
98
+ ### Abort Loading
106
99
 
107
100
  ```ts
108
101
  const abortController = new AbortController();
109
- console.log('setTime(5)');
102
+ console.log("setTime(5)");
110
103
  const prom = wxsource.setTime(5, abortController);
111
- abortController.abort(); // aborts the request
112
- await prom; // await always !! even if aborted
113
- console.log('aborted');
104
+ abortController.abort(); // Aborts the request
105
+ await prom; // Always await, even if aborted
106
+ console.log("aborted");
114
107
  ```
115
108
 
116
- ### Get the current time step
109
+ ### Get the Current Time Step
117
110
 
118
111
  ```ts
119
112
  const timeStep = wxsource.getTime();
120
113
  ```
121
114
 
122
- ### read lon lat data
115
+ ### Read Lon/Lat Data
123
116
 
124
117
  ```ts
125
- map.on('mousemove', (e) => {
126
- if (!wxsource) return;
127
- const pos = position(e); //
128
- const tileInfo: WxTileInfo | undefined = wxsource.getLayerInfoAtLatLon(pos.wrap(), map);
129
- if (tileInfo) {
130
- console.log(tileInfo);
131
- }
118
+ map.on("mousemove", (e) => {
119
+ if (!wxsource) return;
120
+ const pos = position(e);
121
+ const tileInfo: WxTileInfo | undefined = wxsource.getLayerInfoAtLatLon(
122
+ pos.wrap(),
123
+ map
124
+ );
125
+ if (tileInfo) {
126
+ console.log(tileInfo);
127
+ }
132
128
  });
133
129
  ```
134
130
 
135
- ### animated blur effect
131
+ ### Animated Blur Effect
136
132
 
137
133
  ```ts
138
134
  (async function step(n: number = 0) {
139
- await wxsource.updateCurrentStyleObject({ isolineText: false, blurRadius: ~~(10 * Math.sin(n / 500) + 10) }); // await always !!
140
- requestAnimationFrame(step);
135
+ await wxsource.updateCurrentStyleObject({
136
+ isolineText: false,
137
+ blurRadius: ~~(10 * Math.sin(n / 500) + 10),
138
+ });
139
+ requestAnimationFrame(step);
141
140
  })();
142
141
  ```
143
142
 
144
- ### more interactive - additional level and a bit of the red transparentness around the level made from current mouse position
143
+ ### More Interactive – Additional Level and Red Transparency around the Level Based on Current Mouse Position
145
144
 
146
145
  ```ts
147
- await wxsource.updateCurrentStyleObject({ levels: undefined }); // reset levels if existed in the style
148
- const levels = wxsource.getCurrentStyleObjectCopy().levels || []; // get current/default/any levels
149
- // generate a new color map from the levels
150
- const colMap: [number, string][] = levels.map((level) => [level, '#' + Math.random().toString(16).slice(2, 8) + 'ff']);
146
+ await wxsource.updateCurrentStyleObject({ levels: undefined }); // Reset levels if they exist in the style
147
+ const levels = wxsource.getCurrentStyleObjectCopy().levels || [];
148
+ const colMap: [number, string][] = levels.map((level) => [
149
+ level,
150
+ "#" + Math.random().toString(16).slice(2, 8) + "ff",
151
+ ]);
152
+
151
153
  let busy = false;
152
- map.on('mousemove', async (e) => {
153
- if (!wxsource || busy) return;
154
- busy = true;
155
- const tileInfo: WxTileInfo | undefined = wxsource.getLayerInfoAtLatLon(position(e), map);
156
- if (tileInfo) {
157
- await wxsource.updateCurrentStyleObject({ colorMap: [...colMap, [tileInfo.inStyleUnits[0], '#ff000000']] });
158
- onsole.log(tileInfo);
159
- }
160
- busy = false;
154
+ map.on("mousemove", async (e) => {
155
+ if (!wxsource || busy) return;
156
+ busy = true;
157
+ const tileInfo: WxTileInfo | undefined = wxsource.getLayerInfoAtLatLon(
158
+ position(e),
159
+ map
160
+ );
161
+ if (tileInfo) {
162
+ await wxsource.updateCurrentStyleObject({
163
+ colorMap: [...colMap, [tileInfo.inStyleUnits[0], "#ff000000"]],
164
+ });
165
+ console.log(tileInfo);
166
+ }
167
+ busy = false;
161
168
  });
162
169
  ```
163
170
 
164
- ## Run Locally
171
+ ### Legend Usage
165
172
 
166
- [biome](https://biomejs.dev/guides/getting-started/) is used for linting and formatting with [Husky](https://typicode.github.io/husky/) and [git-format-staged](https://github.com/hallettj/git-format-staged).
173
+ The `WxCreateLegend` function is used to generate a color legend for weather map visualizations. This legend helps represent weather data with corresponding colors, making it easier to interpret the map.
174
+ Pass the `legendSize` and `style` to the `WxCreateLegend` function to generate the legend. The function returns a `WxLegend` object containing:
167
175
 
168
- 1. Initialize husky
169
- ```bash
170
- npx husky init
171
- ```
172
- 2. Add `pre-commit` hook using husky
173
- ```bash
174
- echo "git-format-staged --formatter 'biome check --write --staged --files-ignore-unknown=true --no-errors-on-unmatched \"{}\"' ." > .husky/pre-commit
176
+ - `size`: The number of color steps.
177
+ - `colors`: A `Uint32Array` of color values.
178
+ - `ticks`: An array of `WxTick` objects representing data points and their corresponding colors.
179
+ - `units`: The units of the data.
180
+ - `showBelowMin` / `showAboveMax`: Whether values outside the range are shown.
181
+
182
+ #### Example: Temperature Legend
183
+
184
+ Here’s an example of creating a temperature legend:
185
+
186
+ ```typescript
187
+ const style: WxColorStyleStrict = {
188
+ colorMap: [
189
+ [0, "#0000FF"], // blue at 0°C
190
+ [15, "#00FF00"], // green at 15°C
191
+ [30, "#FF0000"], // red at 30°C
192
+ ],
193
+ showBelowMin: true,
194
+ showAboveMax: true,
195
+ units: "°C",
196
+ fill: "gradient",
197
+ };
198
+
199
+ const legend = WxCreateLegend(100, style);
200
+ console.log(legend);
175
201
  ```
202
+
203
+ This creates legend with:
204
+
205
+ - 100 color steps interpolating between blue, green, and red.
206
+ - Ticks at 0°C, 15°C, and 30°C.
207
+ - Support for values below 0°C and above 30°C.
208
+
209
+ ### Color Style
210
+
211
+ The `WxColorStyleStrict` interface defines the configuration for styling visualizations. It includes properties for controlling colors, gradients, isolines, vectors, streamlines, and more. Below is a detailed explanation of each property.
212
+
213
+ #### Properties
214
+
215
+ ##### Basic Properties
216
+
217
+ - **`name`**: The name of the style.
218
+ - **`parent`**: The name of a parent style to inherit properties from (optional).
219
+
220
+ ##### Tile Filling
221
+
222
+ - **`fill`**: Defines how tiles are filled:
223
+ - `"none"`: No fill, leaves the tile transparent.
224
+ - `"solid"`: Solid fill, no gradient between levels.
225
+ - `"gradient"`: Gradient fill between levels.
226
+
227
+ ##### Isolines
228
+
229
+ - **`isolineColor`**: Defines the color of isolines:
230
+ - `"none"`: Do not render isolines.
231
+ - `"fill"`: Use the value of `fill` for each pixel.
232
+ - `"inverted"`: Use the inverted value of `fill` for each pixel.
233
+ - `#RGB`, `#RRGGBB`, or `#RRGGBBAA`: Use a specific web color.
234
+ - **`isolineText`**: If `true`, render text values on isolines.
235
+ - **`isolineTextSizeEm`**: Font size of isoline text values in `em` units.
236
+ - **`isolineTextBackground`**: If `true`, render a solid background behind isoline text values.
237
+
238
+ ##### Vectors (Wind/Current Fields)
239
+
240
+ - **`vectorType`**: Defines how vectors are represented:
241
+ - `"none"`: Do not render vectors.
242
+ - `"arrows"`: Use arrows to represent winds/currents.
243
+ - `"barbs"`: Use barbs to represent winds/currents.
244
+ - **`vectorColor`**: Defines the color of vectors:
245
+ - `"none"`: Do not render vectors.
246
+ - `"fill"`: Use the value of `fill` for each pixel.
247
+ - `"inverted"`: Use the inverted value of `fill` for each pixel.
248
+ - `#RGB`, `#RRGGBB`, or `#RRGGBBAA`: Use a specific web color.
249
+ - **`vectorFactor`**: Scaling factor for vector length.
250
+
251
+ ##### Streamlines
252
+
253
+ - **`streamLineColor`**: Defines the color of streamlines:
254
+ - `"none"`: Do not render streamlines.
255
+ - `"fill"`: Use the value of `fill` for each pixel.
256
+ - `"inverted"`: Use the inverted value of `fill` for each pixel.
257
+ - `#RGB`, `#RRGGBB`, or `#RRGGBBAA`: Use a specific web color.
258
+ - **`streamLineSpeedFactor`**: Scaling factor for streamline length.
259
+ - **`streamLineGridStep`**: Step to seed streamlines. Smaller values create more streamlines.
260
+ - **`streamLineSteps`**: Number of steps in each streamline.
261
+ - **`streamLineStatic`**: If `true`, render streamlines as static lines. If `false`, render as animated lines.
262
+
263
+ ##### Color Configuration
264
+
265
+ - **`showBelowMin`**: If `true`, fill values below the minimum range.
266
+ - **`showAboveMax`**: If `true`, fill values above the maximum range.
267
+ - **`colorScheme`**: Name of the color scheme from the default set.
268
+ - **`colors`**: Custom array of colors to use for interpolation (optional).
269
+ - **`colorMap`**: Array of `[level, color]` tuples to map specific data values to colors (optional).
270
+ - **`levels`**: Array of levels to build the legend. If not provided, 10 levels are calculated evenly based on the data.
271
+
272
+ ##### Additional Styling
273
+
274
+ - **`blurRadius`**: Radius for the BOX filter (used for blurring).
275
+ - **`addDegrees`**: Additional rotation of wind or current vectors by a specified angle in degrees.
276
+ - **`units`**: Units of the style (e.g., `°C` for temperature).
277
+ - **`extraUnits`**: Additional units to extend the default set (optional).
278
+
279
+ ##### Masking
280
+
281
+ - **`mask`**: Defines masking behavior:
282
+ - `"none"`: No masking.
283
+ - `"sea"`: Make sea areas transparent.
284
+ - `"land"`: Make land areas transparent.
285
+
286
+ ##### WebGL Configuration (Optional)
287
+
288
+ - **`gl`**: Configuration for WebGL rendering:
289
+ - `animationSpeed`: Speed of animations.
290
+ - `noiseTexturePow`: Power of noise texture.
291
+ - `vectorFieldFactor`: Scaling factor for vector fields.
292
+ - `animationIntensity`: Intensity of animations.
293
+ - `wavesCount`: Number of waves to render.
294
+
295
+ ##### Default styles
296
+
297
+ Default styles can be found [here](https://github.com/metoceanapi/wxtiles-common/blob/master/defaults/styles.ts)
@@ -1,35 +1,31 @@
1
1
  /**
2
2
  * Main classes and interfaces to use in your application are:
3
- * - {@link WxAPIOptions} options to pass to the constructor of {@link WxAPI}.
3
+ * - {@link https://www.npmjs.com/package/@metoceanapi/wxtiles-common | @metoceanapi/wxtiles-common/types/WxAPIOptions} options to pass to the constructor of {@link WxAPI}.
4
4
  * - {@link WxAPI} the main class to use to interact with the *WxTiles* API and to create {@link WxDataSetManager} instances
5
- * - {@link WxDataSetManagerOptions} options to pass to the constructor of {@link WxDataSetManager}.
5
+ * - {@link https://www.npmjs.com/package/@metoceanapi/wxtiles-common | @metoceanapi/wxtiles-common/types/WxDataSetManagerOptions} options to pass to the constructor of {@link WxDataSetManager}.
6
6
  * - {@link WxDataSetManager} class for managing WX datasets and create {@link WxTileSource}.
7
7
  * * {@link FrameworkOptions} framework specific options to pass to the constructor of {@link WxTileSource}.
8
- * - {@link WxLayerOptions} options to pass to the constructor of {@link WxTileSource}.
8
+ * - {@link https://www.npmjs.com/package/@metoceanapi/wxtiles-common | @metoceanapi/wxtiles-common/types/WxLayerOptions} options to pass to the constructor of {@link WxTileSource}.
9
9
  * - {@link WxTileSource} class for managing WX tiles sources.
10
- * - {@link WxColorStyleWeak} interface for color styles.
11
- * - {@link WxDate} type for dates.
12
- * - {@link WxDatasetMeta} interface for dataset's metadata.
13
- * - {@link WxVariableMeta} interface for variable's meta data.
14
- * - {@link WxAllBoundariesMeta} interface for boundaries of a dataset.
15
- * - {@link WxTileInfo} interface for tile's information.
10
+ * - {@link https://www.npmjs.com/package/@metoceanapi/wxtiles-common | @metoceanapi/wxtiles-common/utils/WxColorStyleWeak} interface for color styles.
11
+ * - {@link https://www.npmjs.com/package/@metoceanapi/wxtiles-common | @metoceanapi/wxtiles-common/types/WxDate} type for dates.
12
+ * - {@link https://www.npmjs.com/package/@metoceanapi/wxtiles-common | @metoceanapi/wxtiles-common/types/WxDatasetMeta} interface for dataset's metadata.
13
+ * - {@link https://www.npmjs.com/package/@metoceanapi/wxtiles-common | @metoceanapi/wxtiles-common/types/WxVariableMeta} interface for variable's meta data.
14
+ * - {@link https://www.npmjs.com/package/@metoceanapi/wxtiles-common | @metoceanapi/wxtiles-common/types/WxAllBoundariesMeta} interface for boundaries of a dataset.
15
+ * - {@link https://www.npmjs.com/package/@metoceanapi/wxtiles-common | @metoceanapi/wxtiles-common/types/WxTileInfo} interface for tile's information.
16
16
  * ### Note
17
17
  * In case of use **async** member functions, you must use the **await** syntax.
18
18
  * @module
19
19
  */
20
20
  import type { WxDataSetManager } from "./wxAPI/WxDataSetManager";
21
- import { Loader as BaseLoader } from "@metoceanapi/wxtiles-common/wxlayer/loader";
21
+ import type { Loader as BaseLoader } from "@metoceanapi/wxtiles-common/wxlayer/loader";
22
22
  export type Loader = BaseLoader<WxDataSetManager>;
23
- import { Painter as BasePainter } from "@metoceanapi/wxtiles-common/wxlayer/painter";
23
+ import type { Painter as BasePainter } from "@metoceanapi/wxtiles-common/wxlayer/painter";
24
24
  export type Painter = BasePainter<WxDataSetManager>;
25
- export { QTree, type SubTrees, type SubTreesN, type TileType, type Tree, type TreeN } from "@metoceanapi/wxtiles-common/utils/qtree";
26
25
  export { WxAPI } from "./wxAPI/WxAPI";
27
- export type { WxAllBoundariesMeta, WxAllDatasetsShortMetas, WxAPIOptions, WxBoundaryMeta, WxDatasetMeta, WxDatasetShortMeta, WxInstances, WxVariableMeta, WxVariablesMetas, WxRequestInit, WxRasterDataCache as TilesCache, WxDate, WxLayerVarsNames, WxLngLat, WxTileInfo, WxURIs, ListenerMethod, WxEventType, WxLayerBaseAPI, WxLayerAPI, SLine, SLinePoint, WxData, WxRasterData, WxLayerOptions, WxDataSetManagerOptions } from "@metoceanapi/wxtiles-common/types";
28
26
  export { WxDataSetManager, type WxSourceLayerOptions } from "./wxAPI/WxDataSetManager";
29
- export { WxTileSource, WxLayer, WxLayerBaseImplementation } from "./wxsource/wxsource";
27
+ export { WxLayer, WxLayerBaseImplementation, WxTileSource } from "./wxsource/wxsource";
30
28
  export type { FrameworkOptions } from "./wxsource/wxsourcetypes";
31
- export { WxCreateLegend, type RawCLUT, type WxLegend, type WxTick } from "@metoceanapi/wxtiles-common/utils/RawCLUT";
32
- export { DataIntegral, WxGetColorSchemes, WxGetColorStyles, WXLOG, WxTilesLogging, type CachedUriLoaderPromiseFunc, type ColorStylesIncomplete, type Converter, type DataIntegrals, type DataPicture, type DataPictures, type IntegralPare, type WxColorSchemes, type WxColorStylesStrict, type WxColorStyleStrict, type WxColorStylesWeakMixed, type WxColorStyleWeak, type WxUnits, type WxUnitTuple, type XYZ } from "@metoceanapi/wxtiles-common/utils/wxtools";
33
29
  export { CustomWxTilesLayer } from "./customlayer/customlayer";
34
30
  export { WxAPIControl } from "@metoceanapi/wxtiles-common/controls/WxAPIControl";
35
31
  export { WxInfoControl } from "@metoceanapi/wxtiles-common/controls/WxInfoControl";