@maptiler/sdk 3.9.0-rc.1 → 3.9.0-rc.2

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.
@@ -2,7 +2,7 @@ import { default as MaplibreGL } from 'maplibre-gl';
2
2
  import { EaseToOptions, DoubleClickZoomHandler, DragPanHandler, TwoFingersTouchZoomRotateHandler, FlyToOptions, MapOptions, JumpToOptions, ScrollZoomHandler, BoxZoomHandler, KeyboardHandler, CooperativeGesturesHandler, LngLat, MapDataEvent, PointLike } from '..';
3
3
  import { Map } from '../Map';
4
4
  import { ImageViewerFitImageToBoundsControl } from '../controls/ImageViewerFitImageToBoundsControl';
5
- import { lngLatToPxInternalSymbolKey, pxToLngLatInternalSymbolKey, sdkSymbolKey } from './symbols';
5
+ import { lngLatToPxInternalSymbolKey, pxToLngLatInternalSymbolKey } from './symbols';
6
6
  declare const Evented: typeof MaplibreGL.Evented;
7
7
  export type AllowedConstrcutorOptions = "container" | "apiKey" | "maxZoom" | "minZoom" | "zoom" | "bearing";
8
8
  export type ImageViewerFlyToOptions = Omit<FlyToOptions, "pitch"> & {
@@ -75,7 +75,7 @@ export default class ImageViewer extends Evented {
75
75
  * We do not want to have to extend the Map class and give access to
76
76
  * methods and properties that operate in LngLat space. *
77
77
  */
78
- [sdkSymbolKey]: Map;
78
+ private sdk;
79
79
  /**
80
80
  * The options for the ImageViewer.
81
81
  *
@@ -288,6 +288,19 @@ export default class ImageViewer extends Evented {
288
288
  * @returns {[number, number]} The px coordinate.
289
289
  */
290
290
  private pxToLngLat;
291
+ /**
292
+ * Get the internal SDK instance.
293
+ *
294
+ * @returns {Map} The internal SDK instance.
295
+ * @internal
296
+ */
297
+ getSDKInternal(): Map;
298
+ /**
299
+ * Get the canvas of the internal SDK instance.
300
+ *
301
+ * @returns {HTMLCanvasElement} The canvas of the internal SDK instance.
302
+ */
303
+ getCanvas(): HTMLCanvasElement;
291
304
  /**
292
305
  * Fly to a given center.
293
306
  *
@@ -1,5 +1,5 @@
1
1
  export { default as ImageViewer } from './ImageViewer';
2
- export { ImageViewerMarker } from './ImageViewerMarker';
2
+ export { ImageViewerMarker, ImageViewerMarkerEvent, type ImageViewerMarkerOptions } from './ImageViewerMarker';
3
3
  export type { ImageViewerEventTypes } from './events';
4
4
  export type { ImageViewerConstructorOptions, ImageViewerFlyToOptions, ImageViewerJumpToOptions, ImageMetadata } from './ImageViewer';
5
5
  export { ImageViewerEvent } from './events';
@@ -1,4 +1,11 @@
1
- import { LngLat, Point } from '../index';
1
+ import { LngLat, Marker, Point, PositionAnchor } from '../index';
2
2
  import { Map } from '../Map';
3
3
  export declare function unprojectFromWorldCoordinates(worldSize: number, point: Point): LngLat;
4
4
  export declare function monkeyPatchMapTransformInstance(instance: Map): void;
5
+ export declare const anchorTranslate: Record<PositionAnchor, string>;
6
+ /**
7
+ * Monkey patches the Marker instance to remove wrapping. Because pixel projection does not wrap like lnglat.
8
+ * See here https://github.com/maplibre/maplibre-gl-js/blob/14f56b00e0f08784681ef98f0731c60f3923a4a9/src/ui/marker.ts#L601
9
+ * @param {Marker} marker - The Marker instance to patch.
10
+ */
11
+ export declare function monkeyPatchMarkerInstanceToRemoveWrapping(marker: Marker): void;
@@ -1,3 +1,2 @@
1
- export declare const sdkSymbolKey: unique symbol;
2
1
  export declare const lngLatToPxInternalSymbolKey: unique symbol;
3
2
  export declare const pxToLngLatInternalSymbolKey: unique symbol;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maptiler/sdk",
3
- "version": "3.9.0-rc.1",
3
+ "version": "3.9.0-rc.2",
4
4
  "description": "The Javascript & TypeScript map SDK tailored for MapTiler Cloud",
5
5
  "author": "MapTiler",
6
6
  "module": "dist/maptiler-sdk.mjs",
@@ -87,7 +87,7 @@
87
87
  },
88
88
  "dependencies": {
89
89
  "@maplibre/maplibre-gl-style-spec": "~24.2.0",
90
- "@maptiler/client": "2.6.0-rc.1",
90
+ "@maptiler/client": "2.6.0-rc.3",
91
91
  "events": "^3.3.0",
92
92
  "gl-matrix": "^3.4.3",
93
93
  "js-base64": "^3.7.7",