@maptiler/sdk 1.1.2 → 1.2.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 (41) hide show
  1. package/.eslintrc.cjs +15 -5
  2. package/.github/pull_request_template.md +11 -0
  3. package/.github/workflows/format-lint.yml +24 -0
  4. package/CHANGELOG.md +105 -51
  5. package/colorramp.md +93 -0
  6. package/dist/maptiler-sdk.d.ts +1226 -124
  7. package/dist/maptiler-sdk.min.mjs +3 -1
  8. package/dist/maptiler-sdk.mjs +3582 -483
  9. package/dist/maptiler-sdk.mjs.map +1 -1
  10. package/dist/maptiler-sdk.umd.js +4524 -863
  11. package/dist/maptiler-sdk.umd.js.map +1 -1
  12. package/dist/maptiler-sdk.umd.min.js +51 -49
  13. package/package.json +27 -13
  14. package/readme.md +493 -5
  15. package/rollup.config.js +2 -16
  16. package/src/Map.ts +515 -359
  17. package/src/MaptilerGeolocateControl.ts +23 -20
  18. package/src/MaptilerLogoControl.ts +3 -3
  19. package/src/MaptilerNavigationControl.ts +9 -6
  20. package/src/MaptilerTerrainControl.ts +15 -14
  21. package/src/Minimap.ts +373 -0
  22. package/src/Point.ts +3 -5
  23. package/src/colorramp.ts +1216 -0
  24. package/src/config.ts +4 -3
  25. package/src/converters/index.ts +1 -0
  26. package/src/converters/xml.ts +681 -0
  27. package/src/defaults.ts +1 -1
  28. package/src/helpers/index.ts +27 -0
  29. package/src/helpers/stylehelper.ts +395 -0
  30. package/src/helpers/vectorlayerhelpers.ts +1511 -0
  31. package/src/index.ts +90 -121
  32. package/src/language.ts +116 -79
  33. package/src/mapstyle.ts +4 -2
  34. package/src/tools.ts +68 -16
  35. package/tsconfig.json +8 -5
  36. package/vite.config.ts +10 -0
  37. package/demos/maptiler-sdk.css +0 -147
  38. package/demos/maptiler-sdk.umd.js +0 -4041
  39. package/demos/mountain.html +0 -67
  40. package/demos/simple.html +0 -67
  41. package/demos/transform-request.html +0 -81
@@ -1,14 +1,36 @@
1
1
  import * as maplibre_gl from 'maplibre-gl';
2
- import maplibre_gl__default, { MapOptions as MapOptions$1, StyleSpecification, ControlPosition, StyleOptions, RequestTransformFunction, Map as Map$1, LogoOptions as LogoOptions$1 } from 'maplibre-gl';
2
+ import maplibre_gl__default, { LineLayerSpecification, FillLayerSpecification, StyleSpecification, ControlPosition, MapOptions as MapOptions$1, StyleSwapOptions, StyleOptions, LayerSpecification, SourceSpecification, CustomLayerInterface, FilterSpecification, StyleSetterOptions, RequestTransformFunction, Map as Map$1, LogoOptions as LogoOptions$1, IControl } from 'maplibre-gl';
3
3
  export * from 'maplibre-gl';
4
4
  import { FetchFunction, ReferenceMapStyle, MapStyleVariant } from '@maptiler/client';
5
- export { AutomaticStaticMapOptions, BBox, BoundedStaticMapOptions, CenteredStaticMapOptions, CoordinatesSearchOptions, GeocodingOptions, LanguageGeocoding, LanguageGeocodingString, MapStyle, MapStyleType, MapStyleVariant, Position, ReferenceMapStyle, ServiceError, coordinates, data, geocoding, geolocation, staticMaps } from '@maptiler/client';
5
+ export { AutomaticStaticMapOptions, BoundedStaticMapOptions, BufferToPixelDataFunction, ByIdGeocodingOptions, CenteredStaticMapOptions, CommonForwardAndReverseGeocodingOptions, CoordinateExport, CoordinateGrid, CoordinateId, CoordinateSearch, CoordinateSearchResult, CoordinateTransformResult, CoordinateTransformation, Coordinates, CoordinatesSearchOptions, CoordinatesTransformOptions, DefaultTransformation, ElevationAtOptions, ElevationBatchOptions, FeatureHierarchy, FetchFunction, GeocodingFeature, GeocodingOptions, GeocodingSearchResult, GeolocationInfoOptions, GeolocationResult, GetDataOptions, LanguageGeocoding, LanguageGeocodingOptions, LanguageGeocodingString, MapStyle, MapStylePreset, MapStyleType, MapStyleVariant, PixelData, ReferenceMapStyle, ReverseGeocodingOptions, ServiceError, StaticMapBaseOptions, StaticMapMarker, TileJSON, XYZ, bufferToPixelDataBrowser, circumferenceAtLatitude, coordinates, data, elevation, expandMapStyle, geocoding, geolocation, getAutoLanguageGeocoding, getBufferToPixelDataParser, getTileCache, mapStylePresetList, math, misc, staticMaps, styleToStyle } from '@maptiler/client';
6
6
  import EventEmitter from 'events';
7
+ import { FeatureCollection } from 'geojson';
7
8
 
8
9
  /**
9
10
  * Languages. Note that not all the languages of this list are available but the compatibility list may be expanded in the future.
10
11
  */
