@maptiler/sdk 3.8.0-rc4 → 3.8.0-rc7

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.
@@ -1,16 +1,50 @@
1
- import { DoubleClickZoomHandler, DragPanHandler, EaseToOptions, PointLike, TwoFingersTouchZoomRotateHandler } from 'maplibre-gl';
1
+ import { DoubleClickZoomHandler, DragPanHandler, EaseToOptions, PointLike, TwoFingersTouchZoomRotateHandler, default as MapLibre } from 'maplibre-gl';
2
2
  import { FlyToOptions, MapDataEvent, MapOptions, JumpToOptions, ScrollZoomHandler, BoxZoomHandler, KeyboardHandler, CooperativeGesturesHandler } from '..';
3
3
  import { Map } from '../Map';
4
- import { Evented } from '../';
5
- type AllowedConstrcutorOptions = "container" | "apiKey" | "maxZoom" | "minZoom" | "zoom" | "bearing";
6
- type ImageViewerConstructorOptions = Pick<MapOptions, AllowedConstrcutorOptions> & {
4
+ export type AllowedConstrcutorOptions = "container" | "apiKey" | "maxZoom" | "minZoom" | "zoom" | "bearing";
5
+ declare const Evented: typeof MapLibre.Evented;
6
+ export type ImageViewerFlyToOptions = Omit<FlyToOptions, "pitch"> & {
7
+ center: [number, number];
8
+ };
9
+ export type ImageViewerJumpToOptions = Omit<JumpToOptions, "pitch"> & {
10
+ center: [number, number];
11
+ };
12
+ export type ImageViewerEaseToOptions = Omit<EaseToOptions, "pitch"> & {
13
+ center: [number, number];
14
+ };
15
+ export type ImageViewerConstructorOptions = Pick<MapOptions, AllowedConstrcutorOptions> & {
7
16
  imageUUID: string;
8
17
  debug?: boolean;
9
18
  center?: [number, number];
10
19
  };
20
+ export type ImageMetadata = {
21
+ id: string;
22
+ description: string;
23
+ attribution: string;
24
+ width: number;
25
+ height: number;
26
+ minzoom: number;
27
+ maxzoom: number;
28
+ tileSize: number;
29
+ };
11
30
  export default class ImageViewer extends Evented {
31
+ /**
32
+ * The UUID of the image.
33
+ *
34
+ * @internal
35
+ */
12
36
  private imageUUID;
37
+ /**
38
+ * Whether to enable debug mode.
39
+ *
40
+ * @internal
41
+ */
13
42
  private debug;
43
+ /**
44
+ * The metadata of the image.
45
+ *
46
+ * @internal
47
+ */
14
48
  private imageMetadata?;
15
49
  /**
16
50
  * Why not extend the Map class?
@@ -20,47 +54,254 @@ export default class ImageViewer extends Evented {
20
54
  * methods and properties that operate in LngLat space. *
21
55
  */
22
56
  private sdk;
57
+ /**
58
+ * The options for the ImageViewer.
59
+ *
60
+ * @internal
61
+ */
23
62
  private options;
63
+ /**
64
+ * The size of the image.
65
+ *
66
+ * @internal
67
+ */
24
68
  private imageSize?;
69
+ /**
70
+ * The padded size max.
71
+ *
72
+ * @internal
73
+ */
25
74
  private paddedSizeMax?;
75
+ /**
76
+ * The version of the ImageViewer / SDK.
77
+ */
26
78
  get version(): string;
79
+ /**
80
+ * The constructor for the ImageViewer.
81
+ *
82
+ * @param {Partial<ImageViewerConstructorOptions>} imageViewerConstructorOptions - The options for the ImageViewer.
83
+ */
27
84
  constructor(imageViewerConstructorOptions: Partial<ImageViewerConstructorOptions>);
85
+ /**
86
+ * Waits for the ImageViewer to be ready.
87
+ *
88
+ * @returns {Promise<void>}
89
+ */
28
90
  onReadyAsync(): Promise<void>;
29
- init(): Promise<void>;
30
- fetchImageMetadata(): Promise<void>;
31
- addImageSource(): void;
91
+ /**
92
+ * Initializes the ImageViewer
93
+ * - fetches the image metadata
94
+ * - adds the image source to the sdk instance
95
+ * - sets the center to the middle of the image (if center is not provided)
96
+ * - monkeypatches the maplibre-gl sdk transform method to allow for overpanning and underzooming.
97
+ * - sets up global event forwarding / intercepting from the map instance
98
+ * - sets the center to the middle of the image (if center is not provided)
99
+ *
100
+ * @internal
101
+ * @returns {Promise<void>}
102
+ */
103
+ private init;
104
+ /**
105
+ * Fetches the image metadata from the API.
106
+ *
107
+ * @internal
108
+ * @returns {Promise<void>}
109
+ */
110
+ private fetchImageMetadata;
111
+ /**
112
+ * Adds the image source to the sdk instance.
113
+ *
114
+ * @internal
115
+ * @returns {void}
116
+ */
117
+ private addImageSource;
118
+ /**
119
+ * Triggers a repaint of the ImageViewer. Same as map.triggerRepaint().
120
+ *
121
+ * @internal
122
+ * @returns {void}
123
+ */
32
124
  triggerRepaint(): void;
125
+ /**
126
+ * The scroll zoom handler.
127
+ *
128
+ * @internal
129
+ * @returns {ScrollZoomHandler}
130
+ */
33
131
  get scrollZoom(): ScrollZoomHandler;
132
+ /**
133
+ * The scroll zoom handler.
134
+ *
135
+ * @internal
136
+ * @param {ScrollZoomHandler} value - The scroll zoom handler.
137
+ */
34
138
  set scrollZoom(value: ScrollZoomHandler);
139
+ /**
140
+ * The box zoom handler.
141
+ *
142
+ * @internal
143
+ * @returns {BoxZoomHandler}
144
+ */
35
145
  get boxZoom(): BoxZoomHandler;
146
+ /**
147
+ * The box zoom handler.
148
+ *
149
+ * @internal
150
+ * @param {BoxZoomHandler} value - The box zoom handler.
151
+ */
36
152
  set boxZoom(value: BoxZoomHandler);
153
+ /**
154
+ * The drag pan handler.
155
+ *
156
+ * @internal
157
+ * @returns {DragPanHandler}
158
+ */
37
159
  get dragPan(): DragPanHandler;
160
+ /**
161
+ * The drag pan handler.
162
+ *
163
+ * @internal
164
+ * @param {DragPanHandler} value - The drag pan handler.
165
+ */
38
166
  set dragPan(value: DragPanHandler);
167
+ /**
168
+ * The keyboard handler.
169
+ *
170
+ * @internal
171
+ * @returns {KeyboardHandler}
172
+ */
39
173
  get keyboard(): KeyboardHandler;
174
+ /**
175
+ * The keyboard handler.
176
+ *
177
+ * @internal
178
+ * @param {KeyboardHandler} value - The keyboard handler.
179
+ */
40
180
  set keyboard(value: KeyboardHandler);
181
+ /**
182
+ * The double click zoom handler.
183
+ *
184
+ * @internal
185
+ * @returns {DoubleClickZoomHandler}
186
+ */
41
187
  get doubleClickZoom(): DoubleClickZoomHandler;
188
+ /**
189
+ * The double click zoom handler.
190
+ *
191
+ * @internal
192
+ * @param {DoubleClickZoomHandler} value - The double click zoom handler.
193
+ */
42
194
  set doubleClickZoom(value: DoubleClickZoomHandler);
195
+ /**
196
+ * The touch zoom rotate handler.
197
+ *
198
+ * @internal
199
+ * @returns {TwoFingersTouchZoomRotateHandler}
200
+ */
43
201
  get touchZoomRotate(): TwoFingersTouchZoomRotateHandler;
202
+ /**
203
+ * The touch zoom rotate handler.
204
+ *
205
+ * @internal
206
+ * @param {TwoFingersTouchZoomRotateHandler} value - The touch zoom rotate handler.
207
+ */
44
208
  set touchZoomRotate(value: TwoFingersTouchZoomRotateHandler);
209
+ /**
210
+ * The cooperative gestures handler.
211
+ *
212
+ * @internal
213
+ * @returns {CooperativeGesturesHandler}
214
+ */
45
215
  get cooperativeGestures(): CooperativeGesturesHandler;
216
+ /**
217
+ * The cooperative gestures handler.
218
+ *
219
+ * @internal
220
+ * @param {CooperativeGesturesHandler} value - The cooperative gestures handler.
221
+ */
46
222
  set cooperativeGestures(value: CooperativeGesturesHandler);
223
+ /**
224
+ * Converts a LngLat to a px coordinate, based on the image metadata.
225
+ *
226
+ * @internal
227
+ * @param {LngLat} lngLat - The LngLat to convert.
228
+ * @returns {[number, number]} The px coordinate.
229
+ */
47
230
  private lngLatToPx;
231
+ /**
232
+ * Converts a px coordinate to a LngLat, based on the image metadata.
233
+ *
234
+ * @internal
235
+ * @param {LngLat} lngLat - The LngLat to convert.
236
+ * @returns {[number, number]} The px coordinate.
237
+ */
48
238
  private pxToLngLat;
49
- flyTo(options: Omit<ImageViewerFlyToOptions, "bearing" | "pitch">, eventData?: MapDataEvent): Map;
50
- jumpTo(options: Omit<ImageViewerJumpToOptions, "bearing" | "pitch">, eventData?: MapDataEvent): Map;
239
+ /**
240
+ * Fly to a given center.
241
+ *
242
+ * @param {ImageViewerFlyToOptions} options - The options for the fly to.
243
+ * @param {MapDataEvent} eventData - The event data.
244
+ */
245
+ flyTo(options: ImageViewerFlyToOptions, eventData?: MapDataEvent): Map;
246
+ /**
247
+ * Jump to a given center.
248
+ *
249
+ * @param {ImageViewerJumpToOptions} options - The options for the jump to.
250
+ * @param {MapDataEvent} eventData - The event data.
251
+ */
252
+ jumpTo(options: ImageViewerJumpToOptions, eventData?: MapDataEvent): Map;
253
+ /**
254
+ * Set the zoom level.
255
+ *
256
+ * @param {number} zoom - The zoom level.
257
+ */
51
258
  setZoom(zoom: number): void;
259
+ /**
260
+ * Get the zoom level.
261
+ *
262
+ * @returns {number} The zoom level.
263
+ */
52
264
  getZoom(): number;
265
+ /**
266
+ * Get the center of the ImageViewer.
267
+ *
268
+ * @internal
269
+ * @returns {[number, number]} The center of the ImageViewer.
270
+ */
53
271
  getCenter(): [number, number];
272
+ /**
273
+ * Set the center of the ImageViewer.
274
+ *
275
+ * @param {number} center - The center of the ImageViewer.
276
+ */
54
277
  setCenter(center: [number, number]): void;
278
+ /**
279
+ * Set the bearing of the ImageViewer.
280
+ *
281
+ * @param {number} bearing - The bearing of the ImageViewer.
282
+ */
55
283
  setBearing(bearing: number): void;
284
+ /**
285
+ * Get the bearing of the ImageViewer.
286
+ *
287
+ * @returns {number} The bearing of the ImageViewer.
288
+ */
56
289
  getBearing(): number;
57
- panBy(delta: PointLike, options?: EaseToOptions, eventData?: any): void;
58
- panTo(center: [number, number], options?: EaseToOptions, eventData?: any): void;
290
+ /**
291
+ * Pan by a given delta.
292
+ *
293
+ * @param {PointLike} delta - The delta to pan by.
294
+ * @param {ImageViewerEaseToOptions} options - The options for the pan.
295
+ * @param {any} eventData - The event data.
296
+ */
297
+ panBy(delta: PointLike, options?: ImageViewerEaseToOptions, eventData?: any): void;
298
+ /**
299
+ * Pan to a given center.
300
+ *
301
+ * @param {number} center - The center to pan to.
302
+ * @param {ImageViewerEaseToOptions} options - The options for the pan.
303
+ * @param {any} eventData - The event data.
304
+ */
305
+ panTo(center: [number, number], options?: ImageViewerEaseToOptions, eventData?: any): void;
59
306
  }
60
- type ImageViewerFlyToOptions = Omit<FlyToOptions, "bearing" | "pitch"> & {
61
- center: [number, number];
62
- };
63
- type ImageViewerJumpToOptions = Omit<JumpToOptions, "bearing" | "pitch"> & {
64
- center: [number, number];
65
- };
66
307
  export {};
@@ -5,10 +5,27 @@ export declare class ImageViewerEvent {
5
5
  readonly type: string;
6
6
  readonly target: ImageViewer;
7
7
  readonly originalEvent: MouseEvent | TouchEvent | WheelEvent | WebGLContextEvent | null;
8
- readonly data?: Record<string, any>;
8
+ [key: string]: any;
9
9
  constructor(type: string, viewer: ImageViewer, originalEvent?: MouseEvent | TouchEvent | WheelEvent | WebGLContextEvent | null, data?: Record<string, any>);
10
10
  }
11
- export declare const ALL_MAP_EVENT_TYPES: string[];
11
+ declare const BASE_MAP_EVENT_TYPES: readonly ["idle", "render", "load", "remove", "idle"];
12
+ declare const ERROR_EVENTS: readonly ["error"];
13
+ declare const RESIZE_EVENTS: readonly ["resize"];
14
+ declare const WEBGL_CONTEXT_EVENTS: readonly ["webglcontextlost", "webglcontextrestored"];
15
+ declare const CAMERA_EVENTS: readonly ["moveend", "movestart", "move", "zoomend", "zoomstart", "zoom", "rotatestart", "rotateend", "rotate", "dragstart", "dragend", "drag", "boxzoomcancel", "boxzoomend", "boxzoomstart"];
16
+ declare const UI_EVENTS: readonly ["click", "dblclick", "mousedown", "mouseup", "mousemove", "mouseout", "mouseover", "contextmenu", "touchstart", "touchend", "touchmove", "touchcancel"];
17
+ declare const COOPERATIVE_GESTURE_EVENTS: readonly ["cooperativegestureprevented"];
18
+ declare const DATA_EVENTS: readonly ["data", "dataloading", "sourcedata", "sourcedataloading", "dataabort", "sourcedataabort"];
19
+ export declare const IMAGE_VIEWER_EVENT_TYPES: ("data" | "error" | "load" | "idle" | "remove" | "render" | "resize" | "webglcontextlost" | "webglcontextrestored" | "dataloading" | "sourcedataloading" | "sourcedata" | "dataabort" | "sourcedataabort" | "boxzoomcancel" | "boxzoomstart" | "boxzoomend" | "touchcancel" | "touchmove" | "touchend" | "touchstart" | "click" | "contextmenu" | "dblclick" | "mousemove" | "mouseup" | "mousedown" | "mouseout" | "mouseover" | "movestart" | "move" | "moveend" | "zoomstart" | "zoom" | "zoomend" | "rotatestart" | "rotate" | "rotateend" | "dragstart" | "drag" | "dragend" | "cooperativegestureprevented")[];
20
+ type BaseMapEventKeys = (typeof BASE_MAP_EVENT_TYPES)[number];
21
+ type UiEventKeys = (typeof UI_EVENTS)[number];
22
+ type CameraEventKeys = (typeof CAMERA_EVENTS)[number];
23
+ type ErrorEventKeys = (typeof ERROR_EVENTS)[number];
24
+ type ResizeEventKeys = (typeof RESIZE_EVENTS)[number];
25
+ type WebglContextEventKeys = (typeof WEBGL_CONTEXT_EVENTS)[number];
26
+ type DataEventKeys = (typeof DATA_EVENTS)[number];
27
+ type CooperativeGestureEventKeys = (typeof COOPERATIVE_GESTURE_EVENTS)[number];
28
+ export type ImageViewerEventTypes = BaseMapEventKeys | UiEventKeys | CameraEventKeys | ErrorEventKeys | ResizeEventKeys | WebglContextEventKeys | DataEventKeys | CooperativeGestureEventKeys | "imageviewerready" | "imagevieweriniterror";
12
29
  type LngLatToPixel = (lngLat: LngLat) => [number, number];
13
30
  interface SetupGlobalMapEventForwarderOptions {
14
31
  map: Map;
@@ -17,6 +34,11 @@ interface SetupGlobalMapEventForwarderOptions {
17
34
  }
18
35
  /**
19
36
  * Sets up event forwarding from Map to ImageViewer with proper categorization
37
+ * @param {SetupGlobalMapEventForwarderOptions} options - The options for setting up the event forwarder.
38
+ * @param {Map} options.map - The map to forward events from.
39
+ * @param {ImageViewer} options.viewer - The viewer to forward events to.
40
+ * @param {LngLatToPixel} options.lngLatToPx - A function to convert LngLat to pixel coordinates.
41
+ * @returns {void}
20
42
  */
21
43
  export declare function setupGlobalMapEventForwarder({ map, viewer, lngLatToPx }: SetupGlobalMapEventForwarderOptions): void;
22
44
  export {};
@@ -1 +1,4 @@
1
1
  export { default as ImageViewer } from './ImageViewer';
2
+ export type { ImageViewerEventTypes } from './events';
3
+ export type { ImageViewerConstructorOptions, ImageViewerFlyToOptions, ImageViewerJumpToOptions, ImageMetadata } from './ImageViewer';
4
+ export { ImageViewerEvent } from './events';
@@ -0,0 +1,4 @@
1
+ import { LngLat, Point } from '../index';
2
+ import { Map } from '../Map';
3
+ export declare function unprojectFromWorldCoordinates(worldSize: number, point: Point): LngLat;
4
+ export declare function monkeyPatchMapTransformInstance(instance: Map): void;
package/dist/src/Map.d.ts CHANGED
@@ -6,6 +6,7 @@ import { MinimapOptionsInput } from './controls/Minimap';
6
6
  import { Telemetry } from './Telemetry';
7
7
  import { CubemapDefinition, CubemapLayer, CubemapLayerConstructorOptions } from './custom-layers/CubemapLayer';
8
8
  import { GradientDefinition, RadialGradientLayer, RadialGradientLayerConstructorOptions } from './custom-layers/RadialGradientLayer';
9
+ import { StyleSpecificationWithMetaData } from './custom-layers/extractCustomLayerStyle';
9
10
  export type LoadWithTerrainEvent = {
10
11
  type: "loadWithTerrain";
11
12
  target: Map;
@@ -153,8 +154,6 @@ export declare class Map extends maplibregl.Map {
153
154
  setSpace(space: CubemapDefinition): void;
154
155
  private setSpaceFromStyle;
155
156
  private setHaloFromStyle;
156
- private setSpaceFromCurrentStyle;
157
- private setHaloFromCurrentStyle;
158
157
  private initSpace;
159
158
  private initHalo;
160
159
  getHalo(): RadialGradientLayer | undefined;
@@ -219,7 +218,8 @@ export declare class Map extends maplibregl.Map {
219
218
  * - a shorthand with only the MapTIler style name (eg. `"streets-v2"`)
220
219
  * - a longer form with the prefix `"maptiler://"` (eg. `"maptiler://streets-v2"`)
221
220
  */
222
- setStyle(style: null | ReferenceMapStyle | MapStyleVariant | StyleSpecification | string, options?: StyleSwapOptions & StyleOptions): this;
221
+ setStyle(style: null | ReferenceMapStyle | MapStyleVariant | StyleSpecification | StyleSpecificationWithMetaData | string, options?: StyleSwapOptions & StyleOptions): this;
222
+ private spaceboxLoadingState;
223
223
  /**
224
224
  * Adds a [MapLibre style layer](https://maplibre.org/maplibre-style-spec/layers)
225
225
  * to the map's style.
@@ -117,7 +117,9 @@ declare class CubemapLayer implements CustomLayerInterface {
117
117
  * It creates a new Object3D instance with the specified vertex and fragment shaders,
118
118
  * attributes, and uniforms. The cubemap will be rendered using this configuration.
119
119
  */
120
- updateCubemap(): void;
120
+ updateCubemap({ facesNeedUpdate }?: {
121
+ facesNeedUpdate: boolean;
122
+ }): void;
121
123
  /**
122
124
  * Called when the layer is added to the map.
123
125
  * Initializes the cubemap and sets up the WebGL context.
@@ -224,4 +226,5 @@ declare class CubemapLayer implements CustomLayerInterface {
224
226
  */
225
227
  hide(): void;
226
228
  }
229
+ export declare function validateSpaceSpecification(space: CubemapDefinition | boolean): boolean;
227
230
  export { CubemapLayer };
@@ -84,6 +84,12 @@ export declare class RadialGradientLayer implements CustomLayerInterface {
84
84
  * @returns void
85
85
  */
86
86
  onAdd(map: MapSDK, gl: WebGLRenderingContext | WebGL2RenderingContext): void;
87
+ /**
88
+ * Returns the current gradient configuration of the radial gradient layer.
89
+ *
90
+ * @returns {GradientDefinition} The current gradient configuration.
91
+ */
92
+ getConfig(): GradientDefinition;
87
93
  /**
88
94
  * Animates the radial gradient into view by gradually scaling from 0 to the target scale.
89
95
  *
@@ -126,3 +132,4 @@ export declare class RadialGradientLayer implements CustomLayerInterface {
126
132
  show(): void;
127
133
  hide(): void;
128
134
  }
135
+ export declare function validateHaloSpecification(halo: RadialGradientLayerConstructorOptions | boolean): boolean;
@@ -3,3 +3,4 @@ import { CubemapLayer } from './CubemapLayer';
3
3
  export { RadialGradientLayer, CubemapLayer };
4
4
  export * from './RadialGradientLayer/types';
5
5
  export * from './CubemapLayer/types';
6
+ export type { StyleSpecificationWithMetaData } from './extractCustomLayerStyle';
@@ -77,8 +77,8 @@ export { MapTouchEvent } from './MLAdapters/MapTouchEvent';
77
77
  export { MapMouseEvent } from './MLAdapters/MapMouseEvent';
78
78
  export { Map, GeolocationType, type MapOptions, type LoadWithTerrainEvent } from './Map';
79
79
  export * from './controls';
80
- export { type AutomaticStaticMapOptions, type BoundedStaticMapOptions, type BufferToPixelDataFunction, type ByIdGeocodingOptions, type CenteredStaticMapOptions, type CommonForwardAndReverseGeocodingOptions, type CoordinateExport, type CoordinateGrid, type CoordinateId, type CoordinateSearch, type CoordinateSearchResult, type CoordinateTransformResult, type CoordinateTransformation, type Coordinates, type CoordinatesSearchOptions, type CoordinatesTransformOptions, type DefaultTransformation, type ElevationAtOptions, type ElevationBatchOptions, type FeatureHierarchy, type FetchFunction, type GeocodingFeature, type GeocodingOptions, type GeocodingSearchResult, type GeolocationInfoOptions, type GeolocationResult, type GetDataOptions, type LanguageGeocodingOptions, MapStyle, type MapStylePreset, type MapStyleType, MapStyleVariant, type PixelData, ReferenceMapStyle, type ReverseGeocodingOptions, ServiceError, type StaticMapBaseOptions, type StaticMapMarker, type TileJSON, type XYZ, bufferToPixelDataBrowser, circumferenceAtLatitude, coordinates, data, elevation, expandMapStyle, geocoding, geolocation, getBufferToPixelDataParser, getTileCache, mapStylePresetList, math, misc, staticMaps, styleToStyle, type LanguageInfo, areSameLanguages, toLanguageInfo, isLanguageInfo, getAutoLanguage, getLanguageInfoFromFlag, getLanguageInfoFromCode, getLanguageInfoFromKey, } from '@maptiler/client';
81
- export { default as ImageViewer } from './ImageViewer/ImageViewer';
80
+ export { type AutomaticStaticMapOptions, type BoundedStaticMapOptions, type BufferToPixelDataFunction, type ByIdGeocodingOptions, type CenteredStaticMapOptions, type CommonForwardAndReverseGeocodingOptions, type CoordinateExport, type CoordinateGrid, type CoordinateId, type CoordinateSearch, type CoordinateSearchResult, type CoordinateTransformResult, type CoordinateTransformation, type Coordinates, type CoordinatesSearchOptions, type CoordinatesTransformOptions, type DefaultTransformation, type ElevationAtOptions, type ElevationBatchOptions, type FeatureHierarchy, type FetchFunction, type GeocodingFeature, type GeocodingOptions, type GeocodingSearchResult, type GeolocationInfoOptions, type GeolocationResult, type GetDataOptions, type LanguageGeocodingOptions, MapStyle, type MapStylePreset, type MapStyleType, MapStyleVariant, type PixelData, ReferenceMapStyle, type ReverseGeocodingOptions, ServiceError, type StaticMapBaseOptions, type StaticMapMarker, type TileJSON, type XYZ, bufferToPixelDataBrowser, circumferenceAtLatitude, coordinates, data, elevation, expandMapStyle, geocoding, geolocation, getBufferToPixelDataParser, getTileCache, mapStylePresetList, math, misc, staticMaps, styleToStyle, type LanguageInfo, areSameLanguages, toLanguageInfo, isLanguageInfo, getAutoLanguage, getLanguageInfoFromFlag, getLanguageInfoFromCode, getLanguageInfoFromKey, canParsePixelData, } from '@maptiler/client';
81
+ export * from './ImageViewer';
82
82
  export { getWebGLSupportError, displayWebGLContextLostWarning } from './tools';
83
83
  export { config, SdkConfig } from './config';
84
84
  export * from './language';
@@ -1,5 +1,5 @@
1
1
  export declare class FetchError extends Error {
2
2
  status: number;
3
3
  statusText: string;
4
- constructor(response: Response, resource: string);
4
+ constructor(response: Response, resource: string, module: string);
5
5
  }
@@ -16,7 +16,7 @@ export declare function loadShader({ gl, type, source }: {
16
16
  *
17
17
  * @returns WebGL program
18
18
  */
19
- export declare function createShadersSetProgram({ gl, vertexShaderSource, fragmentShaderSource }: {
19
+ export declare function createShaderProgram({ gl, vertexShaderSource, fragmentShaderSource }: {
20
20
  gl: WebGLContext;
21
21
  vertexShaderSource: string;
22
22
  fragmentShaderSource: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maptiler/sdk",
3
- "version": "3.8.0-rc4",
3
+ "version": "3.8.0-rc7",
4
4
  "description": "The Javascript & TypeScript map SDK tailored for MapTiler Cloud",
5
5
  "author": "MapTiler",
6
6
  "module": "dist/maptiler-sdk.mjs",
@@ -89,7 +89,7 @@
89
89
  "@koa/cors": "^5.0.0",
90
90
  "@koa/router": "^13.1.1",
91
91
  "@maplibre/maplibre-gl-style-spec": "~23.3.0",
92
- "@maptiler/client": "~2.4.0",
92
+ "@maptiler/client": "~2.5.0",
93
93
  "events": "^3.3.0",
94
94
  "gl-matrix": "^3.4.3",
95
95
  "js-base64": "^3.7.7",