@maptiler/sdk 2.1.0 → 2.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.
- package/.github/workflows/format-lint.yml +2 -5
- package/biome.json +46 -0
- package/dist/maptiler-sdk.css +20 -0
- package/dist/maptiler-sdk.d.ts +4 -95
- package/dist/maptiler-sdk.min.mjs +3 -3
- package/dist/maptiler-sdk.mjs +908 -1524
- package/dist/maptiler-sdk.mjs.map +1 -1
- package/package.json +12 -19
- package/.eslintignore +0 -1
- package/.eslintrc.cjs +0 -21
package/biome.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"files": {
|
|
3
|
+
"include": ["src/**/*.js", "src/**/*.ts"]
|
|
4
|
+
},
|
|
5
|
+
"organizeImports": {
|
|
6
|
+
"enabled": false
|
|
7
|
+
},
|
|
8
|
+
"formatter": {
|
|
9
|
+
"indentStyle": "space",
|
|
10
|
+
"indentWidth": 2,
|
|
11
|
+
"lineWidth": 120
|
|
12
|
+
},
|
|
13
|
+
"javascript": {
|
|
14
|
+
"formatter": {
|
|
15
|
+
"arrowParentheses": "always",
|
|
16
|
+
"bracketSameLine": false,
|
|
17
|
+
"bracketSpacing": true,
|
|
18
|
+
"jsxQuoteStyle": "double",
|
|
19
|
+
"quoteProperties": "asNeeded",
|
|
20
|
+
"semicolons": "always",
|
|
21
|
+
"trailingCommas": "all"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"json": {
|
|
25
|
+
"formatter": {
|
|
26
|
+
"trailingCommas": "none"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"linter": {
|
|
30
|
+
"rules": {
|
|
31
|
+
"suspicious": {
|
|
32
|
+
"noExplicitAny": {
|
|
33
|
+
"level": "off"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"complexity": {
|
|
37
|
+
"noUselessTernary": {
|
|
38
|
+
"level": "off"
|
|
39
|
+
},
|
|
40
|
+
"useOptionalChain": {
|
|
41
|
+
"level": "off"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
package/dist/maptiler-sdk.css
CHANGED
|
@@ -144,4 +144,24 @@
|
|
|
144
144
|
padding: 0 5px;
|
|
145
145
|
text-align: right;
|
|
146
146
|
line-height: 14px;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.no-webgl-support-div {
|
|
150
|
+
position: absolute;
|
|
151
|
+
top: 0;
|
|
152
|
+
left: 0;
|
|
153
|
+
bottom: 0;
|
|
154
|
+
right: 0;
|
|
155
|
+
margin: auto;
|
|
156
|
+
width: fit-content;
|
|
157
|
+
height: fit-content;
|
|
158
|
+
padding: 10px;
|
|
159
|
+
background: white;
|
|
160
|
+
border-radius: 3px;
|
|
161
|
+
color: #fb8600;
|
|
162
|
+
text-align: center;
|
|
163
|
+
font-family: sans-serif;
|
|
164
|
+
font-weight: 300;
|
|
165
|
+
font-size: 16px;
|
|
166
|
+
max-width: calc(100% - 80px);
|
|
147
167
|
}
|
package/dist/maptiler-sdk.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import maplibregl__default, { LineLayerSpecification, FillLayerSpecification, StyleSpecification, ControlPosition, MapOptions as MapOptions$1, StyleSwapOptions, StyleOptions, LayerSpecification, SourceSpecification, CustomLayerInterface, FilterSpecification, StyleSetterOptions, RequestTransformFunction, Map as Map$1, GestureOptions, LogoControlOptions as LogoControlOptions$1, IControl } from 'maplibre-gl';
|
|
2
2
|
export * from 'maplibre-gl';
|
|
3
|
+
export { AJAXError, AttributionControl as AttributionControlMLGL, BoxZoomHandler as BoxZoomHandlerMLGL, CanvasSource as CanvasSourceMLGL, CooperativeGesturesHandler as CooperativeGesturesHandlerMLGL, DoubleClickZoomHandler, DragPanHandler, DragRotateHandler, EdgeInsets, Evented, FullscreenControl as FullscreenControlMLGL, GeoJSONSource as GeoJSONSourceMLGL, GeolocateControl as GeolocateControlMLGL, Hash, ImageSource as ImageSourceMLGL, KeyboardHandler as KeyboardHandlerMLGL, LngLat, LngLatBounds, LogoControl as LogoControlMLGL, Map as MapMLGL, MapMouseEvent as MapMouseEventMLGL, MapTouchEvent as MapTouchEventMLGL, MapWheelEvent as MapWheelEventMLGL, Marker as MarkerMLGL, MercatorCoordinate, NavigationControl as NavigationControlMLGL, Point, Popup as PopupMLGL, RasterDEMTileSource as RasterDEMTileSourceMLGL, RasterTileSource as RasterTileSourceMLGL, ScaleControl as ScaleControlMLGL, ScrollZoomHandler as ScrollZoomHandlerMLGL, Style as StyleMLGL, TerrainControl as TerrainControlMLGL, TwoFingersTouchPitchHandler as TwoFingersTouchPitchHandlerMLGL, TwoFingersTouchRotateHandler, TwoFingersTouchZoomHandler, TwoFingersTouchZoomRotateHandler, VectorTileSource as VectorTileSourceMLGL, VideoSource as VideoSourceMLGL, addProtocol, addSourceType, clearPrewarmedResources, config as configMLGL, getVersion as getMapLibreVersion, getMaxParallelImageRequests, getRTLTextPluginStatus, getWorkerCount, getWorkerUrl, importScriptInWorkers, prewarm, removeProtocol, setMaxParallelImageRequests, setRTLTextPlugin, setWorkerCount, setWorkerUrl } from 'maplibre-gl';
|
|
3
4
|
import { FetchFunction, ReferenceMapStyle, MapStyleVariant } from '@maptiler/client';
|
|
4
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';
|
|
5
6
|
import EventEmitter from 'events';
|
|
@@ -184,7 +185,6 @@ declare class SdkConfig extends EventEmitter {
|
|
|
184
185
|
* MapTiler Cloud API key
|
|
185
186
|
*/
|
|
186
187
|
private _apiKey;
|
|
187
|
-
constructor();
|
|
188
188
|
/**
|
|
189
189
|
* Set the unit system
|
|
190
190
|
*/
|
|
@@ -210,7 +210,7 @@ declare class SdkConfig extends EventEmitter {
|
|
|
210
210
|
*/
|
|
211
211
|
get fetch(): FetchFunction | null;
|
|
212
212
|
}
|
|
213
|
-
declare const config
|
|
213
|
+
declare const config: SdkConfig;
|
|
214
214
|
|
|
215
215
|
/**
|
|
216
216
|
* This is an extension adds support for adding a minimap to one of the map's control containers.
|
|
@@ -1777,100 +1777,9 @@ declare const helpers: {
|
|
|
1777
1777
|
addHeatmap: typeof addHeatmap;
|
|
1778
1778
|
};
|
|
1779
1779
|
|
|
1780
|
-
declare const setRTLTextPlugin: typeof maplibregl__default.setRTLTextPlugin;
|
|
1781
|
-
declare const getRTLTextPluginStatus: typeof maplibregl__default.getRTLTextPluginStatus;
|
|
1782
|
-
declare const prewarm: typeof maplibregl__default.prewarm;
|
|
1783
|
-
declare const clearPrewarmedResources: typeof maplibregl__default.clearPrewarmedResources;
|
|
1784
|
-
declare const addProtocol: typeof maplibregl__default.addProtocol;
|
|
1785
|
-
declare const removeProtocol: typeof maplibregl__default.removeProtocol;
|
|
1786
|
-
declare const Hash: typeof maplibregl__default.Hash;
|
|
1787
|
-
declare const Point: typeof maplibregl__default.Point;
|
|
1788
|
-
declare const config: maplibregl__default.Config;
|
|
1789
|
-
declare const EdgeInsets: typeof maplibregl__default.EdgeInsets;
|
|
1790
|
-
declare const DragRotateHandler: typeof maplibregl__default.DragRotateHandler;
|
|
1791
|
-
declare const DragPanHandler: typeof maplibregl__default.DragPanHandler;
|
|
1792
|
-
declare const TwoFingersTouchZoomRotateHandler: typeof maplibregl__default.TwoFingersTouchZoomRotateHandler;
|
|
1793
|
-
declare const DoubleClickZoomHandler: typeof maplibregl__default.DoubleClickZoomHandler;
|
|
1794
|
-
declare const TwoFingersTouchZoomHandler: typeof maplibregl__default.TwoFingersTouchZoomHandler;
|
|
1795
|
-
declare const TwoFingersTouchRotateHandler: typeof maplibregl__default.TwoFingersTouchRotateHandler;
|
|
1796
|
-
declare const getWorkerCount: typeof maplibregl__default.getWorkerCount;
|
|
1797
|
-
declare const setWorkerCount: typeof maplibregl__default.setWorkerCount;
|
|
1798
|
-
declare const getMaxParallelImageRequests: typeof maplibregl__default.getMaxParallelImageRequests;
|
|
1799
|
-
declare const setMaxParallelImageRequests: typeof maplibregl__default.setMaxParallelImageRequests;
|
|
1800
|
-
declare const getWorkerUrl: typeof maplibregl__default.getWorkerUrl;
|
|
1801
|
-
declare const setWorkerUrl: typeof maplibregl__default.setWorkerUrl;
|
|
1802
|
-
declare const addSourceType: (name: string, SourceType: maplibregl__default.SourceClass) => Promise<void>;
|
|
1803
|
-
declare const importScriptInWorkers: typeof maplibregl__default.importScriptInWorkers;
|
|
1804
1780
|
/**
|
|
1805
1781
|
* Get the version of MapTiler SDK
|
|
1806
1782
|
*/
|
|
1807
1783
|
declare function getVersion(): string;
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
*/
|
|
1811
|
-
declare function getMapLibreVersion(): string;
|
|
1812
|
-
|
|
1813
|
-
declare const NavigationControlMLGL: typeof maplibregl__default.NavigationControl;
|
|
1814
|
-
type NavigationControlMLGL = InstanceType<typeof NavigationControlMLGL>;
|
|
1815
|
-
declare const GeolocateControlMLGL: typeof maplibregl__default.GeolocateControl;
|
|
1816
|
-
type GeolocateControlMLGL = InstanceType<typeof GeolocateControlMLGL>;
|
|
1817
|
-
declare const AttributionControlMLGL: typeof maplibregl__default.AttributionControl;
|
|
1818
|
-
type AttributionControlMLGL = InstanceType<typeof AttributionControlMLGL>;
|
|
1819
|
-
declare const LogoControlMLGL: typeof maplibregl__default.LogoControl;
|
|
1820
|
-
type LogoControlMLGL = InstanceType<typeof LogoControlMLGL>;
|
|
1821
|
-
declare const ScaleControlMLGL: typeof maplibregl__default.ScaleControl;
|
|
1822
|
-
type ScaleControlMLGL = InstanceType<typeof ScaleControlMLGL>;
|
|
1823
|
-
declare const FullscreenControlMLGL: typeof maplibregl__default.FullscreenControl;
|
|
1824
|
-
type FullscreenControlMLGL = InstanceType<typeof FullscreenControlMLGL>;
|
|
1825
|
-
declare const TerrainControlMLGL: typeof maplibregl__default.TerrainControl;
|
|
1826
|
-
type TerrainControlMLGL = InstanceType<typeof TerrainControlMLGL>;
|
|
1827
|
-
declare const MarkerMLGL: typeof maplibregl__default.Marker;
|
|
1828
|
-
type MarkerMLGL = InstanceType<typeof MarkerMLGL>;
|
|
1829
|
-
declare const PopupMLGL: typeof maplibregl__default.Popup;
|
|
1830
|
-
type PopupMLGL = InstanceType<typeof PopupMLGL>;
|
|
1831
|
-
declare const StyleMLGL: typeof maplibregl__default.Style;
|
|
1832
|
-
type StyleMLGL = InstanceType<typeof StyleMLGL>;
|
|
1833
|
-
declare const LngLat: typeof maplibregl__default.LngLat;
|
|
1834
|
-
type LngLat = InstanceType<typeof LngLat>;
|
|
1835
|
-
declare const LngLatBounds: typeof maplibregl__default.LngLatBounds;
|
|
1836
|
-
type LngLatBounds = InstanceType<typeof LngLatBounds>;
|
|
1837
|
-
declare const MercatorCoordinate: typeof maplibregl__default.MercatorCoordinate;
|
|
1838
|
-
type MercatorCoordinate = InstanceType<typeof MercatorCoordinate>;
|
|
1839
|
-
declare const Evented: typeof maplibregl__default.Evented;
|
|
1840
|
-
type Evented = InstanceType<typeof Evented>;
|
|
1841
|
-
declare const AJAXError: typeof maplibregl__default.AJAXError;
|
|
1842
|
-
type AJAXError = InstanceType<typeof AJAXError>;
|
|
1843
|
-
declare const CanvasSourceMLGL: typeof maplibregl__default.CanvasSource;
|
|
1844
|
-
type CanvasSourceMLGL = InstanceType<typeof CanvasSourceMLGL>;
|
|
1845
|
-
declare const GeoJSONSourceMLGL: typeof maplibregl__default.GeoJSONSource;
|
|
1846
|
-
type GeoJSONSourceMLGL = InstanceType<typeof GeoJSONSourceMLGL>;
|
|
1847
|
-
declare const ImageSourceMLGL: typeof maplibregl__default.ImageSource;
|
|
1848
|
-
type ImageSourceMLGL = InstanceType<typeof ImageSourceMLGL>;
|
|
1849
|
-
declare const RasterDEMTileSourceMLGL: typeof maplibregl__default.RasterDEMTileSource;
|
|
1850
|
-
type RasterDEMTileSourceMLGL = InstanceType<typeof RasterDEMTileSourceMLGL>;
|
|
1851
|
-
declare const RasterTileSourceMLGL: typeof maplibregl__default.RasterTileSource;
|
|
1852
|
-
type RasterTileSourceMLGL = InstanceType<typeof RasterTileSourceMLGL>;
|
|
1853
|
-
declare const VectorTileSourceMLGL: typeof maplibregl__default.VectorTileSource;
|
|
1854
|
-
type VectorTileSourceMLGL = InstanceType<typeof VectorTileSourceMLGL>;
|
|
1855
|
-
declare const VideoSourceMLGL: typeof maplibregl__default.VideoSource;
|
|
1856
|
-
type VideoSourceMLGL = InstanceType<typeof VideoSourceMLGL>;
|
|
1857
|
-
declare const MapMLGL: typeof maplibregl__default.Map;
|
|
1858
|
-
type MapMLGL = InstanceType<typeof MapMLGL>;
|
|
1859
|
-
declare const BoxZoomHandlerMLGL: typeof maplibregl__default.BoxZoomHandler;
|
|
1860
|
-
type BoxZoomHandlerMLGL = InstanceType<typeof BoxZoomHandlerMLGL>;
|
|
1861
|
-
declare const ScrollZoomHandlerMLGL: typeof maplibregl__default.ScrollZoomHandler;
|
|
1862
|
-
type ScrollZoomHandlerMLGL = InstanceType<typeof ScrollZoomHandlerMLGL>;
|
|
1863
|
-
declare const CooperativeGesturesHandlerMLGL: typeof maplibregl__default.CooperativeGesturesHandler;
|
|
1864
|
-
type CooperativeGesturesHandlerMLGL = InstanceType<typeof CooperativeGesturesHandlerMLGL>;
|
|
1865
|
-
declare const KeyboardHandlerMLGL: typeof maplibregl__default.KeyboardHandler;
|
|
1866
|
-
type KeyboardHandlerMLGL = InstanceType<typeof KeyboardHandlerMLGL>;
|
|
1867
|
-
declare const TwoFingersTouchPitchHandlerMLGL: typeof maplibregl__default.TwoFingersTouchPitchHandler;
|
|
1868
|
-
type TwoFingersTouchPitchHandlerMLGL = InstanceType<typeof TwoFingersTouchPitchHandlerMLGL>;
|
|
1869
|
-
declare const MapWheelEventMLGL: typeof maplibregl__default.MapWheelEvent;
|
|
1870
|
-
type MapWheelEventMLGL = InstanceType<typeof MapWheelEventMLGL>;
|
|
1871
|
-
declare const MapTouchEventMLGL: typeof maplibregl__default.MapTouchEvent;
|
|
1872
|
-
type MapTouchEventMLGL = InstanceType<typeof MapTouchEventMLGL>;
|
|
1873
|
-
declare const MapMouseEventMLGL: typeof maplibregl__default.MapMouseEvent;
|
|
1874
|
-
type MapMouseEventMLGL = InstanceType<typeof MapMouseEventMLGL>;
|
|
1875
|
-
|
|
1876
|
-
export { AJAXError, ArrayColor, ArrayColorRamp, ArrayColorRampStop, AttributionControl, AttributionControlMLGL, BoxZoomHandler, BoxZoomHandlerMLGL, CanvasSource, CanvasSourceMLGL, ColorRamp, ColorRampCollection, ColorRampOptions, ColorStop, CommonShapeLayerOptions, CooperativeGesturesHandler, CooperativeGesturesHandlerMLGL, DoubleClickZoomHandler, DragPanHandler, DragRotateHandler, EdgeInsets, Evented, FullscreenControl, FullscreenControlMLGL, GeoJSONSource, GeoJSONSourceMLGL, GeolocateControl, GeolocateControlMLGL, GeolocationType, Hash, HeatmapLayerOptions, ImageSource, ImageSourceMLGL, KeyboardHandler, KeyboardHandlerMLGL, Language, LanguageKey, LanguageString, Link, LngLat, LngLatBounds, LoadWithTerrainEvent, LogoControl, LogoControlMLGL, Map, MapMLGL, MapMouseEvent, MapMouseEventMLGL, MapOptions, MapTouchEvent, MapTouchEventMLGL, MapWheelEvent, MapWheelEventMLGL, MaptilerGeolocateControl, MaptilerLogoControl, MaptilerNavigationControl, MaptilerTerrainControl, Marker, MarkerMLGL, MercatorCoordinate, MinimapOptions, MinimapOptionsInput, NavigationControl, NavigationControlMLGL, ParentRect, PlacemarkProperties, Point, PointLayerOptions, PolygonLayerOptions, PolylineLayerOptions, Popup, PopupMLGL, PropertyValues, RasterDEMTileSource, RasterDEMTileSourceMLGL, RasterTileSource, RasterTileSourceMLGL, RgbaColor, ScaleControl, ScaleControlMLGL, ScrollZoomHandler, ScrollZoomHandlerMLGL, SdkConfig, Style, StyleMLGL, TerrainControl, TerrainControlMLGL, TwoFingersTouchPitchHandler, TwoFingersTouchPitchHandlerMLGL, TwoFingersTouchRotateHandler, TwoFingersTouchZoomHandler, TwoFingersTouchZoomRotateHandler, Unit, VectorTileSource, VectorTileSourceMLGL, VideoSource, VideoSourceMLGL, XMLProperties, ZoomNumberValues, ZoomStringValues, addProtocol, addSourceType, clearPrewarmedResources, config$1 as config, config as configMLGL, getBrowserLanguage, getMapLibreVersion, getMaxParallelImageRequests, getRTLTextPluginStatus, getVersion, getWorkerCount, getWorkerUrl, gpx, gpxOrKml, hasChildNodeWithName, helpers, importScriptInWorkers, isLanguageSupported, kml, prewarm, removeProtocol, setMaxParallelImageRequests, setRTLTextPlugin, setWorkerCount, setWorkerUrl, str2xml, xml2str };
|
|
1784
|
+
|
|
1785
|
+
export { type ArrayColor, type ArrayColorRamp, type ArrayColorRampStop, AttributionControl, BoxZoomHandler, CanvasSource, ColorRamp, ColorRampCollection, type ColorRampOptions, type ColorStop, type CommonShapeLayerOptions, CooperativeGesturesHandler, FullscreenControl, GeoJSONSource, GeolocateControl, GeolocationType, type HeatmapLayerOptions, ImageSource, KeyboardHandler, Language, type LanguageKey, type LanguageString, type Link, type LoadWithTerrainEvent, LogoControl, Map, MapMouseEvent, type MapOptions, MapTouchEvent, MapWheelEvent, MaptilerGeolocateControl, MaptilerLogoControl, MaptilerNavigationControl, MaptilerTerrainControl, Marker, type MinimapOptions, type MinimapOptionsInput, NavigationControl, type ParentRect, type PlacemarkProperties, type PointLayerOptions, type PolygonLayerOptions, type PolylineLayerOptions, Popup, type PropertyValues, RasterDEMTileSource, RasterTileSource, type RgbaColor, ScaleControl, ScrollZoomHandler, SdkConfig, Style, TerrainControl, TwoFingersTouchPitchHandler, type Unit, VectorTileSource, VideoSource, type XMLProperties, type ZoomNumberValues, type ZoomStringValues, config, getBrowserLanguage, getVersion, gpx, gpxOrKml, hasChildNodeWithName, helpers, isLanguageSupported, kml, str2xml, xml2str };
|