11
12
  declare const Language: {
13
+ /**
14
+ * The visitor language mode concatenates the prefered language from the user settings and the "default name".
15
+ * Note: The "default name" is equivalent to OSM's `{name}`, which can be the most recognized names a global
16
+ * scale or the local name.
17
+ * This mode is helpful in the context where a user needs to access both the local names and the names in their
18
+ * own language, for instance when traveling abroad, where signs likely to be only available in the local language.
19
+ */
20
+ readonly VISITOR: "visitor";
21
+ /**
22
+ * The visitor language mode concatenates English and the "default name".
23
+ * Note: The "default name" is equivalent to OSM's `{name}`, which can be the most recognized names a global
24
+ * scale or the local name.
25
+ * This mode is helpful in the context where a user needs to access both the local names and the names in their
26
+ * own language, for instance when traveling abroad, where signs likely to be only available in the local language.
27
+ */
28
+ readonly VISITOR_ENGLISH: "visitor_en";
29
+ /**
30
+ * Language as the style is designed. Not that this is the default state and one
31
+ * the language has been changed to another than `STYLE`, then it cannot be set back to `STYLE`.
32
+ */
33
+ readonly STYLE: "style";
12
34
  /**
13
35
  * AUTO mode uses the language of the browser
14
36
  */
@@ -22,86 +44,99 @@ declare const Language: {
22
44
  /**
23
45
  * Default fallback languages that uses latin charaters
24
46
  */
25
- readonly LATIN: "latin";
47
+ readonly LATIN: "name:latin";
26
48
  /**
27
49
  * Default fallback languages that uses non-latin charaters
28
50
  */
29
- readonly NON_LATIN: "nonlatin";
51
+ readonly NON_LATIN: "name:nonlatin";
30
52
  /**
31
53
  * Labels are in their local language, when available
32
54
  */
33
- readonly LOCAL: "";
34
- readonly ALBANIAN: "sq";
35
- readonly AMHARIC: "am";
36
- readonly ARABIC: "ar";
37
- readonly ARMENIAN: "hy";
38
- readonly AZERBAIJANI: "az";
39
- readonly BASQUE: "eu";
40
- readonly BELORUSSIAN: "be";
41
- readonly BOSNIAN: "bs";
42
- readonly BRETON: "br";
43
- readonly BULGARIAN: "bg";
44
- readonly CATALAN: "ca";
45
- readonly CHINESE: "zh";
46
- readonly CORSICAN: "co";
47
- readonly CROATIAN: "hr";
48
- readonly CZECH: "cs";
49
- readonly DANISH: "da";
50
- readonly DUTCH: "nl";
51
- readonly ENGLISH: "en";
52
- readonly ESPERANTO: "eo";
53
- readonly ESTONIAN: "et";
54
- readonly FINNISH: "fi";
55
- readonly FRENCH: "fr";
56
- readonly FRISIAN: "fy";
57
- readonly GEORGIAN: "ka";
58
- readonly GERMAN: "de";
59
- readonly GREEK: "el";
60
- readonly HEBREW: "he";
61
- readonly HINDI: "hi";
62
- readonly HUNGARIAN: "hu";
63
- readonly ICELANDIC: "is";
64
- readonly INDONESIAN: "id";
65
- readonly IRISH: "ga";
66
- readonly ITALIAN: "it";
67
- readonly JAPANESE: "ja";
68
- readonly JAPANESE_HIRAGANA: "ja-Hira";
69
- readonly JAPANESE_KANA: "ja_kana";
70
- readonly JAPANESE_LATIN: "ja_rm";
71
- readonly JAPANESE_2018: "ja-Latn";
72
- readonly KANNADA: "kn";
73
- readonly KAZAKH: "kk";
74
- readonly KOREAN: "ko";
75
- readonly KOREAN_LATIN: "ko-Latn";
76
- readonly KURDISH: "ku";
77
- readonly ROMAN_LATIN: "la";
78
- readonly LATVIAN: "lv";
79
- readonly LITHUANIAN: "lt";
80
- readonly LUXEMBOURGISH: "lb";
81
- readonly MACEDONIAN: "mk";
82
- readonly MALAYALAM: "ml";
83
- readonly MALTESE: "mt";
84
- readonly NORWEGIAN: "no";
85
- readonly OCCITAN: "oc";
86
- readonly POLISH: "pl";
87
- readonly PORTUGUESE: "pt";
88
- readonly ROMANIAN: "ro";
89
- readonly ROMANSH: "rm";
90
- readonly RUSSIAN: "ru";
91
- readonly SCOTTISH_GAELIC: "gd";
92
- readonly SERBIAN_CYRILLIC: "sr";
93
- readonly SERBIAN_LATIN: "sr-Latn";
94
- readonly SLOVAK: "sk";
95
- readonly SLOVENE: "sl";
96
- readonly SPANISH: "es";
97
- readonly SWEDISH: "sv";
98
- readonly TAMIL: "ta";
99
- readonly TELUGU: "te";
100
- readonly THAI: "th";
101
- readonly TURKISH: "tr";
102
- readonly UKRAINIAN: "uk";
103
- readonly WELSH: "cy";
55
+ readonly LOCAL: "name";
56
+ /**
57
+ * International name
58
+ */
59
+ readonly INTERNATIONAL: "name_int";
60
+ readonly ALBANIAN: "name:sq";
61
+ readonly AMHARIC: "name:am";
62
+ readonly ARABIC: "name:ar";
63
+ readonly ARMENIAN: "name:hy";
64
+ readonly AZERBAIJANI: "name:az";
65
+ readonly BASQUE: "name:eu";
66
+ readonly BELORUSSIAN: "name:be";
67
+ readonly BENGALI: "name:bn";
68
+ readonly BOSNIAN: "name:bs";
69
+ readonly BRETON: "name:br";
70
+ readonly BULGARIAN: "name:bg";
71
+ readonly CATALAN: "name:ca";
72
+ readonly CHINESE: "name:zh";
73
+ readonly TRADITIONAL_CHINESE: "name:zh-Hant";
74
+ readonly SIMPLIFIED_CHINESE: "name:zh-Hans";
75
+ readonly CORSICAN: "name:co";
76
+ readonly CROATIAN: "name:hr";
77
+ readonly CZECH: "name:cs";
78
+ readonly DANISH: "name:da";
79
+ readonly DUTCH: "name:nl";
80
+ readonly ENGLISH: "name:en";
81
+ readonly ESPERANTO: "name:eo";
82
+ readonly ESTONIAN: "name:et";
83
+ readonly FINNISH: "name:fi";
84
+ readonly FRENCH: "name:fr";
85
+ readonly FRISIAN: "name:fy";
86
+ readonly GEORGIAN: "name:ka";
87
+ readonly GERMAN: "name:de";
88
+ readonly GREEK: "name:el";
89
+ readonly HEBREW: "name:he";
90
+ readonly HINDI: "name:hi";
91
+ readonly HUNGARIAN: "name:hu";
92
+ readonly ICELANDIC: "name:is";
93
+ readonly INDONESIAN: "name:id";
94
+ readonly IRISH: "name:ga";
95
+ readonly ITALIAN: "name:it";
96
+ readonly JAPANESE: "name:ja";
97
+ readonly JAPANESE_HIRAGANA: "name:ja-Hira";
98
+ readonly JAPANESE_KANA: "name:ja_kana";
99
+ readonly JAPANESE_LATIN: "name:ja_rm";
100
+ readonly JAPANESE_2018: "name:ja-Latn";
101
+ readonly KANNADA: "name:kn";
102
+ readonly KAZAKH: "name:kk";
103
+ readonly KOREAN: "name:ko";
104
+ readonly KOREAN_LATIN: "name:ko-Latn";
105
+ readonly KURDISH: "name:ku";
106
+ readonly ROMAN_LATIN: "name:la";
107
+ readonly LATVIAN: "name:lv";
108
+ readonly LITHUANIAN: "name:lt";
109
+ readonly LUXEMBOURGISH: "name:lb";
110
+ readonly MACEDONIAN: "name:mk";
111
+ readonly MALAYALAM: "name:ml";
112
+ readonly MALTESE: "name:mt";
113
+ readonly NORWEGIAN: "name:no";
114
+ readonly OCCITAN: "name:oc";
115
+ readonly PERSIAN: "name:fa";
116
+ readonly POLISH: "name:pl";
117
+ readonly PORTUGUESE: "name:pt";
118
+ readonly PUNJABI: "name:pa";
119
+ readonly WESTERN_PUNJABI: "name:pnb";
120
+ readonly ROMANIAN: "name:ro";
121
+ readonly ROMANSH: "name:rm";
122
+ readonly RUSSIAN: "name:ru";
123
+ readonly SCOTTISH_GAELIC: "name:gd";
124
+ readonly SERBIAN_CYRILLIC: "name:sr";
125
+ readonly SERBIAN_LATIN: "name:sr-Latn";
126
+ readonly SLOVAK: "name:sk";
127
+ readonly SLOVENE: "name:sl";
128
+ readonly SPANISH: "name:es";
129
+ readonly SWEDISH: "name:sv";
130
+ readonly TAMIL: "name:ta";
131
+ readonly TELUGU: "name:te";
132
+ readonly THAI: "name:th";
133
+ readonly TURKISH: "name:tr";
134
+ readonly UKRAINIAN: "name:uk";
135
+ readonly URDU: "name:ur";
136
+ readonly VIETNAMIAN_LATIN: "name:vi";
137
+ readonly WELSH: "name:cy";
104
138
  };
139
+ declare function isLanguageSupported(lang: string): boolean;
105
140
  /**
106
141
  * Type representing the key of the Language object
107
142
  */
@@ -111,6 +146,7 @@ type Values<T> = T[keyof T];
111
146
  * Built-in languages values as strings
112
147
  */
113
148
  type LanguageString = Values<typeof Language>;
149
+ declare function getBrowserLanguage(): LanguageString;
114
150
 
115
151
  type Unit = "imperial" | "metric" | "nautical";
116
152
 
@@ -121,12 +157,12 @@ declare class SdkConfig extends EventEmitter {
121
157
  /**
122
158
  * The primary language. By default, the language of the web browser is used.
123
159
  */
124
- primaryLanguage: LanguageString | null;
160
+ primaryLanguage: LanguageString;
125
161
  /**
126
162
  * The secondary language, to overwrite the default language defined in the map style.
127
163
  * This settings is highly dependant on the style compatibility and may not work in most cases.
128
164
  */
129
- secondaryLanguage: LanguageString | null;
165
+ secondaryLanguage?: LanguageString;
130
166
  /**
131
167
  * Setting on whether of not the SDK runs with a session logic.
132
168
  * A "session" is started at the initialization of the SDK and finished when the browser
@@ -171,6 +207,47 @@ declare class SdkConfig extends EventEmitter {
171
207
  }
172
208
  declare const config: SdkConfig;
173
209
 
210
+ /**
211
+ * This is an extension adds support for adding a minimap to one of the map's control containers.
212
+ */
213
+
214
+ interface ParentRect {
215
+ lineLayout: LineLayerSpecification["layout"];
216
+ linePaint: LineLayerSpecification["paint"];
217
+ fillPaint: FillLayerSpecification["paint"];
218
+ }
219
+ interface MinimapOptionsInput {
220
+ /**
221
+ * Style of the map. Can be:
222
+ * - a full style URL (possibly with API key)
223
+ * - a shorthand with only the MapTIler style name (eg. `"streets-v2"`)
224
+ * - a longer form with the prefix `"maptiler://"` (eg. `"maptiler://streets-v2"`)
225
+ */
226
+ style?: ReferenceMapStyle | MapStyleVariant | StyleSpecification | string;
227
+ /**
228
+ * Set the zoom difference between the parent and the minimap
229
+ * If the parent is zoomed to 10 and the minimap is zoomed to 8, the zoomAdjust should be 2
230
+ * Default: -4
231
+ */
232
+ zoomAdjust?: number;
233
+ /** Set a zoom of the minimap and don't allow any future changes */
234
+ lockZoom?: number;
235
+ /** Adjust the pitch only if the user requests */
236
+ pitchAdjust?: boolean;
237
+ /** Set CSS properties of the container using object key-values */
238
+ containerStyle?: Record<string, string>;
239
+ /** Set the position of the minimap at either "top-left", "top-right", "bottom-left", or "bottom-right" */
240
+ position?: ControlPosition;
241
+ /** Set the parentRect fill and/or line options */
242
+ parentRect?: ParentRect;
243
+ }
244
+ interface MinimapOptions extends MapOptions {
245
+ zoomAdjust: number;
246
+ pitchAdjust: boolean;
247
+ containerStyle: Record<string, string>;
248
+ parentRect?: ParentRect;
249
+ }
250
+
174
251
  type LoadWithTerrainEvent = {
175
252
  type: "loadWithTerrain";
176
253
  target: Map;
@@ -179,11 +256,6 @@ type LoadWithTerrainEvent = {
179
256
  exaggeration: number;
180
257
  };
181
258
  };
182
- type TransformStyleFunction = (previous: StyleSpecification, next: StyleSpecification) => StyleSpecification;
183
- type StyleSwapOptions = {
184
- diff?: boolean;
185
- transformStyle?: TransformStyleFunction;
186
- };
187
259
  declare const GeolocationType: {
188
260
  POINT: "POINT";
189
261
  COUNTRY: "COUNTRY";
@@ -249,6 +321,15 @@ type MapOptions = Omit<MapOptions$1, "style" | "maplibreLogo"> & {
249
321
  * Show the full screen control. (default: `false`, will show if `true`)
250
322
  */
251
323
  fullscreenControl?: boolean | ControlPosition;
324
+ /**
325
+ * Display a minimap in a user defined corner of the map. (default: `bottom-left` corner)
326
+ * If set to true, the map will assume it is a minimap and forego the attribution control.
327
+ */
328
+ minimap?: boolean | ControlPosition | MinimapOptionsInput;
329
+ /**
330
+ * attributionControl
331
+ */
332
+ forceNoAttributionControl?: boolean;
252
333
  /**
253
334
  * Method to position the map at a given geolocation. Only if:
254
335
  * - `hash` is `false`
@@ -277,9 +358,12 @@ declare class Map extends maplibre_gl__default.Map {
277
358
  private isTerrainEnabled;
278
359
  private terrainExaggeration;
279
360
  private primaryLanguage;
280
- private secondaryLanguage;
281
361
  private terrainGrowing;
282
362
  private terrainFlattening;
363
+ private minimap?;
364
+ private forceLanguageUpdate;
365
+ private languageAlwaysBeenStyle;
366
+ private isReady;
283
367
  constructor(options: MapOptions);
284
368
  /**
285
369
  * Awaits for _this_ Map instance to be "loaded" and returns a Promise to the Map.
@@ -288,6 +372,15 @@ declare class Map extends maplibre_gl__default.Map {
288
372
  * @returns
289
373
  */
290
374
  onLoadAsync(): Promise<Map>;
375
+ /**
376
+ * Awaits for _this_ Map instance to be "ready" and returns a Promise to the Map.
377
+ * If _this_ Map instance is already ready, the Promise is resolved directly,
378
+ * otherwise, it is resolved as a result of the "ready" event.
379
+ * A map instance is "ready" when all the controls that can be managed by the contructor are
380
+ * dealt with. This happens after the "load" event, due to the asynchronous nature
381
+ * of some built-in controls.
382
+ */
383
+ onReadyAsync(): Promise<Map>;
291
384
  /**
292
385
  * Awaits for _this_ Map instance to be "loaded" as well as with terrain being non-null for the first time
293
386
  * and returns a Promise to the Map.
@@ -302,38 +395,138 @@ declare class Map extends maplibre_gl__default.Map {
302
395
  * - a full style URL (possibly with API key)
303
396
  * - a shorthand with only the MapTIler style name (eg. `"streets-v2"`)
304
397
  * - a longer form with the prefix `"maptiler://"` (eg. `"maptiler://streets-v2"`)
305
- * @param style
306
- * @param options
307
- * @returns
308
398
  */
309
- setStyle(style: ReferenceMapStyle | MapStyleVariant | StyleSpecification | string, options?: StyleSwapOptions & StyleOptions): this;
399
+ setStyle(style: null | ReferenceMapStyle | MapStyleVariant | StyleSpecification | string, options?: StyleSwapOptions & StyleOptions): this;
310
400
  /**
311
- * Define the primary language of the map. Note that not all the languages shorthands provided are available.
312
- * This function is a short for `.setPrimaryLanguage()`
313
- * @param language
401
+ * Adds a [MapLibre style layer](https://maplibre.org/maplibre-style-spec/layers)
402
+ * to the map's style.
403
+ *
404
+ * A layer defines how data from a specified source will be styled. Read more about layer types
405
+ * and available paint and layout properties in the [MapLibre Style Specification](https://maplibre.org/maplibre-style-spec/layers).
406
+ *
407
+ * @param layer - The layer to add,
408
+ * conforming to either the MapLibre Style Specification's [layer definition](https://maplibre.org/maplibre-style-spec/layers) or,
409
+ * less commonly, the {@link CustomLayerInterface} specification.
410
+ * The MapLibre Style Specification's layer definition is appropriate for most layers.
411
+ *
412
+ * @param beforeId - The ID of an existing layer to insert the new layer before,
413
+ * resulting in the new layer appearing visually beneath the existing layer.
414
+ * If this argument is not specified, the layer will be appended to the end of the layers array
415
+ * and appear visually above all other layers.
416
+ *
417
+ * @returns `this`
418
+ */
419
+ addLayer(layer: (LayerSpecification & {
420
+ source?: string | SourceSpecification;
421
+ }) | CustomLayerInterface, beforeId?: string): this;
422
+ /**
423
+ * Moves a layer to a different z-position.
424
+ *
425
+ * @param id - The ID of the layer to move.
426
+ * @param beforeId - The ID of an existing layer to insert the new layer before. When viewing the map, the `id` layer will appear beneath the `beforeId` layer. If `beforeId` is omitted, the layer will be appended to the end of the layers array and appear above all other layers on the map.
427
+ * @returns `this`
428
+ *
429
+ * @example
430
+ * Move a layer with ID 'polygon' before the layer with ID 'country-label'. The `polygon` layer will appear beneath the `country-label` layer on the map.
431
+ * ```ts
432
+ * map.moveLayer('polygon', 'country-label');
433
+ * ```
314
434
  */
315
- setLanguage(language?: LanguageString): any;
435
+ moveLayer(id: string, beforeId?: string): this;
436
+ /**
437
+ * Removes the layer with the given ID from the map's style.
438
+ *
439
+ * An {@link ErrorEvent} will be fired if the image parameter is invald.
440
+ *
441
+ * @param id - The ID of the layer to remove
442
+ * @returns `this`
443
+ *
444
+ * @example
445
+ * If a layer with ID 'state-data' exists, remove it.
446
+ * ```ts
447
+ * if (map.getLayer('state-data')) map.removeLayer('state-data');
448
+ * ```
449
+ */
450
+ removeLayer(id: string): this;
451
+ /**
452
+ * Sets the zoom extent for the specified style layer. The zoom extent includes the
453
+ * [minimum zoom level](https://maplibre.org/maplibre-style-spec/layers/#minzoom)
454
+ * and [maximum zoom level](https://maplibre.org/maplibre-style-spec/layers/#maxzoom))
455
+ * at which the layer will be rendered.
456
+ *
457
+ * Note: For style layers using vector sources, style layers cannot be rendered at zoom levels lower than the
458
+ * minimum zoom level of the _source layer_ because the data does not exist at those zoom levels. If the minimum
459
+ * zoom level of the source layer is higher than the minimum zoom level defined in the style layer, the style
460
+ * layer will not be rendered at all zoom levels in the zoom range.
461
+ */
462
+ setLayerZoomRange(layerId: string, minzoom: number, maxzoom: number): this;
463
+ /**
464
+ * Sets the filter for the specified style layer.
465
+ *
466
+ * Filters control which features a style layer renders from its source.
467
+ * Any feature for which the filter expression evaluates to `true` will be
468
+ * rendered on the map. Those that are false will be hidden.
469
+ *
470
+ * Use `setFilter` to show a subset of your source data.
471
+ *
472
+ * To clear the filter, pass `null` or `undefined` as the second parameter.
473
+ */
474
+ setFilter(layerId: string, filter?: FilterSpecification | null, options?: StyleSetterOptions): this;
475
+ /**
476
+ * Sets the value of a paint property in the specified style layer.
477
+ *
478
+ * @param layerId - The ID of the layer to set the paint property in.
479
+ * @param name - The name of the paint property to set.
480
+ * @param value - The value of the paint property to set.
481
+ * Must be of a type appropriate for the property, as defined in the [MapLibre Style Specification](https://maplibre.org/maplibre-style-spec/).
482
+ * @param options - Options object.
483
+ * @returns `this`
484
+ * @example
485
+ * ```ts
486
+ * map.setPaintProperty('my-layer', 'fill-color', '#faafee');
487
+ * ```
488
+ */
489
+ setPaintProperty(layerId: string, name: string, value: any, options?: StyleSetterOptions): this;
490
+ /**
491
+ * Sets the value of a layout property in the specified style layer.
492
+ * Layout properties define how the layer is styled.
493
+ * Layout properties for layers of the same type are documented together.
494
+ * Layers of different types have different layout properties.
495
+ * See the [MapLibre Style Specification](https://maplibre.org/maplibre-style-spec/) for the complete list of layout properties.
496
+ * @param layerId - The ID of the layer to set the layout property in.
497
+ * @param name - The name of the layout property to set.
498
+ * @param value - The value of the layout property to set.
499
+ * Must be of a type appropriate for the property, as defined in the [MapLibre Style Specification](https://maplibre.org/maplibre-style-spec/).
500
+ * @param options - Options object.
501
+ * @returns `this`
502
+ */
503
+ setLayoutProperty(layerId: string, name: string, value: any, options?: StyleSetterOptions): this;
504
+ /**
505
+ * Sets the value of the style's glyphs property.
506
+ *
507
+ * @param glyphsUrl - Glyph URL to set. Must conform to the [MapLibre Style Specification](https://maplibre.org/maplibre-style-spec/glyphs/).
508
+ * @param options - Options object.
509
+ * @returns `this`
510
+ * @example
511
+ * ```ts
512
+ * map.setGlyphs('https://demotiles.maplibre.org/font/{fontstack}/{range}.pbf');
513
+ * ```
514
+ */
515
+ setGlyphs(glyphsUrl: string | null, options?: StyleSetterOptions): this;
516
+ private getStyleLanguage;
316
517
  /**
317
518
  * Define the primary language of the map. Note that not all the languages shorthands provided are available.
318
- * @param language
319
519
  */
320
- setPrimaryLanguage(language?: LanguageString): void;
520
+ setLanguage(language: LanguageString | string): void;
321
521
  /**
322
- * Define the secondary language of the map. Note that this is not supported by all the map styles
323
- * Note that most styles do not allow a secondary language and this function only works if the style allows (no force adding)
324
- * @param language
522
+ * Define the primary language of the map. Note that not all the languages shorthands provided are available.
325
523
  */
326
- setSecondaryLanguage(language?: LanguageString): void;
524
+ private setPrimaryLanguage;
327
525
  /**
328
526
  * Get the primary language
329
527
  * @returns
330
528
  */
331
529
  getPrimaryLanguage(): LanguageString;
332
- /**
333
- * Get the secondary language
334
- * @returns
335
- */
336
- getSecondaryLanguage(): LanguageString;
337
530
  /**
338
531
  * Get the exaggeration factor applied to the terrain
339
532
  * @returns
@@ -347,8 +540,6 @@ declare class Map extends maplibre_gl__default.Map {
347
540
  private growTerrain;
348
541
  /**
349
542
  * Enables the 3D terrain visualization
350
- * @param exaggeration
351
- * @returns
352
543
  */
353
544
  enableTerrain(exaggeration?: number): void;
354
545
  /**
@@ -361,14 +552,11 @@ declare class Map extends maplibre_gl__default.Map {
361
552
  * the method `.enableTerrain()` will be called.
362
553
  * If `animate` is `true`, the terrain transformation will be animated in the span of 1 second.
363
554
  * If `animate` is `false`, no animated transition to the newly defined exaggeration.
364
- * @param exaggeration
365
- * @param animate
366
555
  */
367
556
  setTerrainExaggeration(exaggeration: number, animate?: boolean): void;
368
557
  /**
369
558
  * Perform an action when the style is ready. It could be at the moment of calling this method
370
559
  * or later.
371
- * @param cb
372
560
  */
373
561
  private onStyleReady;
374
562
  fitToIpBounds(): Promise<void>;
@@ -378,7 +566,6 @@ declare class Map extends maplibre_gl__default.Map {
378
566
  * Get the SDK config object.
379
567
  * This is convenient to dispatch the SDK configuration to externally built layers
380
568
  * that do not directly have access to the SDK configuration but do have access to a Map instance.
381
- * @returns
382
569
  */
383
570
  getSdkConfig(): SdkConfig;
384
571
  /**
@@ -399,6 +586,10 @@ declare class Map extends maplibre_gl__default.Map {
399
586
  * map.setTransformRequest((url: string, resourceType: string) => {});
400
587
  */
401
588
  setTransformRequest(transformRequest: RequestTransformFunction): this;
589
+ /**
590
+ * Loads an image. This is an async equivalent of `Map.loadImage`
591
+ */
592
+ loadImageAsync(url: string): Promise<HTMLImageElement | ImageBitmap | null | undefined>;
402
593
  }
403
594
 
404
595
  /**
@@ -551,10 +742,10 @@ declare class MaptilerGeolocateControl extends GeolocateControl {
551
742
  * @param {Position} position the Geolocation API Position
552
743
  * @private
553
744
  */
554
- _updateCamera(position: GeolocationPosition): void;
555
- _setupUI(supported: boolean): void;
745
+ _updateCamera: (position: GeolocationPosition) => void;
746
+ _setupUI: (supported: boolean) => void;
556
747
  _updateCircleRadius(): void;
557
- _onZoom(): void;
748
+ _onZoom: () => void;
558
749
  }
559
750
 
560
751
  type LogoOptions = LogoOptions$1 & {
@@ -566,6 +757,7 @@ type LogoOptions = LogoOptions$1 & {
566
757
  * any link URL. By default this is using MapTiler logo and URL.
567
758
  */
568
759
  declare class MaptilerLogoControl extends LogoControl {
760
+ _compact: boolean;
569
761
  private logoURL;
570
762
  private linkURL;
571
763
  constructor(options?: LogoOptions);
@@ -576,7 +768,7 @@ declare class MaptilerLogoControl extends LogoControl {
576
768
  * A `MaptilerTerrainControl` control adds a button to turn terrain on and off
577
769
  * by triggering the terrain logic that is already deployed in the Map object.
578
770
  */
579
- declare class MaptilerTerrainControl implements maplibregl.IControl {
771
+ declare class MaptilerTerrainControl implements IControl {
580
772
  _map: Map;
581
773
  _container: HTMLElement;
582
774
  _terrainButton: HTMLButtonElement;
@@ -588,18 +780,18 @@ declare class MaptilerTerrainControl implements maplibregl.IControl {
588
780
  }
589
781
 
590
782
  type HTMLButtonElementPlus = HTMLButtonElement & {
591
- clickFunction: (e?: any) => unknown;
783
+ clickFunction: (e?: Event) => unknown;
592
784
  };
593
785
  declare class MaptilerNavigationControl extends NavigationControl {
594
786
  constructor();
595
787
  /**
596
788
  * Overloading: the button now stores its click callback so that we can later on delete it and replace it
597
789
  */
598
- _createButton(className: string, fn: (e?: any) => unknown): HTMLButtonElementPlus;
790
+ _createButton(className: string, fn: (e?: Event) => unknown): HTMLButtonElementPlus;
599
791
  /**
600
792
  * Overloading: Limit how flat the compass icon can get
601
793
  */
602
- _rotateCompassArrow(): void;
794
+ _rotateCompassArrow: () => void;
603
795
  }
604
796
 
605
797
  /**
@@ -612,8 +804,6 @@ declare class MaptilerNavigationControl extends NavigationControl {
612
804
  type Matrix2 = [number, number, number, number];
613
805
  /**
614
806
  * a point
615
- * @param x
616
- * @param y
617
807
  */
618
808
  declare class Point {
619
809
  x: number;
@@ -734,13 +924,13 @@ declare class Point {
734
924
  * @param {Point} other the other point
735
925
  * @return {boolean} whether the points are equal
736
926
  */
737
- equals(other: any): boolean;
927
+ equals(other: Point): boolean;
738
928
  /**
739
929
  * Calculate the distance from this point to another point
740
930
  * @param {Point} p the other point
741
931
  * @return {Number} distance
742
932
  */
743
- dist(p: any): number;
933
+ dist(p: Point): number;
744
934
  /**
745
935
  * Calculate the distance from this point to another point,
746
936
  * without the square root step. Useful if you're comparing
@@ -748,7 +938,7 @@ declare class Point {
748
938
  * @param {Point} p the other point
749
939
  * @return {Number} distance
750
940
  */
751
- distSqr(p: any): number;
941
+ distSqr(p: Point): number;
752
942
  /**
753
943
  * Get the angle from the 0, 0 coordinate to this point, in radians
754
944
  * coordinates.
@@ -782,7 +972,919 @@ declare class Point {
782
972
  static convert(a: Point | Array<number>): Point;
783
973
  }
784
974
 
785
- declare const setRTLTextPlugin: (url: string, callback: (error?: Error) => void, deferred?: boolean) => void;
975
+ interface Link {
976
+ href: string | null;
977
+ }
978
+ interface XMLProperties {
979
+ links?: Link[];
980
+ }
981
+ interface PlacemarkProperties {
982
+ name?: string;
983
+ address?: string;
984
+ styleUrl?: string;
985
+ description?: string;
986
+ styleHash?: string;
987
+ styleMapHash?: Record<string, string | null>;
988
+ timespan?: {
989
+ begin: string;
990
+ end: string;
991
+ };
992
+ timestamp?: string;
993
+ stroke?: string;
994
+ "stroke-opacity"?: number;
995
+ "stroke-width"?: number;
996
+ fill?: string;
997
+ "fill-opacity"?: number;
998
+ visibility?: string;
999
+ icon?: string;
1000
+ coordTimes?: (string | null)[] | (string | null)[][];
1001
+ }
1002
+ /**
1003
+ * create a function that converts a string to XML
1004
+ * https://developer.mozilla.org/en-US/docs/Web/API/DOMParser
1005
+ */
1006
+ declare function str2xml(str: string): Document;
1007
+ /**
1008
+ * Check one of the top level child node is of a given type ("gpx", "kml").
1009
+ * The check is not case sensitive.
1010
+ * @param doc
1011
+ * @param nodeName
1012
+ * @returns
1013
+ */
1014
+ declare function hasChildNodeWithName(doc: Document, nodeName: string): boolean;
1015
+ /**
1016
+ * create a function that converts a XML to a string
1017
+ * https://developer.mozilla.org/en-US/docs/Web/API/XMLSerializer
1018
+ */
1019
+ declare function xml2str(node: Node): string;
1020
+ /**
1021
+ * Given a XML document using the GPX spec, return GeoJSON
1022
+ */
1023
+ declare function gpx(doc: string | Document): GeoJSON.FeatureCollection;
1024
+ /**
1025
+ * Given a XML document using the KML spec, return GeoJSON
1026
+ */
1027
+ declare function kml(doc: string | Document, xml2string?: (node: Node) => string): GeoJSON.FeatureCollection;
1028
+ declare function gpxOrKml(doc: string | Document): GeoJSON.FeatureCollection | null;
1029
+
1030
+ type RgbaColor = [number, number, number] | [number, number, number, number];
1031
+ type ColorStop = {
1032
+ /**
1033
+ * The "value" at which this ColorStop should be applied.
1034
+ */
1035
+ value: number;
1036
+ /**
1037
+ * RGB[A] - Array of 3-4 numbers. 0-255 per channel.
1038
+ */
1039
+ color: RgbaColor;
1040
+ };
1041
+ /**
1042
+ * A RGBA color as per the array definition
1043
+ */
1044
+ type ArrayColor = [number, number, number, number];
1045
+ /**
1046
+ * A color ramp stop as per array definition
1047
+ */
1048
+ type ArrayColorRampStop = [
1049
+ /**
1050
+ * Real world value in a real world unit
1051
+ */
1052
+ number,
1053
+ /**
1054
+ * Color RGBA
1055
+ */
1056
+ ArrayColor
1057
+ ];
1058
+ /**
1059
+ * A color ramp as per array definition
1060
+ */
1061
+ type ArrayColorRamp = Array<ArrayColorRampStop>;
1062
+ type ColorRampOptions = {
1063
+ /**
1064
+ * The value the colorramp starts
1065
+ */
1066
+ min?: number;
1067
+ /**
1068
+ * The value the colorramp ends
1069
+ */
1070
+ max?: number;
1071
+ /**
1072
+ * Some color stops to copy from
1073
+ */
1074
+ stops?: Array<ColorStop>;
1075
+ };
1076
+ declare class ColorRamp extends Array<ColorStop> {
1077
+ /**
1078
+ * Converts a array-definition color ramp definition into a usable ColorRamp instance.
1079
+ * Note: units are not converted and may need to to be converted beforehand (eg. kelvin to centigrade)
1080
+ * @param cr
1081
+ * @returns
1082
+ */
1083
+ static fromArrayDefinition(cr: ArrayColorRamp): ColorRamp;
1084
+ private min;
1085
+ private max;
1086
+ constructor(options?: ColorRampOptions);
1087
+ setStops(stops: Array<ColorStop>, options?: {
1088
+ clone?: boolean;
1089
+ }): ColorRamp;
1090
+ scale(min: number, max: number, options?: {
1091
+ clone?: boolean;
1092
+ }): ColorRamp;
1093
+ at(pos: number): ColorStop;
1094
+ clone(): ColorRamp;
1095
+ getRawColorStops(): Array<ColorStop>;
1096
+ reverse(options?: {
1097
+ clone?: boolean;
1098
+ }): ColorRamp;
1099
+ getBounds(): {
1100
+ min: number;
1101
+ max: number;
1102
+ };
1103
+ getColor(value: number, options?: {
1104
+ smooth?: boolean;
1105
+ }): RgbaColor;
1106
+ /**
1107
+ * Get the color as an hexadecimal string
1108
+ */
1109
+ getColorHex(value: number, options?: {
1110
+ smooth?: boolean;
1111
+ withAlpha?: boolean;
1112
+ }): string;
1113
+ /**
1114
+ * Get the color of the color ramp at a relative position in [0, 1]
1115
+ */
1116
+ getColorRelative(value: number, options?: {
1117
+ smooth?: boolean;
1118
+ }): RgbaColor;
1119
+ getCanvasStrip(options?: {
1120
+ horizontal?: boolean;
1121
+ size?: number;
1122
+ smooth?: boolean;
1123
+ }): HTMLCanvasElement;
1124
+ /**
1125
+ * Apply a non-linear ressampling. This will create a new instance of ColorRamp with the same bounds.
1126
+ */
1127
+ resample(method: "ease-in-square" | "ease-out-square" | "ease-in-sqrt" | "ease-out-sqrt" | "ease-in-exp" | "ease-out-exp", samples?: number): ColorRamp;
1128
+ /**
1129
+ * Makes a clone of this color ramp that is fully transparant at the begining of their range
1130
+ */
1131
+ transparentStart(): ColorRamp;
1132
+ /**
1133
+ * Check if this color ramp has a transparent start
1134
+ */
1135
+ hasTransparentStart(): boolean;
1136
+ }
1137
+ /**
1138
+ * This is a collection of built-in color ramps. They are all defined in the range [0, 1]
1139
+ * but can be scaled or reversed to fit specific usages.
1140
+ */
1141
+ declare const ColorRampCollection: {
1142
+ /**
1143
+ * A fully transparent [0, 0, 0, 0] colorramp to hide data.
1144
+ * Defined in interval [0, 1], without unit.
1145
+ */
1146
+ NULL: ColorRamp;
1147
+ GRAY: ColorRamp;
1148
+ /**
1149
+ * Classic jet color ramp.
1150
+ * Defined in interval [0, 1], without unit.
1151
+ */
1152
+ JET: ColorRamp;
1153
+ /**
1154
+ * Classic HSV color ramp (hue, saturation, value).
1155
+ * Defined in interval [0, 1], without unit.
1156
+ */
1157
+ HSV: ColorRamp;
1158
+ /**
1159
+ * Classic hot color ramp.
1160
+ * Defined in interval [0, 1], without unit.
1161
+ */
1162
+ HOT: ColorRamp;
1163
+ /**
1164
+ * Classic spring color ramp.
1165
+ * Defined in interval [0, 1], without unit.
1166
+ */
1167
+ SPRING: ColorRamp;
1168
+ /**
1169
+ * Classic summer color ramp.
1170
+ * Defined in interval [0, 1], without unit.
1171
+ */
1172
+ SUMMER: ColorRamp;
1173
+ /**
1174
+ * Classic autommn color ramp.
1175
+ * Defined in interval [0, 1], without unit.
1176
+ */
1177
+ AUTOMN: ColorRamp;
1178
+ /**
1179
+ * Classic winter color ramp.
1180
+ * Defined in interval [0, 1], without unit.
1181
+ */
1182
+ WINTER: ColorRamp;
1183
+ /**
1184
+ * Classic bone color ramp.
1185
+ * Defined in interval [0, 1], without unit.
1186
+ */
1187
+ BONE: ColorRamp;
1188
+ /**
1189
+ * Classic copper color ramp.
1190
+ * Defined in interval [0, 1], without unit.
1191
+ */
1192
+ COPPER: ColorRamp;
1193
+ /**
1194
+ * Classic greys color ramp.
1195
+ * Defined in interval [0, 1], without unit.
1196
+ */
1197
+ GREYS: ColorRamp;
1198
+ /**
1199
+ * Classic yignbu color ramp (blue to light yellow).
1200
+ * Defined in interval [0, 1], without unit.
1201
+ */
1202
+ YIGNBU: ColorRamp;
1203
+ /**
1204
+ * Classic greens color ramp.
1205
+ * Defined in interval [0, 1], without unit.
1206
+ */
1207
+ GREENS: ColorRamp;
1208
+ /**
1209
+ * Classic yiorrd color ramp (red to light yellow).
1210
+ * Defined in interval [0, 1], without unit.
1211
+ */
1212
+ YIORRD: ColorRamp;
1213
+ /**
1214
+ * Classic blue-red color ramp.
1215
+ * Defined in interval [0, 1], without unit.
1216
+ */
1217
+ BLUERED: ColorRamp;
1218
+ /**
1219
+ * Classic rdbu color ramp.
1220
+ * Defined in interval [0, 1], without unit.
1221
+ */
1222
+ RDBU: ColorRamp;
1223
+ /**
1224
+ * Classic picnic color ramp.
1225
+ * Defined in interval [0, 1], without unit.
1226
+ */
1227
+ PICNIC: ColorRamp;
1228
+ /**
1229
+ * Classic rainbow color ramp.
1230
+ * Defined in interval [0, 1], without unit.
1231
+ */
1232
+ RAINBOW: ColorRamp;
1233
+ /**
1234
+ * Classic Portland color ramp.
1235
+ * Defined in interval [0, 1], without unit.
1236
+ */
1237
+ PORTLAND: ColorRamp;
1238
+ /**
1239
+ * Classic blackbody color ramp.
1240
+ * Defined in interval [0, 1], without unit.
1241
+ */
1242
+ BLACKBODY: ColorRamp;
1243
+ /**
1244
+ * Classic earth color ramp.
1245
+ * Defined in interval [0, 1], without unit.
1246
+ */
1247
+ EARTH: ColorRamp;
1248
+ /**
1249
+ * Classic electric color ramp.
1250
+ * Defined in interval [0, 1], without unit.
1251
+ */
1252
+ ELECTRIC: ColorRamp;
1253
+ /**
1254
+ * Classic viridis color ramp.
1255
+ * Defined in interval [0, 1], without unit.
1256
+ */
1257
+ VIRIDIS: ColorRamp;
1258
+ /**
1259
+ * Classic inferno color ramp.
1260
+ * Defined in interval [0, 1], without unit.
1261
+ */
1262
+ INFERNO: ColorRamp;
1263
+ /**
1264
+ * Classic magma color ramp.
1265
+ * Defined in interval [0, 1], without unit.
1266
+ */
1267
+ MAGMA: ColorRamp;
1268
+ /**
1269
+ * Classic plasma color ramp.
1270
+ * Defined in interval [0, 1], without unit.
1271
+ */
1272
+ PLASMA: ColorRamp;
1273
+ /**
1274
+ * Classic warm color ramp.
1275
+ * Defined in interval [0, 1], without unit.
1276
+ */
1277
+ WARM: ColorRamp;
1278
+ /**
1279
+ * Classic cool color ramp.
1280
+ * Defined in interval [0, 1], without unit.
1281
+ */
1282
+ COOL: ColorRamp;
1283
+ /**
1284
+ * Classic rainboz soft color ramp.
1285
+ * Defined in interval [0, 1], without unit.
1286
+ */
1287
+ RAINBOW_SOFT: ColorRamp;
1288
+ /**
1289
+ * Classic bathymetry color ramp.
1290
+ * Defined in interval [0, 1], without unit.
1291
+ */
1292
+ BATHYMETRY: ColorRamp;
1293
+ /**
1294
+ * Classic cdom color ramp.
1295
+ * Defined in interval [0, 1], without unit.
1296
+ */
1297
+ CDOM: ColorRamp;
1298
+ /**
1299
+ * Classic chlorophyll color ramp.
1300
+ * Defined in interval [0, 1], without unit.
1301
+ */
1302
+ CHLOROPHYLL: ColorRamp;
1303
+ /**
1304
+ * Classic density color ramp.
1305
+ * Defined in interval [0, 1], without unit.
1306
+ */
1307
+ DENSITY: ColorRamp;
1308
+ /**
1309
+ * Classic freesurface blue color ramp.
1310
+ * Defined in interval [0, 1], without unit.
1311
+ */
1312
+ FREESURFACE_BLUE: ColorRamp;
1313
+ /**
1314
+ * Classic freesurface red color ramp.
1315
+ * Defined in interval [0, 1], without unit.
1316
+ */
1317
+ FREESURFACE_RED: ColorRamp;
1318
+ /**
1319
+ * Classic oxygen color ramp.
1320
+ * Defined in interval [0, 1], without unit.
1321
+ */
1322
+ OXYGEN: ColorRamp;
1323
+ /**
1324
+ * Classic par color ramp.
1325
+ * Defined in interval [0, 1], without unit.
1326
+ */
1327
+ PAR: ColorRamp;
1328
+ /**
1329
+ * Classic phase color ramp.
1330
+ * Defined in interval [0, 1], without unit.
1331
+ */
1332
+ PHASE: ColorRamp;
1333
+ /**
1334
+ * Classic salinity color ramp.
1335
+ * Defined in interval [0, 1], without unit.
1336
+ */
1337
+ SALINITY: ColorRamp;
1338
+ /**
1339
+ * Classic temperature color ramp.
1340
+ * Defined in interval [0, 1], without unit.
1341
+ */
1342
+ TEMPERATURE: ColorRamp;
1343
+ /**
1344
+ * Classic turbidity color ramp.
1345
+ * Defined in interval [0, 1], without unit.
1346
+ */
1347
+ TURBIDITY: ColorRamp;
1348
+ /**
1349
+ * Classic velocity blue color ramp.
1350
+ * Defined in interval [0, 1], without unit.
1351
+ */
1352
+ VELOCITY_BLUE: ColorRamp;
1353
+ /**
1354
+ * Classic velocity green color ramp.
1355
+ * Defined in interval [0, 1], without unit.
1356
+ */
1357
+ VELOCITY_GREEN: ColorRamp;
1358
+ /**
1359
+ * Classic cube helix color ramp.
1360
+ * Defined in interval [0, 1], without unit.
1361
+ */
1362
+ CUBEHELIX: ColorRamp;
1363
+ /**
1364
+ * The cividis color ramp is color blind friendly.
1365
+ * Read more here https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0199239
1366
+ * Defined in interval [0, 1], without unit.
1367
+ */
1368
+ CIVIDIS: ColorRamp;
1369
+ /**
1370
+ * Classic turbo color ramp.
1371
+ * This is a luminance-constant alternative to the jet, making it more
1372
+ * clor-blind friendly.
1373
+ * Defined in interval [0, 1], without unit.
1374
+ */
1375
+ TURBO: ColorRamp;
1376
+ /**
1377
+ * The rocket color ramp is perceptually uniform, which makes it more
1378
+ * color bliend friendly than the classic magma color ramp.
1379
+ * Defined in interval [0, 1], without unit.
1380
+ */
1381
+ ROCKET: ColorRamp;
1382
+ /**
1383
+ * The mako color ramp is perceptually uniform and can be seen as
1384
+ * a color blind friendly alternative to bathymetry or yignbu.
1385
+ * Defined in interval [0, 1], without unit.
1386
+ */
1387
+ MAKO: ColorRamp;
1388
+ };
1389
+
1390
+ /**
1391
+ * Array of string values that depend on zoom level
1392
+ */
1393
+ type ZoomStringValues = Array<{
1394
+ /**
1395
+ * Zoom level
1396
+ */
1397
+ zoom: number;
1398
+ /**
1399
+ * Value for the given zoom level
1400
+ */
1401
+ value: string;
1402
+ }>;
1403
+ /**
1404
+ *
1405
+ * Array of number values that depend on zoom level
1406
+ */
1407
+ type ZoomNumberValues = Array<{
1408
+ /**
1409
+ * Zoom level
1410
+ */
1411
+ zoom: number;
1412
+ /**
1413
+ * Value for the given zoom level
1414
+ */
1415
+ value: number;
1416
+ }>;
1417
+ type PropertyValues = Array<{
1418
+ /**
1419
+ * Value of the property (input)
1420
+ */
1421
+ propertyValue: number;
1422
+ /**
1423
+ * Value to associate it with (output)
1424
+ */
1425
+ value: number;
1426
+ }>;
1427
+ type CommonShapeLayerOptions = {
1428
+ /**
1429
+ * ID to give to the layer.
1430
+ * If not provided, an auto-generated ID of the for "maptiler-layer-xxxxxx" will be auto-generated,
1431
+ * with "xxxxxx" being a random string.
1432
+ */
1433
+ layerId?: string;
1434
+ /**
1435
+ * ID to give to the geojson source.
1436
+ * If not provided, an auto-generated ID of the for "maptiler-source-xxxxxx" will be auto-generated,
1437
+ * with "xxxxxx" being a random string.
1438
+ */
1439
+ sourceId?: string;
1440
+ /**
1441
+ * A geojson Feature collection or a URL to a geojson or the UUID of a MapTiler Cloud dataset.
1442
+ */
1443
+ data: FeatureCollection | string;
1444
+ /**
1445
+ * The ID of an existing layer to insert the new layer before, resulting in the new layer appearing
1446
+ * visually beneath the existing layer. If this argument is not specified, the layer will be appended
1447
+ * to the end of the layers array and appear visually above all other layers.
1448
+ */
1449
+ beforeId?: string;
1450
+ /**
1451
+ * Zoom level at which it starts to show.
1452
+ * Default: `0`
1453
+ */
1454
+ minzoom?: number;
1455
+ /**
1456
+ * Zoom level after which it no longer show.
1457
+ * Default: `22`
1458
+ */
1459
+ maxzoom?: number;
1460
+ /**
1461
+ * Whether or not to add an outline.
1462
+ * Default: `false`
1463
+ */
1464
+ outline?: boolean;
1465
+ /**
1466
+ * Color of the outline. This is can be a constant color string or a definition based on zoom levels.
1467
+ * Applies only if `.outline` is `true`.
1468
+ * Default: `white`
1469
+ */
1470
+ outlineColor?: string | ZoomStringValues;
1471
+ /**
1472
+ * Width of the outline (relative to screen-space). This is can be a constant width or a definition based on zoom levels.
1473
+ * Applies only if `.outline` is `true`.
1474
+ * Default: `1`
1475
+ */
1476
+ outlineWidth?: number | ZoomNumberValues;
1477
+ /**
1478
+ * Opacity of the outline. This is can be a constant opacity in [0, 1] or a definition based on zoom levels
1479
+ * Applies only if `.outline` is `true`.
1480
+ * Default: `1`
1481
+ */
1482
+ outlineOpacity?: number | ZoomNumberValues;
1483
+ };
1484
+ type PolylineLayerOptions = CommonShapeLayerOptions & {
1485
+ /**
1486
+ * Color of the line (or polyline). This is can be a constant color string or a definition based on zoom levels.
1487
+ * Default: a color randomly pick from a list
1488
+ */
1489
+ lineColor?: string | ZoomStringValues;
1490
+ /**
1491
+ * Width of the line (relative to screen-space). This is can be a constant width or a definition based on zoom levels
1492
+ * Default: `3`
1493
+ */
1494
+ lineWidth?: number | ZoomNumberValues;
1495
+ /**
1496
+ * Opacity of the line. This is can be a constant opacity in [0, 1] or a definition based on zoom levels.
1497
+ * Default: `1`
1498
+ */
1499
+ lineOpacity?: number | ZoomNumberValues;
1500
+ /**
1501
+ * How blury the line is, with `0` being no blur and `10` and beyond being quite blurry.
1502
+ * Default: `0`
1503
+ */
1504
+ lineBlur?: number | ZoomNumberValues;
1505
+ /**
1506
+ * Draws a line casing outside of a line's actual path. Value indicates the width of the inner gap.
1507
+ * Default: `0`
1508
+ */
1509
+ lineGapWidth?: number | ZoomNumberValues;
1510
+ /**
1511
+ * Sequence of line and void to create a dash pattern. The unit is the line width so that
1512
+ * a dash array value of `[3, 1]` will create a segment worth 3 times the width of the line,
1513
+ * followed by a spacing worth 1 time the line width, and then repeat.
1514
+ *
1515
+ * Alternatively, this property can be a string made of underscore and whitespace characters
1516
+ * such as `"___ _ "` and internaly this will be translated into [3, 1, 1, 1]. Note that
1517
+ * this way of describing dash arrays with a string only works for integer values.
1518
+ *
1519
+ * Dash arrays can contain more than 2 element to create more complex patters. For instance
1520
+ * a dash array value of [3, 2, 1, 2] will create the following sequence:
1521
+ * - a segment worth 3 times the width
1522
+ * - a spacing worth 2 times the width
1523
+ * - a segment worth 1 times the width
1524
+ * - a spacing worth 2 times the width
1525
+ * - repeat
1526
+ *
1527
+ * Default: no dash pattern
1528
+ */
1529
+ lineDashArray?: Array<number> | string;
1530
+ /**
1531
+ * The display of line endings for both the line and the outline (if `.outline` is `true`)
1532
+ * - "butt": A cap with a squared-off end which is drawn to the exact endpoint of the line.
1533
+ * - "round": A cap with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line.
1534
+ * - "square": A cap with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width.
1535
+ * Default: "round"
1536
+ */
1537
+ lineCap?: "butt" | "round" | "square";
1538
+ /**
1539
+ * The display of lines when joining for both the line and the outline (if `.outline` is `true`)
1540
+ * - "bevel": A join with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width.
1541
+ * - "round": A join with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line.
1542
+ * - "miter": A join with a sharp, angled corner which is drawn with the outer sides beyond the endpoint of the path until they meet.
1543
+ * Default: "round"
1544
+ */
1545
+ lineJoin?: "bevel" | "round" | "miter";
1546
+ /**
1547
+ * How blury the outline is, with `0` being no blur and `10` and beyond being quite blurry.
1548
+ * Applies only if `.outline` is `true`.
1549
+ * Default: `0`
1550
+ */
1551
+ outlineBlur?: number | ZoomNumberValues;
1552
+ };
1553
+ type PolygonLayerOptions = CommonShapeLayerOptions & {
1554
+ /**
1555
+ * Color of the polygon. This is can be a constant color string or a definition based on zoom levels.
1556
+ * Default: a color randomly pick from a list
1557
+ */
1558
+ fillColor?: string | ZoomStringValues;
1559
+ /**
1560
+ * Opacity of the polygon. This is can be a constant opacity in [0, 1] or a definition based on zoom levels
1561
+ * Default: `1`
1562
+ */
1563
+ fillOpacity?: ZoomNumberValues;
1564
+ /**
1565
+ * Position of the outline with regard to the polygon edge (when `.outline` is `true`)
1566
+ * Default: `"center"`
1567
+ */
1568
+ outlinePosition: "center" | "inside" | "outside";
1569
+ /**
1570
+ * Sequence of line and void to create a dash pattern. The unit is the line width so that
1571
+ * a dash array value of `[3, 1]` will create a segment worth 3 times the width of the line,
1572
+ * followed by a spacing worth 1 time the line width, and then repeat.
1573
+ *
1574
+ * Alternatively, this property can be a string made of underscore and whitespace characters
1575
+ * such as `"___ _ "` and internaly this will be translated into [3, 1, 1, 1]. Note that
1576
+ * this way of describing dash arrays with a string only works for integer values.
1577
+ *
1578
+ * Dash arrays can contain more than 2 element to create more complex patters. For instance
1579
+ * a dash array value of [3, 2, 1, 2] will create the following sequence:
1580
+ * - a segment worth 3 times the width
1581
+ * - a spacing worth 2 times the width
1582
+ * - a segment worth 1 times the width
1583
+ * - a spacing worth 2 times the width
1584
+ * - repeat
1585
+ *
1586
+ * Default: no dash pattern
1587
+ */
1588
+ outlineDashArray?: Array<number> | string;
1589
+ /**
1590
+ * The display of line endings for both the line and the outline (if `.outline` is `true`)
1591
+ * - "butt": A cap with a squared-off end which is drawn to the exact endpoint of the line.
1592
+ * - "round": A cap with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line.
1593
+ * - "square": A cap with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width.
1594
+ * Default: "round"
1595
+ */
1596
+ outlineCap?: "butt" | "round" | "square";
1597
+ /**
1598
+ * The display of lines when joining for both the line and the outline (if `.outline` is `true`)
1599
+ * - "bevel": A join with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width.
1600
+ * - "round": A join with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line.
1601
+ * - "miter": A join with a sharp, angled corner which is drawn with the outer sides beyond the endpoint of the path until they meet.
1602
+ * Default: "round"
1603
+ */
1604
+ outlineJoin?: "bevel" | "round" | "miter";
1605
+ /**
1606
+ * The pattern is an image URL to be put as a repeated background pattern of the polygon.
1607
+ * Default: `null` (no pattern, `fillColor` will be used)
1608
+ */
1609
+ pattern?: string | null;
1610
+ /**
1611
+ * How blury the outline is, with `0` being no blur and `10` and beyond being quite blurry.
1612
+ * Applies only if `.outline` is `true`.
1613
+ * Default: `0`
1614
+ */
1615
+ outlineBlur?: number | ZoomNumberValues;
1616
+ };
1617
+ type PointLayerOptions = CommonShapeLayerOptions & {
1618
+ /**
1619
+ * Can be a unique point color as a string (CSS color such as "#FF0000" or "red").
1620
+ * Alternatively, the color can be a ColorRamp with a range.
1621
+ * In case of `.cluster` being `true`, the range of the ColorRamp will be addressed with the number of elements in
1622
+ * the cluster. If `.cluster` is `false`, the color will be addressed using the value of the `.property`.
1623
+ * If no `.property` is given but `.pointColor` is a ColorRamp, the chosen color is the one at the lower bound of the ColorRamp.
1624
+ * Default: a color randomly pick from a list
1625
+ */
1626
+ pointColor?: string | ColorRamp;
1627
+ /**
1628
+ * Radius of the points. Can be a fixed size or a value dependant on the zoom.
1629
+ * If `.pointRadius` is not provided, the radius will depend on the size of each cluster (if `.cluster` is `true`)
1630
+ * or on the value of each point (if `.property` is provided and `.pointColor` is a ColorRamp).
1631
+ * The radius will be between `.minPointRadius` and `.maxPointRadius`
1632
+ */
1633
+ pointRadius?: number | ZoomNumberValues;
1634
+ /**
1635
+ * The minimum point radius posible.
1636
+ * Default: `10`
1637
+ */
1638
+ minPointRadius?: number;
1639
+ /**
1640
+ * The maximum point radius posible.
1641
+ * Default: `40`
1642
+ */
1643
+ maxPointRadius?: number;
1644
+ /**
1645
+ * The point property to observe and apply the radius and color upon.
1646
+ * This is ignored if `.cluster` is `true` as the observed value will be fiorced to being the number
1647
+ * of elements in each cluster.
1648
+ *
1649
+ * Default: none
1650
+ */
1651
+ property?: string;
1652
+ /**
1653
+ * Opacity of the point or icon. This is can be a constant opacity in [0, 1] or a definition based on zoom levels.
1654
+ * Alternatively, if not provided but the `.pointColor` is a ColorRamp, the opacity will be extracted from tha alpha
1655
+ * component if present.
1656
+ * Default: `1`
1657
+ */
1658
+ pointOpacity?: number | ZoomNumberValues;
1659
+ /**
1660
+ * If `true`, the points will keep their circular shape align with the wiewport.
1661
+ * If `false`, the points will be like flatten on the map. This difference shows
1662
+ * when the map is tilted.
1663
+ * Default: `true`
1664
+ */
1665
+ alignOnViewport?: boolean;
1666
+ /**
1667
+ * Whether the points should cluster
1668
+ */
1669
+ cluster?: boolean;
1670
+ /**
1671
+ * Shows a label with the numerical value id `true`.
1672
+ * If `.cluster` is `true`, the value will be the numebr of elements in the cluster.
1673
+ *
1674
+ *
1675
+ * Default: `true` if `cluster` or `dataDrivenStyleProperty` are used, `false` otherwise.
1676
+ */
1677
+ showLabel?: boolean;
1678
+ /**
1679
+ * text color used for the number elements in each cluster.
1680
+ * Applicable only when `cluster` is `true`.
1681
+ * Default: `#000000` (black)
1682
+ */
1683
+ labelColor?: string;
1684
+ /**
1685
+ * text size used for the number elements in each cluster.
1686
+ * Applicable only when `cluster` is `true`.
1687
+ * Default: `12`
1688
+ */
1689
+ labelSize?: number;
1690
+ /**
1691
+ * Only if `.cluster` is `false`.
1692
+ * If the radius is driven by a property, then it will also scale by zoomming if `.zoomCompensation` is `true`.
1693
+ * If `false`, the radius will not adapt according to the zoom level.
1694
+ * Default: `true`
1695
+ */
1696
+ zoomCompensation?: boolean;
1697
+ };
1698
+ type HeatmapLayerOptions = {
1699
+ /**
1700
+ * ID to give to the layer.
1701
+ * If not provided, an auto-generated ID of the for "maptiler-layer-xxxxxx" will be auto-generated,
1702
+ * with "xxxxxx" being a random string.
1703
+ */
1704
+ layerId?: string;
1705
+ /**
1706
+ * ID to give to the geojson source.
1707
+ * If not provided, an auto-generated ID of the for "maptiler-source-xxxxxx" will be auto-generated,
1708
+ * with "xxxxxx" being a random string.
1709
+ */
1710
+ sourceId?: string;
1711
+ /**
1712
+ * A geojson Feature collection or a URL to a geojson or the UUID of a MapTiler Cloud dataset.
1713
+ */
1714
+ data: FeatureCollection | string;
1715
+ /**
1716
+ * The ID of an existing layer to insert the new layer before, resulting in the new layer appearing
1717
+ * visually beneath the existing layer. If this argument is not specified, the layer will be appended
1718
+ * to the end of the layers array and appear visually above all other layers.
1719
+ */
1720
+ beforeId?: string;
1721
+ /**
1722
+ * Zoom level at which it starts to show.
1723
+ * Default: `0`
1724
+ */
1725
+ minzoom?: number;
1726
+ /**
1727
+ * Zoom level after which it no longer show.
1728
+ * Default: `22`
1729
+ */
1730
+ maxzoom?: number;
1731
+ /**
1732
+ * The ColorRamp instance to use for visualization. The color ramp is expected to be defined in the
1733
+ * range `[0, 1]` or else will be forced to this range.
1734
+ * Default: `ColorRampCollection.TURBO`
1735
+ */
1736
+ colorRamp?: ColorRamp;
1737
+ /**
1738
+ * Use a property to apply a weight to each data point. Using a property requires also using
1739
+ * the options `.propertyValueWeight` or otherwise will be ignored.
1740
+ * Default: none, the points will all have a weight of `1`.
1741
+ */
1742
+ property?: string;
1743
+ /**
1744
+ * The weight to give to each data point. If of type `PropertyValueWeights`, then the options `.property`
1745
+ * must also be provided. If used a number, all data points will be weighted by the same number (which is of little interest)
1746
+ */
1747
+ weight?: PropertyValues | number;
1748
+ /**
1749
+ * The radius (in screenspace) can be:
1750
+ * - a fixed number that will be constant across zoom level
1751
+ * - of type `ZoomNumberValues` to be ramped accoding to zoom level (`.zoomCompensation` will then be ignored)
1752
+ * - of type `PropertyValues` to be driven by the value of a property.
1753
+ * If so, the option `.property` must be provided and will still be resized according to zoom level,
1754
+ * unless the option `.zoomCompensation` is set to `false`.
1755
+ *
1756
+ * Default:
1757
+ */
1758
+ radius?: number | ZoomNumberValues | PropertyValues;
1759
+ /**
1760
+ * The opacity can be a fixed value or zoom-driven.
1761
+ * Default: fades-in 0.25z after minzoom and fade-out 0.25z before maxzoom
1762
+ */
1763
+ opacity?: number | ZoomNumberValues;
1764
+ /**
1765
+ * The intensity is zoom-dependent. By default, the intensity is going to be scaled by zoom to preserve
1766
+ * a natural aspect or the data distribution.
1767
+ */
1768
+ intensity?: number | ZoomNumberValues;
1769
+ /**
1770
+ * If the radius is driven by a property, then it will also scale by zoomming if `.zoomCompensation` is `true`.
1771
+ * If `false`, the radius will not adapt according to the zoom level.
1772
+ * Default: `true`
1773
+ */
1774
+ zoomCompensation?: boolean;
1775
+ };
1776
+ /**
1777
+ * Add a polyline to the map from various sources and with builtin styling.
1778
+ * Compatible sources:
1779
+ * - gpx content as string
1780
+ * - gpx file from URL
1781
+ * - kml content from string
1782
+ * - kml from url
1783
+ * - geojson from url
1784
+ * - geojson content as string
1785
+ * - geojson content as JS object
1786
+ * - uuid of a MapTiler Cloud dataset
1787
+ *
1788
+ * The method also gives the possibility to add an outline layer (if `options.outline` is `true`)
1789
+ * and if so , the returned property `polylineOutlineLayerId` will be a string. As a result, two layers
1790
+ * would be added.
1791
+ *
1792
+ * The default styling creates a line layer of constant width of 3px, the color will be randomly picked
1793
+ * from a curated list of colors and the opacity will be 1.
1794
+ * If the outline is enabled, the outline width is of 1px at all zoom levels, the color is white and
1795
+ * the opacity is 1.
1796
+ *
1797
+ * Those style properties can be changed and ramped according to zoom level using an easier syntax.
1798
+ *
1799
+ */
1800
+ declare function addPolyline(
1801
+ /**
1802
+ * Map instance to add a polyline layer to
1803
+ */
1804
+ map: Map,
1805
+ /**
1806
+ * Options related to adding a polyline layer
1807
+ */
1808
+ options: PolylineLayerOptions,
1809
+ /**
1810
+ * When the polyline data is loaded from a distant source, these options are propagated to the call of `fetch`
1811
+ */
1812
+ fetchOptions?: RequestInit): Promise<{
1813
+ polylineLayerId: string;
1814
+ polylineOutlineLayerId: string;
1815
+ polylineSourceId: string;
1816
+ }>;
1817
+ /**
1818
+ * Add a polygon with styling options.
1819
+ */
1820
+ declare function addPolygon(map: Map, options: PolygonLayerOptions): {
1821
+ /**
1822
+ * ID of the fill layer
1823
+ */
1824
+ polygonLayerId: string;
1825
+ /**
1826
+ * ID of the outline layer (will be `""` if no outline)
1827
+ */
1828
+ polygonOutlineLayerId: string;
1829
+ /**
1830
+ * ID of the source that contains the data
1831
+ */
1832
+ polygonSourceId: string;
1833
+ };
1834
+ /**
1835
+ * Add a point layer from a GeoJSON source (or an existing sourceId) with many styling options
1836
+ */
1837
+ declare function addPoint(
1838
+ /**
1839
+ * The Map instance to add a point layer to
1840
+ */
1841
+ map: Map, options: PointLayerOptions): {
1842
+ /**
1843
+ * ID of the unclustered point layer
1844
+ */
1845
+ pointLayerId: string;
1846
+ /**
1847
+ * ID of the clustered point layer (empty if `cluster` options id `false`)
1848
+ */
1849
+ clusterLayerId: string;
1850
+ /**
1851
+ * ID of the layer that shows the count of elements in each cluster (empty if `cluster` options id `false`)
1852
+ */
1853
+ labelLayerId: string;
1854
+ /**
1855
+ * ID of the data source
1856
+ */
1857
+ pointSourceId: string;
1858
+ };
1859
+ /**
1860
+ * Add a polyline witgh optional outline from a GeoJSON object
1861
+ */
1862
+ declare function addHeatmap(
1863
+ /**
1864
+ * Map instance to add a heatmap layer to
1865
+ */
1866
+ map: Map, options: HeatmapLayerOptions): {
1867
+ /**
1868
+ * ID of the heatmap layer
1869
+ */
1870
+ heatmapLayerId: string;
1871
+ /**
1872
+ * ID of the data source
1873
+ */
1874
+ heatmapSourceId: string;
1875
+ };
1876
+
1877
+ /**
1878
+ * Helpers are a set of functions to facilitate the creation of sources and layers
1879
+ */
1880
+ declare const helpers: {
1881
+ addPolyline: typeof addPolyline;
1882
+ addPolygon: typeof addPolygon;
1883
+ addPoint: typeof addPoint;
1884
+ addHeatmap: typeof addHeatmap;
1885
+ };
1886
+
1887
+ declare const setRTLTextPlugin: (url: string, callback: (error?: Error | undefined) => void, deferred?: boolean | undefined) => void;
786
1888
  declare const getRTLTextPluginStatus: () => string;
787
1889
  declare const prewarm: () => void;
788
1890
  declare const clearPrewarmedResources: () => void;
@@ -790,8 +1892,8 @@ declare const version: string;
790
1892
  declare const workerCount: number;
791
1893
  declare const maxParallelImageRequests: number;
792
1894
  declare const workerUrl: string;
793
- declare const addProtocol: (customProtocol: string, loadFn: (requestParameters: maplibre_gl.RequestParameters, callback: maplibre_gl.ResponseCallback<any>) => maplibre_gl.Cancelable) => void;
794
- declare const removeProtocol: (customProtocol: string) => void;
1895
+ declare const addProtocol: typeof maplibre_gl__default.addProtocol;
1896
+ declare const removeProtocol: typeof maplibre_gl__default.removeProtocol;
795
1897
 
796
1898
  declare const NavigationControlMLGL: typeof maplibre_gl.NavigationControl;
797
1899
  type NavigationControlMLGL = InstanceType<typeof NavigationControlMLGL>;
@@ -840,4 +1942,4 @@ type VideoSourceMLGL = InstanceType<typeof VideoSourceMLGL>;
840
1942
  declare const MapMLGL: typeof maplibre_gl.Map;
841
1943
  type MapMLGL = InstanceType<typeof MapMLGL>;
842
1944
 
843
- export { AJAXError, AttributionControl, AttributionControlMLGL, CanvasSource, CanvasSourceMLGL, Evented, FullscreenControl, FullscreenControlMLGL, GeoJSONSource, GeoJSONSourceMLGL, GeolocateControl, GeolocateControlMLGL, GeolocationType, ImageSource, ImageSourceMLGL, Language, LanguageKey, LanguageString, LngLat, LngLatBounds, LoadWithTerrainEvent, LogoControl, LogoControlMLGL, Map, MapMLGL, MapOptions, MaptilerGeolocateControl, MaptilerLogoControl, MaptilerNavigationControl, MaptilerTerrainControl, Marker, MarkerMLGL, Matrix2, MercatorCoordinate, NavigationControl, NavigationControlMLGL, Point, Popup, PopupMLGL, RasterDEMTileSource, RasterDEMTileSourceMLGL, RasterTileSource, RasterTileSourceMLGL, ScaleControl, ScaleControlMLGL, SdkConfig, Style, StyleMLGL, TerrainControl, TerrainControlMLGL, Unit, VectorTileSource, VectorTileSourceMLGL, VideoSource, VideoSourceMLGL, addProtocol, clearPrewarmedResources, config, getRTLTextPluginStatus, maxParallelImageRequests, prewarm, removeProtocol, setRTLTextPlugin, version, workerCount, workerUrl };
1945
+ export { AJAXError, ArrayColor, ArrayColorRamp, ArrayColorRampStop, AttributionControl, AttributionControlMLGL, CanvasSource, CanvasSourceMLGL, ColorRamp, ColorRampCollection, ColorRampOptions, ColorStop, CommonShapeLayerOptions, Evented, FullscreenControl, FullscreenControlMLGL, GeoJSONSource, GeoJSONSourceMLGL, GeolocateControl, GeolocateControlMLGL, GeolocationType, HeatmapLayerOptions, ImageSource, ImageSourceMLGL, Language, LanguageKey, LanguageString, Link, LngLat, LngLatBounds, LoadWithTerrainEvent, LogoControl, LogoControlMLGL, Map, MapMLGL, MapOptions, MaptilerGeolocateControl, MaptilerLogoControl, MaptilerNavigationControl, MaptilerTerrainControl, Marker, MarkerMLGL, Matrix2, MercatorCoordinate, MinimapOptions, MinimapOptionsInput, NavigationControl, NavigationControlMLGL, ParentRect, PlacemarkProperties, Point, PointLayerOptions, PolygonLayerOptions, PolylineLayerOptions, Popup, PopupMLGL, PropertyValues, RasterDEMTileSource, RasterDEMTileSourceMLGL, RasterTileSource, RasterTileSourceMLGL, RgbaColor, ScaleControl, ScaleControlMLGL, SdkConfig, Style, StyleMLGL, TerrainControl, TerrainControlMLGL, Unit, VectorTileSource, VectorTileSourceMLGL, VideoSource, VideoSourceMLGL, XMLProperties, ZoomNumberValues, ZoomStringValues, addProtocol, clearPrewarmedResources, config, getBrowserLanguage, getRTLTextPluginStatus, gpx, gpxOrKml, hasChildNodeWithName, helpers, isLanguageSupported, kml, maxParallelImageRequests, prewarm, removeProtocol, setRTLTextPlugin, str2xml, version, workerCount, workerUrl, xml2str };