@maptiler/sdk 1.2.1 → 2.0.0

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.
Files changed (63) hide show
  1. package/.eslintrc.cjs +1 -0
  2. package/dist/maptiler-sdk.css +1 -1
  3. package/dist/maptiler-sdk.d.ts +171 -240
  4. package/dist/maptiler-sdk.min.mjs +3 -3
  5. package/dist/maptiler-sdk.mjs +462 -458
  6. package/dist/maptiler-sdk.mjs.map +1 -1
  7. package/package.json +3 -3
  8. package/readme.md +16 -1
  9. package/CHANGELOG.md +0 -168
  10. package/colorramp.md +0 -93
  11. package/dist/maptiler-sdk.umd.js +0 -7702
  12. package/dist/maptiler-sdk.umd.js.map +0 -1
  13. package/dist/maptiler-sdk.umd.min.js +0 -582
  14. package/src/AttributionControl.ts +0 -13
  15. package/src/CanvasSource.ts +0 -13
  16. package/src/FullscreenControl.ts +0 -13
  17. package/src/GeoJSONSource.ts +0 -13
  18. package/src/GeolocateControl.ts +0 -13
  19. package/src/ImageSource.ts +0 -13
  20. package/src/LogoControl.ts +0 -13
  21. package/src/Map.ts +0 -1352
  22. package/src/MaptilerGeolocateControl.ts +0 -207
  23. package/src/MaptilerLogoControl.ts +0 -58
  24. package/src/MaptilerNavigationControl.ts +0 -69
  25. package/src/MaptilerTerrainControl.ts +0 -72
  26. package/src/Marker.ts +0 -13
  27. package/src/Minimap.ts +0 -373
  28. package/src/NavigationControl.ts +0 -13
  29. package/src/Point.ts +0 -334
  30. package/src/Popup.ts +0 -13
  31. package/src/RasterDEMTileSource.ts +0 -13
  32. package/src/RasterTileSource.ts +0 -13
  33. package/src/ScaleControl.ts +0 -13
  34. package/src/Style.ts +0 -13
  35. package/src/TerrainControl.ts +0 -13
  36. package/src/VectorTileSource.ts +0 -13
  37. package/src/VideoSource.ts +0 -13
  38. package/src/colorramp.ts +0 -1216
  39. package/src/config.ts +0 -96
  40. package/src/converters/index.ts +0 -1
  41. package/src/converters/xml.ts +0 -681
  42. package/src/defaults.ts +0 -20
  43. package/src/helpers/index.ts +0 -27
  44. package/src/helpers/stylehelper.ts +0 -395
  45. package/src/helpers/vectorlayerhelpers.ts +0 -1511
  46. package/src/index.ts +0 -201
  47. package/src/language.ts +0 -183
  48. package/src/mapstyle.ts +0 -46
  49. package/src/style/style_template.css +0 -146
  50. package/src/style/svg/v6-compass.svg +0 -12
  51. package/src/style/svg/v6-fullscreen-off.svg +0 -7
  52. package/src/style/svg/v6-fullscreen.svg +0 -7
  53. package/src/style/svg/v6-geolocate-active-error.svg +0 -10
  54. package/src/style/svg/v6-geolocate-active.svg +0 -7
  55. package/src/style/svg/v6-geolocate-background.svg +0 -8
  56. package/src/style/svg/v6-geolocate-disabled.svg +0 -10
  57. package/src/style/svg/v6-geolocate.svg +0 -7
  58. package/src/style/svg/v6-terrain-on.svg +0 -7
  59. package/src/style/svg/v6-terrain.svg +0 -7
  60. package/src/style/svg/v6-zoom-minus.svg +0 -7
  61. package/src/style/svg/v6-zoom-plus.svg +0 -7
  62. package/src/tools.ts +0 -171
  63. package/src/unit.ts +0 -1
@@ -1,5 +1,4 @@
1
- import * as maplibre_gl from 'maplibre-gl';
2
- import maplibre_gl__default, { LineLayerSpecification, FillLayerSpecification, StyleSpecification, ControlPosition, MapOptions as MapOptions$1, StyleSwapOptions, StyleOptions, LayerSpecification, SourceSpecification, CustomLayerInterface, FilterSpecification, StyleSetterOptions, RequestTransformFunction, Map as Map$1, LogoOptions as LogoOptions$1, IControl } from 'maplibre-gl';
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';
3
2
  export * from 'maplibre-gl';
