@maptiler/sdk 3.10.0 → 3.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/dist/eslint.mjs +133 -0
  2. package/dist/maptiler-sdk.d.ts +2 -0
  3. package/dist/maptiler-sdk.mjs +14235 -0
  4. package/dist/maptiler-sdk.mjs.map +1 -0
  5. package/dist/src/ColorRamp.d.ts +359 -0
  6. package/dist/src/ImageViewer/ImageViewer.d.ts +408 -0
  7. package/dist/src/ImageViewer/ImageViewerMarker.d.ts +236 -0
  8. package/dist/src/ImageViewer/events.d.ts +47 -0
  9. package/dist/src/ImageViewer/index.d.ts +5 -0
  10. package/dist/src/ImageViewer/monkeyPatchML.d.ts +10 -0
  11. package/dist/src/ImageViewer/symbols.d.ts +2 -0
  12. package/dist/src/MLAdapters/AttributionControl.d.ts +5 -0
  13. package/dist/src/MLAdapters/BoxZoomHandler.d.ts +7 -0
  14. package/dist/src/MLAdapters/CanvasSource.d.ts +5 -0
  15. package/dist/src/MLAdapters/CooperativeGesturesHandler.d.ts +5 -0
  16. package/dist/src/MLAdapters/FullscreenControl.d.ts +5 -0
  17. package/dist/src/MLAdapters/GeoJSONSource.d.ts +5 -0
  18. package/dist/src/MLAdapters/GeolocateControl.d.ts +5 -0
  19. package/dist/src/MLAdapters/ImageSource.d.ts +5 -0
  20. package/dist/src/MLAdapters/KeyboardHandler.d.ts +5 -0
  21. package/dist/src/MLAdapters/LogoControl.d.ts +5 -0
  22. package/dist/src/MLAdapters/MapMouseEvent.d.ts +5 -0
  23. package/dist/src/MLAdapters/MapTouchEvent.d.ts +5 -0
  24. package/dist/src/MLAdapters/MapWheelEvent.d.ts +5 -0
  25. package/dist/src/MLAdapters/Marker.d.ts +5 -0
  26. package/dist/src/MLAdapters/NavigationControl.d.ts +5 -0
  27. package/dist/src/MLAdapters/Popup.d.ts +5 -0
  28. package/dist/src/MLAdapters/RasterDEMTileSource.d.ts +5 -0
  29. package/dist/src/MLAdapters/RasterTileSource.d.ts +5 -0
  30. package/dist/src/MLAdapters/ScaleControl.d.ts +5 -0
  31. package/dist/src/MLAdapters/ScrollZoomHandler.d.ts +5 -0
  32. package/dist/src/MLAdapters/Style.d.ts +5 -0
  33. package/dist/src/MLAdapters/TerrainControl.d.ts +5 -0
  34. package/dist/src/MLAdapters/TwoFingersTouchPitchHandler.d.ts +5 -0
  35. package/dist/src/MLAdapters/VectorTileSource.d.ts +5 -0
  36. package/dist/src/MLAdapters/VideoSource.d.ts +5 -0
  37. package/dist/src/Map.d.ts +480 -0
  38. package/dist/src/Point.d.ts +177 -0
  39. package/dist/src/Telemetry.d.ts +23 -0
  40. package/dist/src/caching.d.ts +4 -0
  41. package/dist/src/config.d.ts +85 -0
  42. package/dist/src/constants/defaults.d.ts +15 -0
  43. package/dist/src/controls/ImageViewerFitImageToBoundsControl.d.ts +13 -0
  44. package/dist/src/controls/MaptilerCustomControl.d.ts +17 -0
  45. package/dist/src/controls/MaptilerExternalControl.d.ts +25 -0
  46. package/dist/src/controls/MaptilerGeolocateControl.d.ts +21 -0
  47. package/dist/src/controls/MaptilerLogoControl.d.ts +19 -0
  48. package/dist/src/controls/MaptilerNavigationControl.d.ts +17 -0
  49. package/dist/src/controls/MaptilerProjectionControl.d.ts +15 -0
  50. package/dist/src/controls/MaptilerTerrainControl.d.ts +17 -0
  51. package/dist/src/controls/Minimap.d.ts +57 -0
  52. package/dist/src/controls/index.d.ts +8 -0
  53. package/dist/src/converters/index.d.ts +1 -0
  54. package/dist/src/converters/xml.d.ts +54 -0
  55. package/dist/src/custom-layers/CubemapLayer/CubemapLayer.d.ts +239 -0
  56. package/dist/src/custom-layers/CubemapLayer/constants.d.ts +3 -0
  57. package/dist/src/custom-layers/CubemapLayer/index.d.ts +2 -0
  58. package/dist/src/custom-layers/CubemapLayer/loadCubemapTexture.d.ts +43 -0
  59. package/dist/src/custom-layers/CubemapLayer/types.d.ts +67 -0
  60. package/dist/src/custom-layers/RadialGradientLayer/RadialGradientLayer.d.ts +149 -0
  61. package/dist/src/custom-layers/RadialGradientLayer/index.d.ts +2 -0
  62. package/dist/src/custom-layers/RadialGradientLayer/types.d.ts +50 -0
  63. package/dist/src/custom-layers/extractCustomLayerStyle.d.ts +17 -0
  64. package/dist/src/custom-layers/index.d.ts +6 -0
  65. package/dist/src/helpers/index.d.ts +5 -0
  66. package/dist/src/helpers/screenshot.d.ts +18 -0
  67. package/dist/src/helpers/stylehelper.d.ts +28 -0
  68. package/dist/src/helpers/vectorlayerhelpers.d.ts +508 -0
  69. package/dist/src/index.d.ts +100 -0
  70. package/dist/src/language.d.ts +107 -0
  71. package/dist/src/mapstyle.d.ts +18 -0
  72. package/dist/src/ml-types.d.ts +634 -0
  73. package/dist/src/tools.d.ts +84 -0
  74. package/dist/src/types.d.ts +1 -0
  75. package/dist/src/utils/dom.d.ts +2 -0
  76. package/dist/src/utils/errors.d.ts +5 -0
  77. package/dist/src/utils/geo-utils.d.ts +6 -0
  78. package/dist/src/utils/index.d.ts +1 -0
  79. package/dist/src/utils/logSDKVersion.d.ts +1 -0
  80. package/dist/src/utils/math-utils.d.ts +8 -0
  81. package/dist/src/utils/object.d.ts +1 -0
  82. package/dist/src/utils/webgl-utils.d.ts +49 -0
  83. package/package.json +3 -3
