@metoceanapi/wxtiles-leaflet 2.0.6 → 2.0.8
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/CHANGELOG.md +4 -0
- package/README.md +13 -18
- package/dist/es/controls/WxAPIControl.d.ts +1 -1
- package/dist/es/controls/WxStyleEditorControl.d.ts +1 -1
- package/dist/es/controls/WxTimeControl .d.ts +2 -2
- package/dist/es/index.d.ts +6 -6
- package/dist/es/index.js +6 -1
- package/dist/es/utils/wxtools.d.ts +72 -47
- package/dist/es/wxAPI/WxDataSetManager.d.ts +7 -1
- package/dist/es/wxlayer/WxImplementation.d.ts +3 -3
- package/dist/es/wxlayer/loadertools.d.ts +1 -1
- package/dist/es/wxlayer/wxlayer.d.ts +5 -7
- package/dist/es/wxsource/wxsource.d.ts +2 -2
- package/dist/es/wxsource/wxsourcetypes.d.ts +3 -0
- package/dist/web/index.js +6 -1
- package/docs/docs/assets/search.js +1 -1
- package/docs/docs/classes/DataIntegral.html +154 -0
- package/docs/docs/classes/FrameworkParentClass.html +21 -9
- package/docs/docs/classes/Loader.html +8 -8
- package/docs/docs/classes/Painter.html +6 -6
- package/docs/docs/classes/QTree.html +6 -6
- package/docs/docs/classes/RawCLUT.html +7 -7
- package/docs/docs/classes/WxAPI.html +18 -18
- package/docs/docs/classes/WxDataSetManager.html +37 -20
- package/docs/docs/classes/WxLayer.html +25 -25
- package/docs/docs/classes/WxLayerBaseImplementation.html +33 -20
- package/docs/docs/classes/WxTileSource.html +40 -22
- package/docs/docs/enums/TileType.html +4 -4
- package/docs/docs/functions/WXLOG.html +6 -5
- package/docs/docs/functions/WxCreateLegend.html +4 -3
- package/docs/docs/functions/WxGetColorSchemes.html +4 -3
- package/docs/docs/functions/WxGetColorStyles.html +4 -3
- package/docs/docs/functions/WxTilesLogging.html +6 -5
- package/docs/docs/index.html +12 -10
- package/docs/docs/interfaces/ColorStylesIncomplete.html +4 -3
- package/docs/docs/interfaces/Converter.html +2 -2
- package/docs/docs/interfaces/DataPicture.html +9 -7
- package/docs/docs/interfaces/FrameworkOptions.html +20 -63
- package/docs/docs/interfaces/IntegralPare.html +3 -3
- package/docs/docs/interfaces/SLinePoint.html +3 -3
- package/docs/docs/interfaces/Tree.html +2 -2
- package/docs/docs/interfaces/WxAPIOptions.html +10 -10
- package/docs/docs/interfaces/WxAllBoundariesMeta.html +4 -4
- package/docs/docs/interfaces/WxBoundaryMeta.html +5 -5
- package/docs/docs/interfaces/WxColorSchemes.html +4 -3
- package/docs/docs/interfaces/WxColorStyleStrict.html +80 -60
- package/docs/docs/interfaces/WxColorStyleWeak.html +80 -60
- package/docs/docs/interfaces/WxColorStylesStrict.html +2 -2
- package/docs/docs/interfaces/WxColorStylesWeakMixed.html +4 -3
- package/docs/docs/interfaces/WxData.html +3 -3
- package/docs/docs/interfaces/WxDataSetManagerOptions.html +6 -6
- package/docs/docs/interfaces/WxDataSetsMetasJSON.html +2 -2
- package/docs/docs/interfaces/WxDatasetMeta.html +9 -9
- package/docs/docs/interfaces/WxDatasetShortMeta.html +4 -4
- package/docs/docs/interfaces/WxLayerAPI.html +19 -19
- package/docs/docs/interfaces/WxLayerBaseAPI.html +15 -15
- package/docs/docs/interfaces/WxLayerOptions.html +17 -10
- package/docs/docs/interfaces/WxLegend.html +7 -7
- package/docs/docs/interfaces/WxLngLat.html +3 -3
- package/docs/docs/interfaces/WxRasterData.html +5 -5
- package/docs/docs/interfaces/WxRequestInit.html +2 -2
- package/docs/docs/interfaces/WxSourceLayerOptions.html +109 -0
- package/docs/docs/interfaces/WxTick.html +5 -5
- package/docs/docs/interfaces/WxTileInfo.html +9 -9
- package/docs/docs/interfaces/WxTilesLibOptions.html +4 -4
- package/docs/docs/interfaces/WxUnits.html +4 -3
- package/docs/docs/interfaces/WxVariableMeta.html +6 -6
- package/docs/docs/interfaces/WxVariablesMetas.html +4 -3
- package/docs/docs/interfaces/XYZ.html +4 -4
- package/docs/docs/modules.html +5 -3
- package/docs/docs/types/DataIntegrals.html +6 -5
- package/docs/docs/types/DataPictures.html +4 -3
- package/docs/docs/types/SLine.html +4 -3
- package/docs/docs/types/SubTrees.html +4 -3
- package/docs/docs/types/SubTreesN.html +4 -3
- package/docs/docs/types/TreeN.html +4 -3
- package/docs/docs/types/UriLoaderPromiseFunc.html +4 -3
- package/docs/docs/types/WxDate.html +4 -3
- package/docs/docs/types/WxURIs.html +4 -3
- package/docs/docs/types/WxUnitTuple.html +4 -3
- package/docs/docs/types/WxVars.html +4 -3
- package/docs/examples/res/icon.png +0 -0
- package/docs/examples/res/wxtiles-logo.png +0 -0
- package/docs/examples/simpleDemo.html +59 -0
- package/docs/script/script.js +8 -3
- package/package.json +2 -2
- package/src_example/index.ts +116 -55
- package/build-for-docs.js +0 -23
- package/docs/docs/interfaces/DataIntegral.html +0 -112
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@metoceanapi/wxtiles-leaflet",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.8",
|
|
4
4
|
"description": "WxTile JS lib to render wxtiles datalayers",
|
|
5
5
|
"main": "dist/es/index.js",
|
|
6
6
|
"types": "dist/es/index.d.ts",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"build_DEMO_Docs": "npm run build && npm run buildDOCS && node build-for-docs.js",
|
|
9
9
|
"start": "PORT=3002 node watch-public.js",
|
|
10
10
|
"build": "rm -rf dist/ && node build.js && tsc",
|
|
11
|
-
"buildDOCS": "./node_modules/.bin/typedoc --out docs/docs --excludeExternals src",
|
|
11
|
+
"buildDOCS": "./node_modules/.bin/typedoc --out docs/docs --excludeExternals -gitRevision main src",
|
|
12
12
|
"preversion": "npm run build",
|
|
13
13
|
"version": "changelogkeeper && git add CHANGELOG.md",
|
|
14
14
|
"npm_reinstall": "rm -rf node_modules package-lock.json && npm i",
|
package/src_example/index.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import 'leaflet/dist/leaflet.css';
|
|
2
2
|
import L from 'leaflet'; // goes first always!
|
|
3
3
|
|
|
4
|
-
import { WxTileSource, type WxVars, WxAPI, WxTilesLogging, type WxTileInfo, FrameworkOptions } from '../src/index';
|
|
4
|
+
import { WxTileSource, type WxVars, WxAPI, WxTilesLogging, type WxTileInfo, FrameworkOptions, WxGetColorStyles, WXLOG, WxColorStyleWeak } from '../src/index';
|
|
5
5
|
import { WxLegendControl } from '../src/controls/WxLegendControl';
|
|
6
6
|
import { WxStyleEditorControl } from '../src/controls/WxStyleEditorControl';
|
|
7
7
|
import { WxInfoControl } from '../src/controls/WxInfoControl';
|
|
@@ -10,6 +10,7 @@ import { WxAPIControl } from '../src/controls/WxAPIControl';
|
|
|
10
10
|
|
|
11
11
|
start();
|
|
12
12
|
// simpleDemo();
|
|
13
|
+
// twoLayersDemo();
|
|
13
14
|
|
|
14
15
|
const OPACITY = 1;
|
|
15
16
|
|
|
@@ -28,12 +29,14 @@ async function start() {
|
|
|
28
29
|
const wxapi = new WxAPI({
|
|
29
30
|
dataServerURL,
|
|
30
31
|
maskURL: dataServerURL + 'masks/{z}/{x}/{y}.png',
|
|
32
|
+
maskChannel: 'R',
|
|
33
|
+
maskDepth: 9, // currently only max 9 is supported
|
|
31
34
|
qtreeURL: dataServerURL + 'masks/9+1.seamask.qtree',
|
|
32
35
|
requestInit: { headers: myHeaders },
|
|
33
36
|
});
|
|
34
37
|
|
|
35
38
|
let datasetName = 'gfs.global'; /* 'mercator.global/'; */ /* 'ecwmf.global/'; */ /* 'obs-radar.rain.nzl.national/'; */
|
|
36
|
-
let
|
|
39
|
+
let variable = 'air.temperature.at-2m';
|
|
37
40
|
// let variables: WxVars = ['wind.speed.eastward.at-10m', 'wind.speed.northward.at-10m'];
|
|
38
41
|
|
|
39
42
|
// let datasetName = 'ww3-ecmwf.global';
|
|
@@ -43,76 +46,100 @@ async function start() {
|
|
|
43
46
|
// let variables: WxVars = ['reflectivity'];
|
|
44
47
|
|
|
45
48
|
// get datasetName from URL
|
|
46
|
-
const urlParams = window.location.toString().split('
|
|
49
|
+
const urlParams = window.location.toString().split('##')[1];
|
|
47
50
|
const params = urlParams?.split('/');
|
|
48
51
|
datasetName = params?.[0] || datasetName;
|
|
49
|
-
if (params?.[1])
|
|
52
|
+
if (params?.[1]) variable = params[1];
|
|
50
53
|
let time = params?.[2] || '';
|
|
51
54
|
const zoom = (params && parseFloat(params[3])) || 0;
|
|
52
55
|
const lng = (params && parseFloat(params[4])) || 0;
|
|
53
56
|
const lat = (params && parseFloat(params[5])) || 0;
|
|
54
57
|
const bearing = (params && parseFloat(params[6])) || 0;
|
|
55
|
-
const pitch = (params && parseFloat(params[
|
|
56
|
-
|
|
58
|
+
const pitch = (params && parseFloat(params[7])) || 0;
|
|
59
|
+
if (params?.length > 8) params[8] = params.slice(8).join('/');
|
|
60
|
+
|
|
61
|
+
const str = params?.[8] && params[8];
|
|
62
|
+
const sth = { style: {} as WxColorStyleWeak };
|
|
63
|
+
try {
|
|
64
|
+
// get style from URL
|
|
65
|
+
sth.style = str && { ...JSON.parse(decodeURI(str)) }; // reset levels if change units
|
|
66
|
+
} catch (e) {
|
|
67
|
+
/* ignore errors silently */
|
|
68
|
+
console.log(e);
|
|
69
|
+
}
|
|
57
70
|
|
|
58
|
-
map
|
|
59
|
-
map.on('drag', () => setURL(map, time, datasetName, variables));
|
|
60
|
-
map.on('rotate', () => setURL(map, time, datasetName, variables));
|
|
61
|
-
map.on('pitch', () => setURL(map, time, datasetName, variables));
|
|
71
|
+
flyTo(map, zoom, lng, lat, bearing, pitch);
|
|
62
72
|
|
|
63
|
-
const
|
|
73
|
+
// const sth = { style: {} };
|
|
74
|
+
map.on('zoom', () => setURL(map, time, datasetName, variable, sth.style));
|
|
75
|
+
map.on('drag', () => setURL(map, time, datasetName, variable, sth.style));
|
|
76
|
+
map.on('rotate', () => setURL(map, time, datasetName, variable, sth.style));
|
|
77
|
+
map.on('pitch', () => setURL(map, time, datasetName, variable, sth.style));
|
|
64
78
|
|
|
65
79
|
let wxsource: WxTileSource | undefined;
|
|
66
80
|
|
|
67
81
|
const legendControl = new WxLegendControl();
|
|
68
82
|
addControl(map, legendControl, 'top-right');
|
|
69
83
|
|
|
70
|
-
const
|
|
84
|
+
const frameworkOptions = { id: 'wxsource', opacity: OPACITY, attribution: 'WxTiles' };
|
|
85
|
+
const apiControl = new WxAPIControl(wxapi, datasetName, variable);
|
|
71
86
|
addControl(map, apiControl, 'top-left');
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
addControl(map, timeControl, 'top-left');
|
|
75
|
-
timeControl.onchange = (time_) => setURL(map, (time = time_), datasetName, variables);
|
|
76
|
-
|
|
77
|
-
const customStyleEditorControl = new WxStyleEditorControl();
|
|
78
|
-
addControl(map, customStyleEditorControl, 'top-left');
|
|
79
|
-
customStyleEditorControl.onchange = async (style) => {
|
|
80
|
-
if (!wxsource) return;
|
|
81
|
-
await wxsource.updateCurrentStyleObject(style);
|
|
82
|
-
const nstyle = wxsource.getCurrentStyleObjectCopy();
|
|
83
|
-
legendControl.drawLegend(nstyle);
|
|
84
|
-
customStyleEditorControl.setStyle(nstyle);
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
const infoControl = new WxInfoControl();
|
|
88
|
-
addControl(map, infoControl, 'bottom-left');
|
|
89
|
-
map.on('mousemove', (e) => infoControl.update(wxsource, map, position(e)));
|
|
90
|
-
|
|
91
|
-
apiControl.onchange = async (datasetName_: string, variable: string): Promise<void> => {
|
|
87
|
+
apiControl.onchange = async (datasetName_, variable_, nonnativecall): Promise<void> => {
|
|
88
|
+
WXLOG('apiControl.onchange datasetName=', datasetName_, 'variable=', variable_);
|
|
92
89
|
// remove existing source and layer
|
|
93
90
|
removeLayer(map, frameworkOptions.id, wxsource);
|
|
94
91
|
//
|
|
92
|
+
nonnativecall || (sth.style = {}); // reset style if change dataset/variable
|
|
95
93
|
wxsource = undefined;
|
|
96
94
|
datasetName = datasetName_;
|
|
95
|
+
variable = variable_;
|
|
97
96
|
const wxdatasetManager = await wxapi.createDatasetManager(datasetName);
|
|
98
97
|
const meta = wxdatasetManager.getVariableMeta(variable);
|
|
99
|
-
variables = wxdatasetManager.checkCombineVariableIfVector(variable); // check if variable is vector and use vector components if so
|
|
100
98
|
if (meta?.units === 'RGB') {
|
|
101
|
-
addRaster(map, frameworkOptions.id, 'wxtiles', wxdatasetManager.createURI(
|
|
99
|
+
addRaster(map, frameworkOptions.id, 'wxtiles', wxdatasetManager.createURI(variable, 0), wxdatasetManager.getMaxZoom());
|
|
102
100
|
timeControl.setTimes(wxdatasetManager.getTimes());
|
|
103
101
|
legendControl.clear();
|
|
104
102
|
} else {
|
|
105
|
-
wxsource =
|
|
103
|
+
wxsource = wxdatasetManager.createSourceLayer({ variable, time, wxstyle: sth.style }, frameworkOptions);
|
|
106
104
|
await addLayer(map, frameworkOptions.id, 'wxtiles', wxsource);
|
|
107
|
-
|
|
108
|
-
legendControl.drawLegend(
|
|
109
|
-
|
|
105
|
+
const styleCopy = wxsource.getCurrentStyleObjectCopy();
|
|
106
|
+
legendControl.drawLegend(styleCopy); // first draw legend with current style
|
|
107
|
+
styleCopy.levels = sth.style?.levels; // no need to show defaults it in the editor and URL
|
|
108
|
+
styleCopy.colors = sth.style?.colors; // no need to show defaults it in the editor and URL
|
|
109
|
+
await customStyleEditorControl.onchange?.(styleCopy, true);
|
|
110
110
|
}
|
|
111
|
+
|
|
112
|
+
timeControl.updateSource(wxsource);
|
|
111
113
|
};
|
|
112
114
|
|
|
113
|
-
|
|
115
|
+
const timeControl = new WxTimeControl(50);
|
|
116
|
+
addControl(map, timeControl, 'top-left');
|
|
117
|
+
timeControl.onchange = (time_) => {
|
|
118
|
+
setURL(map, (time = time_), datasetName, variable, sth.style);
|
|
119
|
+
};
|
|
114
120
|
|
|
115
|
-
|
|
121
|
+
const customStyleEditorControl = new WxStyleEditorControl();
|
|
122
|
+
addControl(map, customStyleEditorControl, 'top-right');
|
|
123
|
+
customStyleEditorControl.onchange = async (style, nonnativecall) => {
|
|
124
|
+
WXLOG('customStyleEditorControl.onchange');
|
|
125
|
+
if (!wxsource) return;
|
|
126
|
+
nonnativecall || (await wxsource.updateCurrentStyleObject(style)); // if called manually, do not update wxsource's style
|
|
127
|
+
const nstyle = wxsource.getCurrentStyleObjectCopy();
|
|
128
|
+
legendControl.drawLegend(nstyle);
|
|
129
|
+
nstyle.levels = style?.levels; // keep levels empty if they are not defined
|
|
130
|
+
nstyle.colors = style?.colors; // keep colors empty if they are not defined
|
|
131
|
+
customStyleEditorControl.setStyle(nstyle); // if called from wxsource, update customStyleEditorControl
|
|
132
|
+
sth.style = nstyle;
|
|
133
|
+
setURL(map, time, datasetName, variable, sth.style);
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
const infoControl = new WxInfoControl();
|
|
137
|
+
addControl(map, infoControl, 'bottom-left');
|
|
138
|
+
map.on('mousemove', (e) => infoControl.update(wxsource, map, position(e)));
|
|
139
|
+
|
|
140
|
+
await apiControl.onchange(datasetName, variable, true); // initial load
|
|
141
|
+
|
|
142
|
+
/*/ DEMO: more interactive - additional level and a bit of the red transparentness around the level made from current mouse position
|
|
116
143
|
if (wxsource) {
|
|
117
144
|
let busy = false;
|
|
118
145
|
await wxsource.updateCurrentStyleObject({ levels: undefined }); // await always !!
|
|
@@ -196,26 +223,29 @@ async function start() {
|
|
|
196
223
|
//*/
|
|
197
224
|
|
|
198
225
|
/*/ DEMO: Dynamic blur effect /
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
b += db;
|
|
206
|
-
if (b > 16 || b < 0) db = -db;
|
|
207
|
-
setTimeout(nextAnim, 1);
|
|
208
|
-
};
|
|
209
|
-
setTimeout(nextAnim, 2000); //*/
|
|
226
|
+
wxsource &&
|
|
227
|
+
(async function step(n: number = 0) {
|
|
228
|
+
await wxsource.updateCurrentStyleObject({ isolineText: false, blurRadius: ~~(10 * Math.sin(n / 500) + 10) }); // await always !!
|
|
229
|
+
requestAnimationFrame(step);
|
|
230
|
+
})();
|
|
231
|
+
//*/
|
|
210
232
|
}
|
|
211
233
|
|
|
212
234
|
function flyTo(map: L.Map, zoom: number, lng: number, lat: number, bearing: number, pitch: number) {
|
|
213
235
|
map.flyTo([lat, lng], zoom);
|
|
214
236
|
}
|
|
215
237
|
|
|
216
|
-
function setURL(map: L.Map, time: string, datasetName: string,
|
|
217
|
-
const
|
|
218
|
-
|
|
238
|
+
function setURL(map: L.Map, time: string, datasetName: string, variable: string, style: any) {
|
|
239
|
+
const base = WxGetColorStyles()['base'];
|
|
240
|
+
for (const i in style) style[i] === base[i] && delete style[i]; // remove default values
|
|
241
|
+
|
|
242
|
+
const center = map.getCenter().wrap();
|
|
243
|
+
const href =
|
|
244
|
+
`##${datasetName}/${variable}/${time}/${map.getZoom().toFixed(2)}/${center.lng.toFixed(2)}/${center.lat.toFixed(2)}/0/0` +
|
|
245
|
+
(style ? '/' + JSON.stringify(style) : '');
|
|
246
|
+
|
|
247
|
+
history.replaceState(null, '', href);
|
|
248
|
+
// location.href = `#${datasetName}/${variables.join(',')}/${time}/${map.getZoom().toFixed(2)}/${center.lng.toFixed(2)}/${center.lat.toFixed(2)}`;
|
|
219
249
|
}
|
|
220
250
|
|
|
221
251
|
async function initFrameWork() {
|
|
@@ -282,7 +312,7 @@ async function simpleDemo() {
|
|
|
282
312
|
const variables = wxdatasetManager.checkCombineVariableIfVector(variable);
|
|
283
313
|
|
|
284
314
|
// create a layer
|
|
285
|
-
const leafletOptions: FrameworkOptions = { opacity: 1, attribution: 'WxTiles' };
|
|
315
|
+
const leafletOptions: FrameworkOptions = { id: 'wxsource', opacity: 1, attribution: 'WxTiles' };
|
|
286
316
|
const wxsource = new WxTileSource({ wxdatasetManager, variables }, leafletOptions);
|
|
287
317
|
|
|
288
318
|
// add the layer to the map
|
|
@@ -291,3 +321,34 @@ async function simpleDemo() {
|
|
|
291
321
|
// await for the first load
|
|
292
322
|
await new Promise((done) => wxsource.once('load', done)); // highly recommended to await for the first load
|
|
293
323
|
}
|
|
324
|
+
|
|
325
|
+
async function twoLayersDemo() {
|
|
326
|
+
const dataServerURL = 'https://tiles.metoceanapi.com/data/';
|
|
327
|
+
const requestInit: RequestInit = {
|
|
328
|
+
// headers: new Headers([['x-api-key', '--proper-key-value--']]),
|
|
329
|
+
}; // add more options if needed such as headers, mode, credentials, etc
|
|
330
|
+
|
|
331
|
+
// Get the API ready - should be ONE per application
|
|
332
|
+
WxTilesLogging(true); // If needed
|
|
333
|
+
const wxapi = new WxAPI({ dataServerURL, maskURL: 'none', qtreeURL: 'none', requestInit });
|
|
334
|
+
|
|
335
|
+
// Create a dataset manager (may be used for many layers from this dataset)
|
|
336
|
+
const wxdatasetManager = await wxapi.createDatasetManager('gfs.global');
|
|
337
|
+
|
|
338
|
+
// create a layer
|
|
339
|
+
const leafletOptions = { id: 'wxsource', attribution: 'WxTiles' };
|
|
340
|
+
const wxsource = wxdatasetManager.createSourceLayer({ variable: 'air.temperature.at-2m' }, leafletOptions);
|
|
341
|
+
|
|
342
|
+
// create a layer
|
|
343
|
+
const leafletOptions1 = { id: 'wxsource1', opacity: 0.5 };
|
|
344
|
+
const wxsource1 = wxdatasetManager.createSourceLayer({ variable: 'air.visibility' }, leafletOptions1);
|
|
345
|
+
|
|
346
|
+
// MAP
|
|
347
|
+
const map = L.map('map', { center: [0, 0], zoom: 2, zoomControl: true });
|
|
348
|
+
// add leaflet layerGroup to map
|
|
349
|
+
const group = L.layerGroup([wxsource, wxsource1]).addTo(map);
|
|
350
|
+
// create control
|
|
351
|
+
const control = L.control.layers(undefined, { wxsource, wxsource1 }).addTo(map);
|
|
352
|
+
// add the group to the control layer
|
|
353
|
+
control.addOverlay(group, 'wxsources group');
|
|
354
|
+
}
|
package/build-for-docs.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
const esbuild = require('esbuild');
|
|
2
|
-
const express = require('express');
|
|
3
|
-
|
|
4
|
-
const PORT = process.env.PORT || 3000;
|
|
5
|
-
|
|
6
|
-
esbuild
|
|
7
|
-
.build({
|
|
8
|
-
entryPoints: ['src_example/index.ts'],
|
|
9
|
-
bundle: true,
|
|
10
|
-
plugins: [],
|
|
11
|
-
loader: {
|
|
12
|
-
'.png': 'base64',
|
|
13
|
-
'.woff': 'base64',
|
|
14
|
-
'.fs': 'text',
|
|
15
|
-
'.vs': 'text',
|
|
16
|
-
},
|
|
17
|
-
target: 'es2020',
|
|
18
|
-
format: 'iife',
|
|
19
|
-
outfile: 'docs/script/script.js',
|
|
20
|
-
sourcemap: false,
|
|
21
|
-
minify: true,
|
|
22
|
-
})
|
|
23
|
-
.catch((e) => console.error(e.message));
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>DataIntegral | @metoceanapi/wxtiles-leaflet</title><meta name="description" content="Documentation for @metoceanapi/wxtiles-leaflet"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
|
|
2
|
-
<div class="tsd-toolbar-contents container">
|
|
3
|
-
<div class="table-cell" id="tsd-search" data-base="..">
|
|
4
|
-
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
|
|
5
|
-
<div class="field">
|
|
6
|
-
<div id="tsd-toolbar-links"></div></div>
|
|
7
|
-
<ul class="results">
|
|
8
|
-
<li class="state loading">Preparing search index...</li>
|
|
9
|
-
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@metoceanapi/wxtiles-leaflet</a></div>
|
|
10
|
-
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
|
|
11
|
-
<div class="container container-main">
|
|
12
|
-
<div class="col-8 col-content">
|
|
13
|
-
<div class="tsd-page-title">
|
|
14
|
-
<ul class="tsd-breadcrumb">
|
|
15
|
-
<li><a href="../modules.html">@metoceanapi/wxtiles-leaflet</a></li>
|
|
16
|
-
<li><a href="DataIntegral.html">DataIntegral</a></li></ul>
|
|
17
|
-
<h1>Interface DataIntegral</h1></div>
|
|
18
|
-
<section class="tsd-panel tsd-comment">
|
|
19
|
-
<div class="tsd-comment tsd-typography"><p>interface extends <a href="../types/DataPictures.html">DataPictures</a> with <a href="IntegralPare.html">IntegralPare</a> and current
|
|
20
|
-
calculated radius of the box-filter</p>
|
|
21
|
-
</div></section>
|
|
22
|
-
<section class="tsd-panel tsd-hierarchy">
|
|
23
|
-
<h4>Hierarchy</h4>
|
|
24
|
-
<ul class="tsd-hierarchy">
|
|
25
|
-
<li><a href="DataPicture.html" class="tsd-signature-type" data-tsd-kind="Interface">DataPicture</a>
|
|
26
|
-
<ul class="tsd-hierarchy">
|
|
27
|
-
<li><span class="target">DataIntegral</span></li></ul></li></ul></section><aside class="tsd-sources">
|
|
28
|
-
<ul>
|
|
29
|
-
<li>Defined in <a href="https://github.com/metoceanapi/wxtiles-leaflet/blob/95b58b4/src/utils/wxtools.ts#L376">src/utils/wxtools.ts:376</a></li></ul></aside>
|
|
30
|
-
<section class="tsd-panel-group tsd-index-group">
|
|
31
|
-
<section class="tsd-panel tsd-index-panel">
|
|
32
|
-
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
|
|
33
|
-
<h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex=0><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M1.5 5.50969L8 11.6609L14.5 5.50969L12.5466 3.66086L8 7.96494L3.45341 3.66086L1.5 5.50969Z" fill="var(--color-text)"></path></svg> Index</h5></summary>
|
|
34
|
-
<div class="tsd-accordion-details">
|
|
35
|
-
<section class="tsd-index-section">
|
|
36
|
-
<h3 class="tsd-index-heading">Properties</h3>
|
|
37
|
-
<div class="tsd-index-list"><a href="DataIntegral.html#dmax" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-1024-path"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)" id="icon-1024-text"></path></svg><span>dmax</span></a>
|
|
38
|
-
<a href="DataIntegral.html#dmin" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>dmin</span></a>
|
|
39
|
-
<a href="DataIntegral.html#dmul" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>dmul</span></a>
|
|
40
|
-
<a href="DataIntegral.html#integral" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>integral</span></a>
|
|
41
|
-
<a href="DataIntegral.html#radius" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>radius</span></a>
|
|
42
|
-
<a href="DataIntegral.html#raw" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>raw</span></a>
|
|
43
|
-
</div></section></div></details></section></section>
|
|
44
|
-
<section class="tsd-panel-group tsd-member-group">
|
|
45
|
-
<h2>Properties</h2>
|
|
46
|
-
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a id="dmax" class="tsd-anchor"></a>
|
|
47
|
-
<h3 class="tsd-anchor-link"><span>dmax</span><a href="#dmax" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none" id="icon-anchor-a"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5" id="icon-anchor-b"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5" id="icon-anchor-c"></path></svg></a></h3>
|
|
48
|
-
<div class="tsd-signature">dmax<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources">
|
|
49
|
-
<p>Inherited from <a href="DataPicture.html">DataPicture</a>.<a href="DataPicture.html#dmax">dmax</a></p>
|
|
50
|
-
<ul>
|
|
51
|
-
<li>Defined in <a href="https://github.com/metoceanapi/wxtiles-leaflet/blob/95b58b4/src/utils/wxtools.ts#L366">src/utils/wxtools.ts:366</a></li></ul></aside></section>
|
|
52
|
-
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a id="dmin" class="tsd-anchor"></a>
|
|
53
|
-
<h3 class="tsd-anchor-link"><span>dmin</span><a href="#dmin" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
54
|
-
<div class="tsd-signature">dmin<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources">
|
|
55
|
-
<p>Inherited from <a href="DataPicture.html">DataPicture</a>.<a href="DataPicture.html#dmin">dmin</a></p>
|
|
56
|
-
<ul>
|
|
57
|
-
<li>Defined in <a href="https://github.com/metoceanapi/wxtiles-leaflet/blob/95b58b4/src/utils/wxtools.ts#L365">src/utils/wxtools.ts:365</a></li></ul></aside></section>
|
|
58
|
-
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a id="dmul" class="tsd-anchor"></a>
|
|
59
|
-
<h3 class="tsd-anchor-link"><span>dmul</span><a href="#dmul" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
60
|
-
<div class="tsd-signature">dmul<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources">
|
|
61
|
-
<p>Inherited from <a href="DataPicture.html">DataPicture</a>.<a href="DataPicture.html#dmul">dmul</a></p>
|
|
62
|
-
<ul>
|
|
63
|
-
<li>Defined in <a href="https://github.com/metoceanapi/wxtiles-leaflet/blob/95b58b4/src/utils/wxtools.ts#L367">src/utils/wxtools.ts:367</a></li></ul></aside></section>
|
|
64
|
-
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="integral" class="tsd-anchor"></a>
|
|
65
|
-
<h3 class="tsd-anchor-link"><span>integral</span><a href="#integral" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
66
|
-
<div class="tsd-signature">integral<span class="tsd-signature-symbol">:</span> <a href="IntegralPare.html" class="tsd-signature-type" data-tsd-kind="Interface">IntegralPare</a></div><aside class="tsd-sources">
|
|
67
|
-
<ul>
|
|
68
|
-
<li>Defined in <a href="https://github.com/metoceanapi/wxtiles-leaflet/blob/95b58b4/src/utils/wxtools.ts#L377">src/utils/wxtools.ts:377</a></li></ul></aside></section>
|
|
69
|
-
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="radius" class="tsd-anchor"></a>
|
|
70
|
-
<h3 class="tsd-anchor-link"><span>radius</span><a href="#radius" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
71
|
-
<div class="tsd-signature">radius<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources">
|
|
72
|
-
<ul>
|
|
73
|
-
<li>Defined in <a href="https://github.com/metoceanapi/wxtiles-leaflet/blob/95b58b4/src/utils/wxtools.ts#L378">src/utils/wxtools.ts:378</a></li></ul></aside></section>
|
|
74
|
-
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a id="raw" class="tsd-anchor"></a>
|
|
75
|
-
<h3 class="tsd-anchor-link"><span>raw</span><a href="#raw" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
76
|
-
<div class="tsd-signature">raw<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Uint16Array</span></div><aside class="tsd-sources">
|
|
77
|
-
<p>Inherited from <a href="DataPicture.html">DataPicture</a>.<a href="DataPicture.html#raw">raw</a></p>
|
|
78
|
-
<ul>
|
|
79
|
-
<li>Defined in <a href="https://github.com/metoceanapi/wxtiles-leaflet/blob/95b58b4/src/utils/wxtools.ts#L364">src/utils/wxtools.ts:364</a></li></ul></aside></section></section></div>
|
|
80
|
-
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
|
|
81
|
-
<div class="tsd-navigation settings">
|
|
82
|
-
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
|
|
83
|
-
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Settings</h3></summary>
|
|
84
|
-
<div class="tsd-accordion-details">
|
|
85
|
-
<div class="tsd-filter-visibility">
|
|
86
|
-
<h4 class="uppercase">Member Visibility</h4><form>
|
|
87
|
-
<ul id="tsd-filter-options">
|
|
88
|
-
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li>
|
|
89
|
-
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-private" name="private"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Private</span></label></li>
|
|
90
|
-
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></form></div>
|
|
91
|
-
<div class="tsd-theme-toggle">
|
|
92
|
-
<h4 class="uppercase">Theme</h4><select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div>
|
|
93
|
-
<nav class="tsd-navigation primary">
|
|
94
|
-
<details class="tsd-index-accordion" open><summary class="tsd-accordion-summary">
|
|
95
|
-
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Modules</h3></summary>
|
|
96
|
-
<div class="tsd-accordion-details">
|
|
97
|
-
<ul>
|
|
98
|
-
<li><a href="../modules.html">@metoceanapi/wxtiles-<wbr/>leaflet</a>
|
|
99
|
-
<ul></ul></li></ul></div></details></nav>
|
|
100
|
-
<nav class="tsd-navigation secondary menu-sticky">
|
|
101
|
-
<ul>
|
|
102
|
-
<li class="current tsd-kind-interface"><a href="DataIntegral.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-interface)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-256-path"></rect><path d="M9.51 16V15.016H11.298V8.224H9.51V7.24H14.19V8.224H12.402V15.016H14.19V16H9.51Z" fill="var(--color-text)" id="icon-256-text"></path></svg><span>Data<wbr/>Integral</span></a>
|
|
103
|
-
<ul>
|
|
104
|
-
<li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href="DataIntegral.html#dmax" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>dmax</a></li>
|
|
105
|
-
<li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href="DataIntegral.html#dmin" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>dmin</a></li>
|
|
106
|
-
<li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href="DataIntegral.html#dmul" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>dmul</a></li>
|
|
107
|
-
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="DataIntegral.html#integral" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>integral</a></li>
|
|
108
|
-
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="DataIntegral.html#radius" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>radius</a></li>
|
|
109
|
-
<li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href="DataIntegral.html#raw" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>raw</a></li></ul></li></ul></nav></div></div>
|
|
110
|
-
<div class="container tsd-generator">
|
|
111
|
-
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
|
|
112
|
-
<div class="overlay"></div><script src="../assets/main.js"></script></body></html>
|