@maptiler/sdk 3.1.0-rc7 → 3.1.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 (61) hide show
  1. package/README.md +7 -118
  2. package/dist/eslint.config.d.mts +2 -0
  3. package/dist/maptiler-sdk.d.ts +2 -0
  4. package/dist/maptiler-sdk.mjs +10789 -0
  5. package/dist/maptiler-sdk.mjs.map +1 -0
  6. package/dist/src/ColorRamp.d.ts +359 -0
  7. package/dist/src/MLAdapters/AttributionControl.d.ts +5 -0
  8. package/dist/src/MLAdapters/BoxZoomHandler.d.ts +7 -0
  9. package/dist/src/MLAdapters/CanvasSource.d.ts +5 -0
  10. package/dist/src/MLAdapters/CooperativeGesturesHandler.d.ts +5 -0
  11. package/dist/src/MLAdapters/FullscreenControl.d.ts +5 -0
  12. package/dist/src/MLAdapters/GeoJSONSource.d.ts +5 -0
  13. package/dist/src/MLAdapters/GeolocateControl.d.ts +5 -0
  14. package/dist/src/MLAdapters/ImageSource.d.ts +5 -0
  15. package/dist/src/MLAdapters/KeyboardHandler.d.ts +5 -0
  16. package/dist/src/MLAdapters/LogoControl.d.ts +5 -0
  17. package/dist/src/MLAdapters/MapMouseEvent.d.ts +5 -0
  18. package/dist/src/MLAdapters/MapTouchEvent.d.ts +5 -0
  19. package/dist/src/MLAdapters/MapWheelEvent.d.ts +5 -0
  20. package/dist/src/MLAdapters/Marker.d.ts +5 -0
  21. package/dist/src/MLAdapters/NavigationControl.d.ts +5 -0
  22. package/dist/src/MLAdapters/Popup.d.ts +5 -0
  23. package/dist/src/MLAdapters/RasterDEMTileSource.d.ts +5 -0
  24. package/dist/src/MLAdapters/RasterTileSource.d.ts +5 -0
  25. package/dist/src/MLAdapters/ScaleControl.d.ts +5 -0
  26. package/dist/src/MLAdapters/ScrollZoomHandler.d.ts +5 -0
  27. package/dist/src/MLAdapters/Style.d.ts +5 -0
  28. package/dist/src/MLAdapters/TerrainControl.d.ts +5 -0
  29. package/dist/src/MLAdapters/TwoFingersTouchPitchHandler.d.ts +5 -0
  30. package/dist/src/MLAdapters/VectorTileSource.d.ts +5 -0
  31. package/dist/src/MLAdapters/VideoSource.d.ts +5 -0
  32. package/dist/src/Map.d.ts +403 -0
  33. package/dist/src/Point.d.ts +177 -0
  34. package/dist/src/Telemetry.d.ts +21 -0
  35. package/dist/src/caching.d.ts +4 -0
  36. package/dist/src/config.d.ts +85 -0
  37. package/dist/src/constants/defaults.d.ts +15 -0
  38. package/dist/src/controls/MaptilerGeolocateControl.d.ts +21 -0
  39. package/dist/src/controls/MaptilerLogoControl.d.ts +19 -0
  40. package/dist/src/controls/MaptilerNavigationControl.d.ts +17 -0
  41. package/dist/src/controls/MaptilerProjectionControl.d.ts +14 -0
  42. package/dist/src/controls/MaptilerTerrainControl.d.ts +16 -0
  43. package/dist/src/controls/Minimap.d.ts +57 -0
  44. package/dist/src/controls/index.d.ts +6 -0
  45. package/dist/src/converters/index.d.ts +1 -0
  46. package/dist/src/converters/xml.d.ts +54 -0
  47. package/dist/src/helpers/index.d.ts +3 -0
  48. package/dist/src/helpers/screenshot.d.ts +18 -0
  49. package/dist/src/helpers/stylehelper.d.ts +28 -0
  50. package/dist/src/helpers/vectorlayerhelpers.d.ts +508 -0
  51. package/dist/src/index.d.ts +87 -0
  52. package/dist/src/language.d.ts +107 -0
  53. package/dist/src/mapstyle.d.ts +17 -0
  54. package/dist/src/tools.d.ts +84 -0
  55. package/dist/src/types.d.ts +1 -0
  56. package/dist/src/utils/dom.d.ts +2 -0
  57. package/dist/src/utils/index.d.ts +1 -0
  58. package/dist/vite.config-test.d.ts +2 -0
  59. package/dist/vitest-setup-tests.d.ts +1 -0
  60. package/eslint.config.mjs +1 -1
  61. package/package.json +2 -6
package/README.md CHANGED
@@ -230,6 +230,13 @@ Here is the full list:
230
230
  - `MapStyle.TONER.BACKGROUND` (variant)
231
231
  - `MapStyle.TONER.LITE` (variant)
232
232
  - `MapStyle.TONER.LINES` (variant)