@@ -0,0 +1,359 @@
1
+ export type RgbaColor = [number, number, number] | [number, number, number, number];
2
+ export type ColorStop = {
3
+ /**
4
+ * The "value" at which this ColorStop should be applied.
5
+ */
6
+ value: number;
7
+ /**
8
+ * RGB[A] - Array of 3-4 numbers. 0-255 per channel.
9
+ */
10
+ color: RgbaColor;
11
+ };
12
+ /**
13
+ * A RGBA color as per the array definition
14
+ */
15
+ export type ArrayColor = [number, number, number, number];
16
+ /**
17
+ * A color ramp stop as per array definition
18
+ */
19
+ export type ArrayColorRampStop = [
20
+ /**
21
+ * Real world value in a real world unit
22
+ */
23
+ number,
24
+ /**
25
+ * Color RGBA
26
+ */
27
+ ArrayColor
28
+ ];
29
+ /**
30
+ * A color ramp as per array definition
31
+ */
32
+ export type ArrayColorRamp = Array<ArrayColorRampStop>;
33
+ export type ColorRampOptions = {
34
+ /**
35
+ * The value the colorramp starts
36
+ */
37
+ min?: number;
38
+ /**
39
+ * The value the colorramp ends
40
+ */
41
+ max?: number;
42
+ /**
43
+ * Some color stops to copy from
44
+ */
45
+ stops?: Array<ColorStop>;
46
+ };
47
+ export declare class ColorRamp extends Array<ColorStop> {
48
+ /**
49
+ * Converts a array-definition color ramp definition into a usable ColorRamp instance.
50
+ * Note: units are not converted and may need to to be converted beforehand (eg. kelvin to centigrade)
51
+ * @param cr
52
+ * @returns
53
+ */
54
+ static fromArrayDefinition(cr: ArrayColorRamp): ColorRamp;
55
+ private min;
56
+ private max;
57
+ constructor(options?: ColorRampOptions);
58
+ setStops(stops: Array<ColorStop>, options?: {
59
+ clone?: boolean;
60
+ }): ColorRamp;
61
+ scale(min: number, max: number, options?: {
62
+ clone?: boolean;
63
+ }): ColorRamp;
64
+ at(pos: number): ColorStop;
65
+ clone(): ColorRamp;
66
+ getRawColorStops(): Array<ColorStop>;
67
+ reverse(options?: {
68
+ clone?: boolean;
69
+ }): ColorRamp;
70
+ getBounds(): {
71
+ min: number;
72
+ max: number;
73
+ };
74
+ getColor(value: number, options?: {
75
+ smooth?: boolean;
76
+ }): RgbaColor;
77
+ /**
78
+ * Get the color as an hexadecimal string
79
+ */
80
+ getColorHex(value: number, options?: {
81
+ smooth?: boolean;
82
+ withAlpha?: boolean;
83
+ }): string;
84
+ /**
85
+ * Get the color of the color ramp at a relative position in [0, 1]
86
+ */
87
+ getColorRelative(value: number, options?: {
88
+ smooth?: boolean;
89
+ }): RgbaColor;
90
+ getCanvasStrip(options?: {
91
+ horizontal?: boolean;
92
+ size?: number;
93
+ smooth?: boolean;
94
+ }): HTMLCanvasElement;
95
+ /**
96
+ * Apply a non-linear ressampling. This will create a new instance of ColorRamp with the same bounds.
97
+ */
98
+ resample(method: "ease-in-square" | "ease-out-square" | "ease-in-sqrt" | "ease-out-sqrt" | "ease-in-exp" | "ease-out-exp", samples?: number): ColorRamp;
99
+ /**
100
+ * Makes a clone of this color ramp that is fully transparant at the begining of their range
101
+ */
102
+ transparentStart(): ColorRamp;
103
+ /**
104
+ * Check if this color ramp has a transparent start
105
+ */
106
+ hasTransparentStart(): boolean;
107
+ }
108
+ /**
109
+ * This is a collection of built-in color ramps. They are all defined in the range [0, 1]
110
+ * but can be scaled or reversed to fit specific usages.
111
+ */
112
+ export declare const ColorRampCollection: {
113
+ /**
114
+ * A fully transparent [0, 0, 0, 0] colorramp to hide data.
115
+ * Defined in interval [0, 1], without unit.
116
+ */
117
+ NULL: ColorRamp;
118
+ GRAY: ColorRamp;
119
+ /**
120
+ * Classic jet color ramp.
121
+ * Defined in interval [0, 1], without unit.
122
+ */
123
+ JET: ColorRamp;
124
+ /**
125
+ * Classic HSV color ramp (hue, saturation, value).
126
+ * Defined in interval [0, 1], without unit.
127
+ */
128
+ HSV: ColorRamp;
129
+ /**
130
+ * Classic hot color ramp.
131
+ * Defined in interval [0, 1], without unit.
132
+ */
133
+ HOT: ColorRamp;
134
+ /**
135
+ * Classic spring color ramp.
136
+ * Defined in interval [0, 1], without unit.
137
+ */
138
+ SPRING: ColorRamp;
139
+ /**
140
+ * Classic summer color ramp.
141
+ * Defined in interval [0, 1], without unit.
142
+ */
143
+ SUMMER: ColorRamp;
144
+ /**
145
+ * Classic autommn color ramp.
146
+ * Defined in interval [0, 1], without unit.
147
+ */
148
+ AUTOMN: ColorRamp;
149
+ /**
150
+ * Classic winter color ramp.
151
+ * Defined in interval [0, 1], without unit.
152
+ */
153
+ WINTER: ColorRamp;
154
+ /**
155
+ * Classic bone color ramp.
156
+ * Defined in interval [0, 1], without unit.
157
+ */
158
+ BONE: ColorRamp;
159
+ /**
160
+ * Classic copper color ramp.
161
+ * Defined in interval [0, 1], without unit.
162
+ */
163
+ COPPER: ColorRamp;
164
+ /**
165
+ * Classic greys color ramp.
166
+ * Defined in interval [0, 1], without unit.
167
+ */
168
+ GREYS: ColorRamp;
169
+ /**
170
+ * Classic yignbu color ramp (blue to light yellow).
171
+ * Defined in interval [0, 1], without unit.
172
+ */
173
+ YIGNBU: ColorRamp;
174
+ /**
175
+ * Classic greens color ramp.
176
+ * Defined in interval [0, 1], without unit.
177
+ */
178
+ GREENS: ColorRamp;
179
+ /**
180
+ * Classic yiorrd color ramp (red to light yellow).
181
+ * Defined in interval [0, 1], without unit.
182
+ */
183
+ YIORRD: ColorRamp;
184
+ /**
185
+ * Classic blue-red color ramp.
186
+ * Defined in interval [0, 1], without unit.
187
+ */
188
+ BLUERED: ColorRamp;
189
+ /**
190
+ * Classic rdbu color ramp.
191
+ * Defined in interval [0, 1], without unit.
192
+ */
193
+ RDBU: ColorRamp;
194
+ /**
195
+ * Classic picnic color ramp.
196
+ * Defined in interval [0, 1], without unit.
197
+ */
198
+ PICNIC: ColorRamp;
199
+ /**
200
+ * Classic rainbow color ramp.
201
+ * Defined in interval [0, 1], without unit.
202
+ */
203
+ RAINBOW: ColorRamp;
204
+ /**
205
+ * Classic Portland color ramp.
206
+ * Defined in interval [0, 1], without unit.
207
+ */
208
+ PORTLAND: ColorRamp;
209
+ /**
210
+ * Classic blackbody color ramp.
211
+ * Defined in interval [0, 1], without unit.
212
+ */
213
+ BLACKBODY: ColorRamp;
214
+ /**
215
+ * Classic earth color ramp.
216
+ * Defined in interval [0, 1], without unit.
217
+ */
218
+ EARTH: ColorRamp;
219
+ /**
220
+ * Classic electric color ramp.
221
+ * Defined in interval [0, 1], without unit.
222
+ */
223
+ ELECTRIC: ColorRamp;
224
+ /**
225
+ * Classic viridis color ramp.
226
+ * Defined in interval [0, 1], without unit.
227
+ */
228
+ VIRIDIS: ColorRamp;
229
+ /**
230
+ * Classic inferno color ramp.
231
+ * Defined in interval [0, 1], without unit.
232
+ */
233
+ INFERNO: ColorRamp;
234
+ /**
235
+ * Classic magma color ramp.
236
+ * Defined in interval [0, 1], without unit.
237
+ */
238
+ MAGMA: ColorRamp;
239
+ /**
240
+ * Classic plasma color ramp.
241
+ * Defined in interval [0, 1], without unit.
242
+ */
243
+ PLASMA: ColorRamp;
244
+ /**
245
+ * Classic warm color ramp.
246
+ * Defined in interval [0, 1], without unit.
247
+ */
248
+ WARM: ColorRamp;
249
+ /**
250
+ * Classic cool color ramp.
251
+ * Defined in interval [0, 1], without unit.
252
+ */
253
+ COOL: ColorRamp;
254
+ /**
255
+ * Classic rainboz soft color ramp.
256
+ * Defined in interval [0, 1], without unit.
257
+ */
258
+ RAINBOW_SOFT: ColorRamp;
259
+ /**
260
+ * Classic bathymetry color ramp.
261
+ * Defined in interval [0, 1], without unit.
262
+ */
263
+ BATHYMETRY: ColorRamp;
264
+ /**
265
+ * Classic cdom color ramp.
266
+ * Defined in interval [0, 1], without unit.
267
+ */
268
+ CDOM: ColorRamp;
269
+ /**
270
+ * Classic chlorophyll color ramp.
271
+ * Defined in interval [0, 1], without unit.
272
+ */
273
+ CHLOROPHYLL: ColorRamp;
274
+ /**
275
+ * Classic density color ramp.
276
+ * Defined in interval [0, 1], without unit.
277
+ */
278
+ DENSITY: ColorRamp;
279
+ /**
280
+ * Classic freesurface blue color ramp.
281
+ * Defined in interval [0, 1], without unit.
282
+ */
283
+ FREESURFACE_BLUE: ColorRamp;
284
+ /**
285
+ * Classic freesurface red color ramp.
286
+ * Defined in interval [0, 1], without unit.
287
+ */
288
+ FREESURFACE_RED: ColorRamp;
289
+ /**
290
+ * Classic oxygen color ramp.
291
+ * Defined in interval [0, 1], without unit.
292
+ */
293
+ OXYGEN: ColorRamp;
294
+ /**
295
+ * Classic par color ramp.
296
+ * Defined in interval [0, 1], without unit.
297
+ */
298
+ PAR: ColorRamp;
299
+ /**
300
+ * Classic phase color ramp.
301
+ * Defined in interval [0, 1], without unit.
302
+ */
303
+ PHASE: ColorRamp;
304
+ /**
305
+ * Classic salinity color ramp.
306
+ * Defined in interval [0, 1], without unit.
307
+ */
308
+ SALINITY: ColorRamp;
309
+ /**
310
+ * Classic temperature color ramp.
311
+ * Defined in interval [0, 1], without unit.
312
+ */
313
+ TEMPERATURE: ColorRamp;
314
+ /**
315
+ * Classic turbidity color ramp.
316
+ * Defined in interval [0, 1], without unit.
317
+ */
318
+ TURBIDITY: ColorRamp;
319
+ /**
320
+ * Classic velocity blue color ramp.
321
+ * Defined in interval [0, 1], without unit.
322
+ */
323
+ VELOCITY_BLUE: ColorRamp;
324
+ /**
325
+ * Classic velocity green color ramp.
326
+ * Defined in interval [0, 1], without unit.
327
+ */
328
+ VELOCITY_GREEN: ColorRamp;
329
+ /**
330
+ * Classic cube helix color ramp.
331
+ * Defined in interval [0, 1], without unit.
332
+ */
333
+ CUBEHELIX: ColorRamp;
334
+ /**
335
+ * The cividis color ramp is color blind friendly.
336
+ * Read more here https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0199239
337
+ * Defined in interval [0, 1], without unit.
338
+ */
339
+ CIVIDIS: ColorRamp;
340
+ /**
341
+ * Classic turbo color ramp.
342
+ * This is a luminance-constant alternative to the jet, making it more
343
+ * clor-blind friendly.
344
+ * Defined in interval [0, 1], without unit.
345
+ */
346
+ TURBO: ColorRamp;
347
+ /**
348
+ * The rocket color ramp is perceptually uniform, which makes it more
349
+ * color bliend friendly than the classic magma color ramp.
350
+ * Defined in interval [0, 1], without unit.
351
+ */
352
+ ROCKET: ColorRamp;
353
+ /**
354
+ * The mako color ramp is perceptually uniform and can be seen as
355
+ * a color blind friendly alternative to bathymetry or yignbu.
356
+ * Defined in interval [0, 1], without unit.
357
+ */
358
+ MAKO: ColorRamp;
359
+ };