@maptiler/sdk 1.0.7 → 1.0.9

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.
package/src/index.ts CHANGED
@@ -14,28 +14,18 @@ const {
14
14
  supported,
15
15
  setRTLTextPlugin,
16
16
  getRTLTextPluginStatus,
17
- NavigationControl,
18
- GeolocateControl,
19
- AttributionControl,
20
- LogoControl,
21
- ScaleControl,
22
- FullscreenControl,
23
- TerrainControl,
24
- Popup,
25
- Marker,
26
- Style,
17
+ // NavigationControl,
18
+ // GeolocateControl,
19
+ // AttributionControl,
20
+ // LogoControl,
21
+ // ScaleControl,
22
+ // FullscreenControl,
23
+ // TerrainControl,
27
24
  LngLat,
28
25
  LngLatBounds,
29
26
  MercatorCoordinate,
30
27
  Evented,
31
28
  AJAXError,
32
- CanvasSource,
33
- GeoJSONSource,
34
- ImageSource,
35
- RasterDEMTileSource,
36
- RasterTileSource,
37
- VectorTileSource,
38
- VideoSource,
39
29
  prewarm,
40
30
  clearPrewarmedResources,
41
31
  version,
@@ -45,28 +35,47 @@ const {
45
35
  workerUrl,
46
36
  addProtocol,
47
37
  removeProtocol,
48
-
49
38
  // isSafari,
50
39
  // getPerformanceMetrics,
51
40
  // config,
52
41
  // Point,
53
42
  } = maplibregl;
54
43
 
44
+ // We still want to export maplibregl.Map, but as a different name
45
+ const MapMLGL = maplibregl.Map;
46
+ const MarkerMLGL = maplibregl.Marker;
47
+ const PopupMLGL = maplibregl.Popup;
48
+ const StyleMLGL = maplibregl.Style;
49
+ const CanvasSourceMLGL = maplibregl.CanvasSource;
50
+ const GeoJSONSourceMLGL = maplibregl.GeoJSONSource;
51
+ const ImageSourceMLGL = maplibregl.ImageSource;
52
+ const RasterTileSourceMLGL = maplibregl.RasterTileSource;
53
+ const RasterDEMTileSourceMLGL = maplibregl.RasterDEMTileSource;
54
+ const VectorTileSourceMLGL = maplibregl.VectorTileSource;
55
+ const VideoSourceMLGL = maplibregl.VideoSource;
56
+ const NavigationControlMLGL = maplibregl.NavigationControl;
57
+ const GeolocateControlMLGL = maplibregl.GeolocateControl;
58
+ const AttributionControlMLGL = maplibregl.AttributionControl;
59
+ const LogoControlMLGL = maplibregl.LogoControl;
60
+ const ScaleControlMLGL = maplibregl.ScaleControl;
61
+ const FullscreenControlMLGL = maplibregl.FullscreenControl;
62
+ const TerrainControlMLGL = maplibregl.TerrainControl;
63
+
55
64
  export {
56
65
  supported,
57
66
  setRTLTextPlugin,
58
67
  getRTLTextPluginStatus,
59
68
  // Map,
60
- NavigationControl,
61
- GeolocateControl,
62
- AttributionControl,
63
- LogoControl,
64
- ScaleControl,
65
- FullscreenControl,
66
- TerrainControl,
67
- Popup,
68
- Marker,
69
- Style,
69
+ // NavigationControl,
70
+ // GeolocateControl,
71
+ // AttributionControl,
72
+ // LogoControl,
73
+ // ScaleControl,
74
+ // FullscreenControl,
75
+ // TerrainControl,
76
+ PopupMLGL,
77
+ MarkerMLGL,
78
+ StyleMLGL,
70
79
  LngLat,
71
80
  LngLatBounds,
72
81
  // Point,
@@ -74,13 +83,13 @@ export {
74
83
  Evented,
75
84
  AJAXError,
76
85
  // config,
77
- CanvasSource,
78
- GeoJSONSource,
79
- ImageSource,
80
- RasterDEMTileSource,
81
- RasterTileSource,
82
- VectorTileSource,
83
- VideoSource,
86
+ CanvasSourceMLGL,
87
+ GeoJSONSourceMLGL,
88
+ ImageSourceMLGL,
89
+ RasterDEMTileSourceMLGL,
90
+ RasterTileSourceMLGL,
91
+ VectorTileSourceMLGL,
92
+ VideoSourceMLGL,
84
93
  prewarm,
85
94
  clearPrewarmedResources,
86
95
  version,
@@ -90,13 +99,63 @@ export {
90
99
  workerUrl,
91
100
  addProtocol,
92
101
  removeProtocol,
102
+ MapMLGL,
93
103
  // isSafari,
94
104
  // getPerformanceMetrics
95
105
  };
96
106
 
107
+ // Exporting types of class instances from MapLibre:
108
+ export type NavigationControlMLGL = InstanceType<typeof NavigationControlMLGL>;
109
+ export type GeolocateControlMLGL = InstanceType<typeof GeolocateControlMLGL>;
110
+ export type AttributionControlMLGL = InstanceType<
111
+ typeof AttributionControlMLGL
112
+ >;
113
+ export type LogoControlMLGL = InstanceType<typeof LogoControlMLGL>;
114
+ export type ScaleControlMLGL = InstanceType<typeof ScaleControlMLGL>;
115
+ export type FullscreenControlMLGL = InstanceType<typeof FullscreenControlMLGL>;
116
+ export type TerrainControlMLGL = InstanceType<typeof TerrainControlMLGL>;
117
+ export type MarkerMLGL = InstanceType<typeof MarkerMLGL>;
118
+ export type PopupMLGL = InstanceType<typeof PopupMLGL>;
119
+ export type StyleMLGL = InstanceType<typeof StyleMLGL>;
120
+ export type LngLat = InstanceType<typeof LngLat>;
121
+ export type LngLatBounds = InstanceType<typeof LngLatBounds>;
122
+ export type MercatorCoordinate = InstanceType<typeof MercatorCoordinate>;
123
+ export type Evented = InstanceType<typeof Evented>;
124
+ export type AJAXError = InstanceType<typeof AJAXError>;
125
+ export type CanvasSourceMLGL = InstanceType<typeof CanvasSourceMLGL>;
126
+ export type GeoJSONSourceMLGL = InstanceType<typeof GeoJSONSourceMLGL>;
127
+ export type ImageSourceMLGL = InstanceType<typeof ImageSourceMLGL>;
128
+ export type RasterDEMTileSourceMLGL = InstanceType<
129
+ typeof RasterDEMTileSourceMLGL
130
+ >;
131
+ export type RasterTileSourceMLGL = InstanceType<typeof RasterTileSourceMLGL>;
132
+ export type VectorTileSourceMLGL = InstanceType<typeof VectorTileSourceMLGL>;
133
+ export type VideoSourceMLGL = InstanceType<typeof VideoSourceMLGL>;
134
+ export type MapMLGL = InstanceType<typeof MapMLGL>;
135
+
136
+ // SDK specific
97
137
  import { Map, GeolocationType } from "./Map";
98
138
  import type { MapOptions } from "./Map";
99
139
 
140
+ import { Marker } from "./Marker";
141
+ import { Popup } from "./Popup";
142
+ import { Style } from "./Style";
143
+ import { CanvasSource } from "./CanvasSource";
144
+ import { GeoJSONSource } from "./GeoJSONSource";
145
+ import { ImageSource } from "./ImageSource";
146
+ import { RasterTileSource } from "./RasterTileSource";
147
+ import { RasterDEMTileSource } from "./RasterDEMTileSource";
148
+ import { VectorTileSource } from "./VectorTileSource";
149
+ import { VideoSource } from "./VideoSource";
150
+ import { NavigationControl } from "./NavigationControl";
151
+ import { GeolocateControl } from "./GeolocateControl";
152
+ import { AttributionControl } from "./AttributionControl";
153
+ import { LogoControl } from "./LogoControl";
154
+ import { ScaleControl } from "./ScaleControl";
155
+ import { FullscreenControl } from "./FullscreenControl";
156
+ import { TerrainControl } from "./TerrainControl";
157
+
158
+ // Import of modified versions of the controls
100
159
  import { MaptilerGeolocateControl } from "./MaptilerGeolocateControl";
101
160
  import { MaptilerLogoControl } from "./MaptilerLogoControl";
102
161
  import { MaptilerTerrainControl } from "./MaptilerTerrainControl";
@@ -157,6 +216,23 @@ export type {
157
216
  // Exporting classes, objects, functions, etc.
158
217
  export {
159
218
  Map,
219
+ Marker,
220
+ Popup,
221
+ Style,
222
+ CanvasSource,
223
+ GeoJSONSource,
224
+ ImageSource,
225
+ RasterTileSource,
226
+ RasterDEMTileSource,
227
+ VideoSource,
228
+ NavigationControl,
229
+ GeolocateControl,
230
+ AttributionControl,
231
+ LogoControl,
232
+ ScaleControl,
233
+ FullscreenControl,
234
+ TerrainControl,
235
+ VectorTileSource,
160
236
  GeolocationType,
161
237
  SdkConfig,
162
238
  config,