@maptiler/sdk 3.8.0-rc7 → 3.8.0-rc8

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.
@@ -16,6 +16,8 @@ export type ImageViewerConstructorOptions = Pick<MapOptions, AllowedConstrcutorO
16
16
  imageUUID: string;
17
17
  debug?: boolean;
18
18
  center?: [number, number];
19
+ fitToBoundsControl?: boolean;
20
+ navigationControl?: boolean;
19
21
  };
20
22
  export type ImageMetadata = {
21
23
  id: string;
@@ -88,6 +90,7 @@ export default class ImageViewer extends Evented {
88
90
  * @returns {Promise<void>}
89
91
  */
90
92
  onReadyAsync(): Promise<void>;
93
+ shouldFitImageToViewport: boolean;
91
94
  /**
92
95
  * Initializes the ImageViewer
93
96
  * - fetches the image metadata
@@ -101,6 +104,15 @@ export default class ImageViewer extends Evented {
101
104
  * @returns {Promise<void>}
102
105
  */
103
106
  private init;
107
+ /**
108
+ * Fits the image to the viewport.
109
+ *
110
+ * @param {Object} options - The options for the fit image to viewport.
111
+ * @param {boolean} options.ease - Whether to ease to the viewport bounds.
112
+ */
113
+ fitImageToViewport({ ease }?: {
114
+ ease?: boolean;
115
+ }): void;
104
116
  /**
105
117
  * Fetches the image metadata from the API.
106
118
  *
@@ -0,0 +1,13 @@
1
+ import { IControl } from 'maplibre-gl';
2
+ import { ImageViewer } from '../ImageViewer';
3
+ import { Map as MapSDK } from '../Map';
4
+ export declare class ImageViewerFitImageToBoundsControl implements IControl {
5
+ private viewer;
6
+ private container;
7
+ constructor({ imageViewer }: {
8
+ imageViewer: ImageViewer;
9
+ });
10
+ handleClick: () => void;
11
+ onAdd(_map: MapSDK): HTMLElement;
12
+ onRemove(): void;
13
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maptiler/sdk",
3
- "version": "3.8.0-rc7",
3
+ "version": "3.8.0-rc8",
4
4
  "description": "The Javascript & TypeScript map SDK tailored for MapTiler Cloud",
5
5
  "author": "MapTiler",
6
6
  "module": "dist/maptiler-sdk.mjs",