233
+ - `MapStyle.OCEAN` reference style with bathymetric highlights, does not have any variants.
234
+ - `MapStyle.LANDSCAPE` reference style terrain map for data overlays and visualisations
235
+ - `MapStyle.LANDSCAPE.DARK` (variant)
236
+ - `MapStyle.LANDSCAPE.VIVID` (variant)
237
+ - `MapStyle.AQUARELLE` reference style watercolor map for creative use
238
+ - `MapStyle.AQUARELLE.DARK` (variant)
239
+ - `MapStyle.AQUARELLE.VIVID` (variant)
233
240
  - `MapStyle.OPENSTREETMAP` (reference style, this one does not have any variants)
234
241
 
235
242
 
@@ -533,125 +540,7 @@ map.on("terrainAnimationStop", (e) => {
533
540
  });
534
541
  });
535
542
  ```
536
- # Halo and Space Options
537
543
 
538
- The `halo` and `space` options allow for enhanced visual customization of the map, especially for globe projections.
539
-
540
- ## `halo` (Atmospheric Glow)
541
- The `halo` option adds a gradient-based atmospheric glow around the globe, simulating the visual effect of Earth's atmosphere when viewed from space.
542
-
543
- ### Usage:
544
- You can enable a simple halo by setting it to `true`:
545
- ```ts
546
- const map = new maptilersdk.Map({
547
- container: document.getElementById("map"),
548
- style: maptilersdk.MapStyle.OUTDOOR,
549
- halo: true,
550
- });
551
- ```
552
- For more customization, you can define a radial gradient with scale and stops:
553
- ```ts
554
-
555
- const map = new maptilersdk.Map({
556
- container: document.getElementById("map"),
557
- style: maptilersdk.MapStyle.OUTDOOR,
558
- halo: {
559
- scale: 1.5, // Controls the halo size
560
- stops: [
561
- [0.2, "transparent"],
562
- [0.2, "red"],
563
- [0.4, "red"],
564
- [0.4, "transparent"],
565
- [0.6, "transparent"],
566
- [0.6, "red"],
567
- [0.8, "red"],
568
- [0.8, "transparent"],
569
- [1.0, "transparent"],
570
- ],
571
- },
572
- });
573
- ```
574
- You can also set the halo dynamically after the map loads:
575
- ```ts
576
- map.on("load", () => {
577
- map.setHalo({
578
- scale: 2,
579
- stops: [
580
- [0.0, "rgba(135,206,250,1)"],
581
- [0.5, "rgba(0,0,250,0.75)"],
582
- [0.75, "rgba(250,0,0,0.0)"],
583
- ],
584
- });
585
- });
586
- ```
587
- ## `space` (Background Environment)
588
-
589
- The space option allows customizing the background environment of the globe, simulating deep space or skybox effects.
590
- ### Usage
591
-
592
- You can enable a simple space background with a solid color:
593
- ```ts
594
- const map = new maptilersdk.Map({
595
- container: document.getElementById("map"),
596
- style: maptilersdk.MapStyle.OUTDOOR,
597
- space: {
598
- color: "#111122", // Dark space-like color
599
- },
600
- });
601
- ```
602
- Alternatively, you can provide a cubemap for a realistic skybox effect using one of the following methods:
603
-
604
- Predefined Presets:
605
- ```ts
606
- const map = new maptilersdk.Map({
607
- container: document.getElementById("map"),
608
- style: maptilersdk.MapStyle.OUTDOOR,
609
- space: {
610
- preset: "universe-dark",
611
- },
612
- });
613
- ```
614
- Cubemap Images (Custom Skybox):
615
- ```ts
616
- const map = new maptilersdk.Map({
617
- container: document.getElementById("map"),
618
- style: maptilersdk.MapStyle.OUTDOOR,
619
- space: {
620
- faces: {
621
- pX: '/path-to-image/pX.png',
622
- nX: '/path-to-image/nX.png',
623
- pY: '/path-to-image/pY.png',
624
- nY: '/path-to-image/nY.png',
625
- pZ: '/path-to-image/pZ.png',
626
- nZ: '/path-to-image/nZ.png',
627
- },
628
- },
629
- });
630
- ```
631
- Cubemap Path with image format, fetches all images from a path, this assumes all files are named px, nx, py, ny, pz, nz and suffixed with the appropriate extension specified in `format`.
632
- ```ts
633
- const map = new maptilersdk.Map({
634
- container: document.getElementById("map"),
635
- style: maptilersdk.MapStyle.OUTDOOR,
636
- space: {
637
- path: {
638
- baseUrl: "spacebox/transparent",
639
- format: "png", // Defaults to PNG
640
- },
641
- },
642
- });
643
- ```
644
- You can also set the space background dynamically:
645
- ```ts
646
- map.on("load", () => {
647
- map.setSpace({
648
- color: "red",
649
- path: {
650
- baseUrl: "spacebox/transparent",
651
- },
652
- });
653
- });
654
- ```
655
544
 
656
545
  # Easy language switching
657
546
  The language generally depends on the style but we made it possible to easily set and update from a built-in list of languages.
@@ -0,0 +1,2 @@
1
+ declare const _default: import("@typescript-eslint/utils/dist/ts-eslint").FlatConfig.ConfigArray;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ export * from './src/index'
2
+ export {}