4
3
  import { FetchFunction, ReferenceMapStyle, MapStyleVariant } from '@maptiler/client';
5
4
  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';
@@ -171,6 +170,12 @@ declare class SdkConfig extends EventEmitter {
171
170
  * on the MapTiler Cloud API. This allows MapTiler to enable "session based billing".
172
171
  */
173
172
  session: boolean;
173
+ /**
174
+ * Enables client-side caching of requests for tiles and fonts.
175
+ * The cached requests persist multiple browser sessions and will be reused when possible.
176
+ * Works only for requests to the MapTiler Cloud API when sessions are enabled.
177
+ */
178
+ caching: boolean;
174
179
  /**
175
180
  * Unit to be used
176
181
  */
@@ -205,7 +210,7 @@ declare class SdkConfig extends EventEmitter {
205
210
  */
206
211
  get fetch(): FetchFunction | null;
207
212
  }
208
- declare const config: SdkConfig;
213
+ declare const config$1: SdkConfig;
209
214
 
210
215
  /**
211
216
  * This is an extension adds support for adding a minimap to one of the map's control containers.
@@ -293,6 +298,10 @@ type MapOptions = Omit<MapOptions$1, "style" | "maplibreLogo"> & {
293
298
  * For free plans: MapTiler logo always shows, regardless of the value.
294
299
  */
295
300
  maptilerLogo?: boolean;
301
+ /**
302
+ * Attribution text to show in an {@link AttributionControl}.
303
+ */
304
+ customAttribution?: string | Array<string>;
296
305
  /**
297
306
  * Enables 3D terrain if `true`. (default: `false`)
298
307
  */
@@ -354,7 +363,7 @@ type MapOptions = Omit<MapOptions$1, "style" | "maplibreLogo"> & {
354
363
  /**
355
364
  * The Map class can be instanciated to display a map in a `<div>`
356
365
  */
357
- declare class Map extends maplibre_gl__default.Map {
366
+ declare class Map extends maplibregl__default.Map {
358
367
  private isTerrainEnabled;
359
368
  private terrainExaggeration;
360
369
  private primaryLanguage;
@@ -586,17 +595,13 @@ declare class Map extends maplibre_gl__default.Map {
586
595
  * map.setTransformRequest((url: string, resourceType: string) => {});
587
596
  */
588
597
  setTransformRequest(transformRequest: RequestTransformFunction): this;
589
- /**
590
- * Loads an image. This is an async equivalent of `Map.loadImage`
591
- */
592
- loadImageAsync(url: string): Promise<HTMLImageElement | ImageBitmap | null | undefined>;
593
598
  }
594
599
 
595
600
  /**
596
601
  * This is an extension of MapLibre Marker to make it fully type compatible with the SDK
597
602
  */
598
603
 
599
- declare class Marker extends maplibre_gl__default.Marker {
604
+ declare class Marker extends maplibregl__default.Marker {
600
605
  addTo(map: Map | Map$1): this;
601
606
  }
602
607
 
@@ -604,7 +609,7 @@ declare class Marker extends maplibre_gl__default.Marker {
604
609
  * This is an extension of MapLibre Popup to make it fully type compatible with the SDK
605
610
  */
606
611
 
607
- declare class Popup extends maplibre_gl__default.Popup {
612
+ declare class Popup extends maplibregl__default.Popup {
608
613
  addTo(map: Map | Map$1): this;
609
614
  }
610
615
 
@@ -612,7 +617,7 @@ declare class Popup extends maplibre_gl__default.Popup {
612
617
  * This is an extension of MapLibre Style to make it fully type compatible with the SDK
613
618
  */
614
619
 
615
- declare class Style extends maplibre_gl__default.Style {
620
+ declare class Style extends maplibregl__default.Style {
616
621
  constructor(map: Map, options?: StyleOptions);
617
622
  }
618
623
 
@@ -620,7 +625,7 @@ declare class Style extends maplibre_gl__default.Style {
620
625
  * This is an extension of MapLibre CanvasSource to make it fully type compatible with the SDK
621
626
  */
622
627
 
623
- declare class CanvasSource extends maplibre_gl__default.CanvasSource {
628
+ declare class CanvasSource extends maplibregl__default.CanvasSource {
624
629
  onAdd(map: Map | Map$1): void;
625
630
  }
626
631
 
@@ -628,7 +633,7 @@ declare class CanvasSource extends maplibre_gl__default.CanvasSource {
628
633
  * This is an extension of MapLibre GeoJSONSource to make it fully type compatible with the SDK
629
634
  */
630
635
 
631
- declare class GeoJSONSource extends maplibre_gl__default.GeoJSONSource {
636
+ declare class GeoJSONSource extends maplibregl__default.GeoJSONSource {
632
637
  onAdd(map: Map | Map$1): void;
633
638
  }
634
639
 
@@ -636,7 +641,7 @@ declare class GeoJSONSource extends maplibre_gl__default.GeoJSONSource {
636
641
  * This is an extension of MapLibre ImageSource to make it fully type compatible with the SDK
637
642
  */
638
643
 
639
- declare class ImageSource extends maplibre_gl__default.ImageSource {
644
+ declare class ImageSource extends maplibregl__default.ImageSource {
640
645
  onAdd(map: Map | Map$1): void;
641
646
  }
642
647
 
@@ -644,7 +649,7 @@ declare class ImageSource extends maplibre_gl__default.ImageSource {
644
649
  * This is an extension of MapLibre RasterTileSource to make it fully type compatible with the SDK
645
650
  */
646
651
 
647
- declare class RasterTileSource extends maplibre_gl__default.RasterTileSource {
652
+ declare class RasterTileSource extends maplibregl__default.RasterTileSource {
648
653
  onAdd(map: Map | Map$1): void;
649
654
  }
650
655
 
@@ -652,7 +657,7 @@ declare class RasterTileSource extends maplibre_gl__default.RasterTileSource {
652
657
  * This is an extension of MapLibre RasterDEMTileSource to make it fully type compatible with the SDK
653
658
  */
654
659
 
655
- declare class RasterDEMTileSource extends maplibre_gl__default.RasterDEMTileSource {
660
+ declare class RasterDEMTileSource extends maplibregl__default.RasterDEMTileSource {
656
661
  onAdd(map: Map | Map$1): void;
657
662
  }
658
663
 
@@ -660,7 +665,7 @@ declare class RasterDEMTileSource extends maplibre_gl__default.RasterDEMTileSour
660
665
  * This is an extension of MapLibre VectorTileSource to make it fully type compatible with the SDK
661
666
  */
662
667
 
663
- declare class VectorTileSource extends maplibre_gl__default.VectorTileSource {
668
+ declare class VectorTileSource extends maplibregl__default.VectorTileSource {
664
669
  onAdd(map: Map | Map$1): void;
665
670
  }
666
671
 
@@ -668,7 +673,7 @@ declare class VectorTileSource extends maplibre_gl__default.VectorTileSource {
668
673
  * This is an extension of MapLibre VideoSource to make it fully type compatible with the SDK
669
674
  */
670
675
 
671
- declare class VideoSource extends maplibre_gl__default.VideoSource {
676
+ declare class VideoSource extends maplibregl__default.VideoSource {
672
677
  onAdd(map: Map | Map$1): void;
673
678
  }
674
679
 
@@ -676,7 +681,7 @@ declare class VideoSource extends maplibre_gl__default.VideoSource {
676
681
  * This is an extension of MapLibre NavigationControl to make it fully type compatible with the SDK
677
682
  */
678
683
 
679
- declare class NavigationControl extends maplibre_gl__default.NavigationControl {
684
+ declare class NavigationControl extends maplibregl__default.NavigationControl {
680
685
  onAdd(map: Map | Map$1): HTMLElement;
681
686
  }
682
687
 
@@ -684,7 +689,7 @@ declare class NavigationControl extends maplibre_gl__default.NavigationControl {
684
689
  * This is an extension of MapLibre GeolocateControl to make it fully type compatible with the SDK
685
690
  */
686
691
 
687
- declare class GeolocateControl extends maplibre_gl__default.GeolocateControl {
692
+ declare class GeolocateControl extends maplibregl__default.GeolocateControl {
688
693
  onAdd(map: Map | Map$1): HTMLElement;
689
694
  }
690
695
 
@@ -692,7 +697,7 @@ declare class GeolocateControl extends maplibre_gl__default.GeolocateControl {
692
697
  * This is an extension of MapLibre AttributionControl to make it fully type compatible with the SDK
693
698
  */
694
699
 
695
- declare class AttributionControl extends maplibre_gl__default.AttributionControl {
700
+ declare class AttributionControl extends maplibregl__default.AttributionControl {
696
701
  onAdd(map: Map | Map$1): HTMLElement;
697
702
  }
698
703
 
@@ -700,7 +705,7 @@ declare class AttributionControl extends maplibre_gl__default.AttributionControl
700
705
  * This is an extension of MapLibre LogoControl to make it fully type compatible with the SDK
701
706
  */
702
707
 
703
- declare class LogoControl extends maplibre_gl__default.LogoControl {
708
+ declare class LogoControl extends maplibregl__default.LogoControl {
704
709
  onAdd(map: Map | Map$1): HTMLElement;
705
710
  }
706
711
 
@@ -708,7 +713,7 @@ declare class LogoControl extends maplibre_gl__default.LogoControl {
708
713
  * This is an extension of MapLibre ScaleControl to make it fully type compatible with the SDK
709
714
  */
710
715
 
711
- declare class ScaleControl extends maplibre_gl__default.ScaleControl {
716
+ declare class ScaleControl extends maplibregl__default.ScaleControl {
712
717
  onAdd(map: Map | Map$1): HTMLElement;
713
718
  }
714
719
 
@@ -716,7 +721,7 @@ declare class ScaleControl extends maplibre_gl__default.ScaleControl {
716
721
  * This is an extension of MapLibre FullscreenControl to make it fully type compatible with the SDK
717
722
  */
718
723
 
719
- declare class FullscreenControl extends maplibre_gl__default.FullscreenControl {
724
+ declare class FullscreenControl extends maplibregl__default.FullscreenControl {
720
725
  onAdd(map: Map | Map$1): HTMLElement;
721
726
  }
722
727
 
@@ -724,10 +729,76 @@ declare class FullscreenControl extends maplibre_gl__default.FullscreenControl {
724
729
  * This is an extension of MapLibre TerrainControl to make it fully type compatible with the SDK
725
730
  */
726
731
 
727
- declare class TerrainControl extends maplibre_gl__default.TerrainControl {
732
+ declare class TerrainControl extends maplibregl__default.TerrainControl {
728
733
  onAdd(map: Map | Map$1): HTMLElement;
729
734
  }
730
735
 
736
+ /**
737
+ * This is an extension of MapLibre BoxZoomHandler to make it fully type compatible with the SDK
738
+ */
739
+
740
+ declare class BoxZoomHandler extends maplibregl__default.BoxZoomHandler {
741
+ constructor(map: Map | Map$1, options: {
742
+ clickTolerance: number;
743
+ });
744
+ }
745
+
746
+ /**
747
+ * This is an extension of MapLibre BoxZoomHandler to make it fully type compatible with the SDK
748
+ */
749
+
750
+ declare class ScrollZoomHandler extends maplibregl__default.ScrollZoomHandler {
751
+ constructor(map: Map | Map$1, triggerRenderFrame: () => void);
752
+ }
753
+
754
+ /**
755
+ * This is an extension of MapLibre BoxZoomHandler to make it fully type compatible with the SDK
756
+ */
757
+
758
+ declare class CooperativeGesturesHandler extends maplibregl__default.CooperativeGesturesHandler {
759
+ constructor(map: Map | Map$1, options: GestureOptions);
760
+ }
761
+
762
+ /**
763
+ * This is an extension of MapLibre BoxZoomHandler to make it fully type compatible with the SDK
764
+ */
765
+
766
+ declare class KeyboardHandler extends maplibregl__default.KeyboardHandler {
767
+ constructor(map: Map | Map$1);
768
+ }
769
+
770
+ /**
771
+ * This is an extension of MapLibre BoxZoomHandler to make it fully type compatible with the SDK
772
+ */
773
+
774
+ declare class TwoFingersTouchPitchHandler extends maplibregl__default.TwoFingersTouchPitchHandler {
775
+ constructor(map: Map | Map$1);
776
+ }
777
+
778
+ /**
779
+ * This is an extension of MapLibre BoxZoomHandler to make it fully type compatible with the SDK
780
+ */
781
+
782
+ declare class MapWheelEvent extends maplibregl__default.MapWheelEvent {
783
+ constructor(type: string, map: Map | Map$1, originalEvent: WheelEvent);
784
+ }
785
+
786
+ /**
787
+ * This is an extension of MapLibre BoxZoomHandler to make it fully type compatible with the SDK
788
+ */
789
+
790
+ declare class MapTouchEvent extends maplibregl__default.MapTouchEvent {
791
+ constructor(type: string, map: Map | Map$1, originalEvent: TouchEvent);
792
+ }
793
+
794
+ /**
795
+ * This is an extension of MapLibre BoxZoomHandler to make it fully type compatible with the SDK
796
+ */
797
+
798
+ declare class MapMouseEvent extends maplibregl__default.MapMouseEvent {
799
+ constructor(type: string, map: Map | Map$1, originalEvent: MouseEvent, data?: any);
800
+ }
801
+
731
802
  /**
732
803
  * The MaptilerGeolocateControl is an extension of the original GeolocateControl
733
804
  * with a few changes. In this version, the active mode persists as long as the
@@ -748,7 +819,7 @@ declare class MaptilerGeolocateControl extends GeolocateControl {
748
819
  _onZoom: () => void;
749
820
  }
750
821
 
751
- type LogoOptions = LogoOptions$1 & {
822
+ type LogoControlOptions = LogoControlOptions$1 & {
752
823
  logoURL?: string;
753
824
  linkURL?: string;
754
825
  };
@@ -760,7 +831,7 @@ declare class MaptilerLogoControl extends LogoControl {
760
831
  _compact: boolean;
761
832
  private logoURL;
762
833
  private linkURL;
763
- constructor(options?: LogoOptions);
834
+ constructor(options?: LogoControlOptions);
764
835
  onAdd(map: Map): HTMLElement;
765
836
  }
766
837
 
@@ -794,184 +865,6 @@ declare class MaptilerNavigationControl extends NavigationControl {
794
865
  _rotateCompassArrow: () => void;
795
866
  }
796
867
 
797
- /**
798
- * This is TypeScript rewrite of the Point class to use instead of the version imported in MapLibre.
799
- * It also uses a class instead of prototypes.
800
- */
801
- /**
802
- * Row major 2x2 matrix
803
- */
804
- type Matrix2 = [number, number, number, number];
805
- /**
806
- * a point
807
- */
808
- declare class Point {
809
- x: number;
810
- y: number;
811
- constructor(x: number, y: number);
812
- private _matMult;
813
- private _add;
814
- private _sub;
815
- private _mult;
816
- private _div;
817
- private _multByPoint;
818
- private _divByPoint;
819
- private _unit;
820
- private _perp;
821
- private _rotate;
822
- private _rotateAround;
823
- private _round;
824
- /**
825
- * Clone this point, returning a new point that can be modified
826
- * without affecting the old one.
827
- * @return {Point} the clone
828
- */
829
- clone(): Point;
830
- /**
831
- * Add this point's x & y coordinates to another point,
832
- * yielding a new point.
833
- * @param {Point} p the other point
834
- * @return {Point} output point
835
- */
836
- add(p: Point): Point;
837
- /**
838
- * Subtract this point's x & y coordinates to from point,
839
- * yielding a new point.
840
- * @param {Point} p the other point
841
- * @return {Point} output point
842
- */
843
- sub(p: Point): Point;
844
- /**
845
- * Multiply this point's x & y coordinates by point,
846
- * yielding a new point.
847
- * @param {Point} p the other point
848
- * @return {Point} output point
849
- */
850
- multByPoint(p: Point): Point;
851
- /**
852
- * Divide this point's x & y coordinates by point,
853
- * yielding a new point.
854
- * @param {Point} p the other point
855
- * @return {Point} output point
856
- */
857
- divByPoint(p: Point): Point;
858
- /**
859
- * Multiply this point's x & y coordinates by a factor,
860
- * yielding a new point.
861
- * @param {Number} k factor
862
- * @return {Point} output point
863
- */
864
- mult(k: number): Point;
865
- /**
866
- * Divide this point's x & y coordinates by a factor,
867
- * yielding a new point.
868
- * @param {Point} k factor
869
- * @return {Point} output point
870
- */
871
- div(k: number): Point;
872
- /**
873
- * Rotate this point around the 0, 0 origin by an angle a,
874
- * given in radians
875
- * @param {Number} a angle to rotate around, in radians
876
- * @return {Point} output point
877
- */
878
- rotate(a: number): Point;
879
- /**
880
- * Rotate this point around p point by an angle a,
881
- * given in radians
882
- * @param {Number} a angle to rotate around, in radians
883
- * @param {Point} p Point to rotate around
884
- * @return {Point} output point
885
- */
886
- rotateAround(a: number, p: Point): Point;
887
- /**
888
- * Multiply this point by a 4x1 transformation matrix
889
- * @param {Array<Number>} m transformation matrix
890
- * @return {Point} output point
891
- */
892
- matMult(m: Matrix2): Point;
893
- /**
894
- * Calculate this point but as a unit vector from 0, 0, meaning
895
- * that the distance from the resulting point to the 0, 0
896
- * coordinate will be equal to 1 and the angle from the resulting
897
- * point to the 0, 0 coordinate will be the same as before.
898
- * @return {Point} unit vector point
899
- */
900
- unit(): Point;
901
- /**
902
- * Compute a perpendicular point, where the new y coordinate
903
- * is the old x coordinate and the new x coordinate is the old y
904
- * coordinate multiplied by -1
905
- * @return {Point} perpendicular point
906
- */
907
- perp(): Point;
908
- /**
909
- * Return a version of this point with the x & y coordinates
910
- * rounded to integers.
911
- * @return {Point} rounded point
912
- */
913
- round(): Point;
914
- /**
915
- * Return the magnitude of this point: this is the Euclidean
916
- * distance from the 0, 0 coordinate to this point's x and y
917
- * coordinates.
918
- * @return {Number} magnitude
919
- */
920
- mag(): number;
921
- /**
922
- * Judge whether this point is equal to another point, returning
923
- * true or false.
924
- * @param {Point} other the other point
925
- * @return {boolean} whether the points are equal
926
- */
927
- equals(other: Point): boolean;
928
- /**
929
- * Calculate the distance from this point to another point
930
- * @param {Point} p the other point
931
- * @return {Number} distance
932
- */
933
- dist(p: Point): number;
934
- /**
935
- * Calculate the distance from this point to another point,
936
- * without the square root step. Useful if you're comparing
937
- * relative distances.
938
- * @param {Point} p the other point
939
- * @return {Number} distance
940
- */
941
- distSqr(p: Point): number;
942
- /**
943
- * Get the angle from the 0, 0 coordinate to this point, in radians
944
- * coordinates.
945
- * @return {Number} angle
946
- */
947
- angle(): number;
948
- /**
949
- * Get the angle from this point to another point, in radians
950
- * @param {Point} b the other point
951
- * @return {Number} angle
952
- */
953
- angleTo(b: Point): number;
954
- /**
955
- * Get the angle between this point and another point, in radians
956
- * @param {Point} b the other point
957
- * @return {Number} angle
958
- */
959
- angleWith(b: Point): number;
960
- angleWithSep(x: number, y: number): number;
961
- /**
962
- * Construct a point from an array if necessary, otherwise if the input
963
- * is already a Point, or an unknown type, return it unchanged
964
- * @param {Array<number> | Point} a any kind of input value
965
- * @return {Point} constructed point, or passed-through value.
966
- * @example
967
- * // this
968
- * var point = Point.convert([0, 1]);
969
- * // is equivalent to
970
- * var point = new Point(0, 1);
971
- */
972
- static convert(a: Point | Array<number>): Point;
973
- }
974
-
975
868
  interface Link {
976
869
  href: string | null;
977
870
  }
@@ -1884,62 +1777,100 @@ declare const helpers: {
1884
1777
  addHeatmap: typeof addHeatmap;
1885
1778
  };
1886
1779
 
1887
- declare const setRTLTextPlugin: (url: string, callback: (error?: Error | undefined) => void, deferred?: boolean | undefined) => void;
1888
- declare const getRTLTextPluginStatus: () => string;
1889
- declare const prewarm: () => void;
1890
- declare const clearPrewarmedResources: () => void;
1891
- declare const version: string;
1892
- declare const workerCount: number;
1893
- declare const maxParallelImageRequests: number;
1894
- declare const workerUrl: string;
1895
- declare const addProtocol: typeof maplibre_gl__default.addProtocol;
1896
- declare const removeProtocol: typeof maplibre_gl__default.removeProtocol;
1897
-
1898
- declare const NavigationControlMLGL: typeof maplibre_gl.NavigationControl;
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
+ /**
1805
+ * Get the version of MapTiler SDK
1806
+ */
1807
+ declare function getVersion(): string;
1808
+ /**
1809
+ * Get the version of MapLibre GL JS
1810
+ */
1811
+ declare function getMapLibreVersion(): string;
1812
+
1813
+ declare const NavigationControlMLGL: typeof maplibregl__default.NavigationControl;
1899
1814
  type NavigationControlMLGL = InstanceType<typeof NavigationControlMLGL>;
1900
- declare const GeolocateControlMLGL: typeof maplibre_gl.GeolocateControl;
1815
+ declare const GeolocateControlMLGL: typeof maplibregl__default.GeolocateControl;
1901
1816
  type GeolocateControlMLGL = InstanceType<typeof GeolocateControlMLGL>;
1902
- declare const AttributionControlMLGL: typeof maplibre_gl.AttributionControl;
1817
+ declare const AttributionControlMLGL: typeof maplibregl__default.AttributionControl;
1903
1818
  type AttributionControlMLGL = InstanceType<typeof AttributionControlMLGL>;
1904
- declare const LogoControlMLGL: typeof maplibre_gl.LogoControl;
1819
+ declare const LogoControlMLGL: typeof maplibregl__default.LogoControl;
1905
1820
  type LogoControlMLGL = InstanceType<typeof LogoControlMLGL>;
1906
- declare const ScaleControlMLGL: typeof maplibre_gl.ScaleControl;
1821
+ declare const ScaleControlMLGL: typeof maplibregl__default.ScaleControl;
1907
1822
  type ScaleControlMLGL = InstanceType<typeof ScaleControlMLGL>;
1908
- declare const FullscreenControlMLGL: typeof maplibre_gl.FullscreenControl;
1823
+ declare const FullscreenControlMLGL: typeof maplibregl__default.FullscreenControl;
1909
1824
  type FullscreenControlMLGL = InstanceType<typeof FullscreenControlMLGL>;
1910
- declare const TerrainControlMLGL: typeof maplibre_gl.TerrainControl;
1825
+ declare const TerrainControlMLGL: typeof maplibregl__default.TerrainControl;
1911
1826
  type TerrainControlMLGL = InstanceType<typeof TerrainControlMLGL>;
1912
- declare const MarkerMLGL: typeof maplibre_gl.Marker;
1827
+ declare const MarkerMLGL: typeof maplibregl__default.Marker;
1913
1828
  type MarkerMLGL = InstanceType<typeof MarkerMLGL>;
1914
- declare const PopupMLGL: typeof maplibre_gl.Popup;
1829
+ declare const PopupMLGL: typeof maplibregl__default.Popup;
1915
1830
  type PopupMLGL = InstanceType<typeof PopupMLGL>;
1916
- declare const StyleMLGL: typeof maplibre_gl.Style;
1831
+ declare const StyleMLGL: typeof maplibregl__default.Style;
1917
1832
  type StyleMLGL = InstanceType<typeof StyleMLGL>;
1918
- declare const LngLat: typeof maplibre_gl.LngLat;
1833
+ declare const LngLat: typeof maplibregl__default.LngLat;
1919
1834
  type LngLat = InstanceType<typeof LngLat>;
1920
- declare const LngLatBounds: typeof maplibre_gl.LngLatBounds;
1835
+ declare const LngLatBounds: typeof maplibregl__default.LngLatBounds;
1921
1836
  type LngLatBounds = InstanceType<typeof LngLatBounds>;
1922
- declare const MercatorCoordinate: typeof maplibre_gl.MercatorCoordinate;
1837
+ declare const MercatorCoordinate: typeof maplibregl__default.MercatorCoordinate;
1923
1838
  type MercatorCoordinate = InstanceType<typeof MercatorCoordinate>;
1924
- declare const Evented: typeof maplibre_gl.Evented;
1839
+ declare const Evented: typeof maplibregl__default.Evented;
1925
1840
  type Evented = InstanceType<typeof Evented>;
1926
- declare const AJAXError: typeof maplibre_gl.AJAXError;
1841
+ declare const AJAXError: typeof maplibregl__default.AJAXError;
1927
1842
  type AJAXError = InstanceType<typeof AJAXError>;
1928
- declare const CanvasSourceMLGL: typeof maplibre_gl.CanvasSource;
1843
+ declare const CanvasSourceMLGL: typeof maplibregl__default.CanvasSource;
1929
1844
  type CanvasSourceMLGL = InstanceType<typeof CanvasSourceMLGL>;
1930
- declare const GeoJSONSourceMLGL: typeof maplibre_gl.GeoJSONSource;
1845
+ declare const GeoJSONSourceMLGL: typeof maplibregl__default.GeoJSONSource;
1931
1846
  type GeoJSONSourceMLGL = InstanceType<typeof GeoJSONSourceMLGL>;
1932
- declare const ImageSourceMLGL: typeof maplibre_gl.ImageSource;
1847
+ declare const ImageSourceMLGL: typeof maplibregl__default.ImageSource;
1933
1848
  type ImageSourceMLGL = InstanceType<typeof ImageSourceMLGL>;
1934
- declare const RasterDEMTileSourceMLGL: typeof maplibre_gl.RasterDEMTileSource;
1849
+ declare const RasterDEMTileSourceMLGL: typeof maplibregl__default.RasterDEMTileSource;
1935
1850
  type RasterDEMTileSourceMLGL = InstanceType<typeof RasterDEMTileSourceMLGL>;
1936
- declare const RasterTileSourceMLGL: typeof maplibre_gl.RasterTileSource;
1851
+ declare const RasterTileSourceMLGL: typeof maplibregl__default.RasterTileSource;
1937
1852
  type RasterTileSourceMLGL = InstanceType<typeof RasterTileSourceMLGL>;
1938
- declare const VectorTileSourceMLGL: typeof maplibre_gl.VectorTileSource;
1853
+ declare const VectorTileSourceMLGL: typeof maplibregl__default.VectorTileSource;
1939
1854
  type VectorTileSourceMLGL = InstanceType<typeof VectorTileSourceMLGL>;
1940
- declare const VideoSourceMLGL: typeof maplibre_gl.VideoSource;
1855
+ declare const VideoSourceMLGL: typeof maplibregl__default.VideoSource;
1941
1856
  type VideoSourceMLGL = InstanceType<typeof VideoSourceMLGL>;
1942
- declare const MapMLGL: typeof maplibre_gl.Map;
1857
+ declare const MapMLGL: typeof maplibregl__default.Map;
1943
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>;
1944
1875
 
1945
- export { AJAXError, ArrayColor, ArrayColorRamp, ArrayColorRampStop, AttributionControl, AttributionControlMLGL, CanvasSource, CanvasSourceMLGL, ColorRamp, ColorRampCollection, ColorRampOptions, ColorStop, CommonShapeLayerOptions, Evented, FullscreenControl, FullscreenControlMLGL, GeoJSONSource, GeoJSONSourceMLGL, GeolocateControl, GeolocateControlMLGL, GeolocationType, HeatmapLayerOptions, ImageSource, ImageSourceMLGL, Language, LanguageKey, LanguageString, Link, LngLat, LngLatBounds, LoadWithTerrainEvent, LogoControl, LogoControlMLGL, Map, MapMLGL, MapOptions, MaptilerGeolocateControl, MaptilerLogoControl, MaptilerNavigationControl, MaptilerTerrainControl, Marker, MarkerMLGL, Matrix2, MercatorCoordinate, MinimapOptions, MinimapOptionsInput, NavigationControl, NavigationControlMLGL, ParentRect, PlacemarkProperties, Point, PointLayerOptions, PolygonLayerOptions, PolylineLayerOptions, Popup, PopupMLGL, PropertyValues, RasterDEMTileSource, RasterDEMTileSourceMLGL, RasterTileSource, RasterTileSourceMLGL, RgbaColor, ScaleControl, ScaleControlMLGL, SdkConfig, Style, StyleMLGL, TerrainControl, TerrainControlMLGL, Unit, VectorTileSource, VectorTileSourceMLGL, VideoSource, VideoSourceMLGL, XMLProperties, ZoomNumberValues, ZoomStringValues, addProtocol, clearPrewarmedResources, config, getBrowserLanguage, getRTLTextPluginStatus, gpx, gpxOrKml, hasChildNodeWithName, helpers, isLanguageSupported, kml, maxParallelImageRequests, prewarm, removeProtocol, setRTLTextPlugin, str2xml, version, workerCount, workerUrl, xml2str };
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 };