map-gl-offline 0.8.3 → 0.8.4

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/README.md CHANGED
@@ -52,13 +52,11 @@ const map = new maplibregl.Map({
52
52
  const offlineManager = new OfflineMapManager();
53
53
 
54
54
  map.on('load', () => {
55
- map.addControl(
56
- new OfflineManagerControl(offlineManager, {
57
- styleUrl: map.getStyle().sprite,
58
- mapLib: maplibregl, // enables idb:// protocol
59
- }),
60
- 'top-right',
61
- );
55
+ const control = new OfflineManagerControl(offlineManager, {
56
+ styleUrl: 'https://api.maptiler.com/maps/streets/style.json?key=YOUR_KEY',
57
+ mapLib: maplibregl, // enables idb:// protocol in web workers
58
+ });
59
+ map.addControl(control, 'top-right');
62
60
  });
63
61
  ```
64
62
 
@@ -103,7 +101,7 @@ map.on('load', () =>
103
101
 
104
102
  ## Programmatic Usage
105
103
 
106
- `downloadRegion` runs the full pipeline (**style → sprites → glyphs → tiles → metadata**) with per-phase progress. `addRegion` alone only stores metadata — use `downloadRegion` to actually fetch assets.
104
+ `downloadRegion` runs the full pipeline (**style → sprites → glyphs → models → tiles → metadata**) with per-phase progress. `addRegion` alone only stores metadata — use `downloadRegion` to actually fetch assets.
107
105
 
108
106
  ```typescript
109
107
  import { OfflineMapManager } from 'map-gl-offline';
package/dist/index.d.ts CHANGED
@@ -34,7 +34,7 @@
34
34
  * ```typescript
35
35
  * const offlineManager = new OfflineMapManager();
36
36
  *
37
- * // downloadRegion runs the full pipeline: style (if missing) → sprites → glyphs → tiles → metadata.
37
+ * // downloadRegion runs the full pipeline: style (if missing) → sprites → glyphs → models → tiles → metadata.
38
38
  * // addRegion on its own only stores metadata; use downloadRegion to actually fetch assets.
39
39
  * await offlineManager.downloadRegion(
40
40
  * {
package/dist/index.esm.js CHANGED
@@ -12936,14 +12936,15 @@ class RegionControl {
12936
12936
  * Download Manager for offline map regions.
12937
12937
  *
12938
12938
  * This module handles the complete download workflow for offline map regions,
12939
- * including styles, sprites, glyphs (fonts), and map tiles. It provides
12939
+ * including styles, sprites, glyphs (fonts), 3D models, and map tiles. It provides
12940
12940
  * progress tracking across all download phases.
12941
12941
  *
12942
12942
  * **Download Phases:**
12943
12943
  * 1. `style` - Downloads the map style JSON and processes sources
12944
12944
  * 2. `sprites` - Downloads sprite images and JSON for map icons
12945
12945
  * 3. `glyphs` - Downloads font glyphs for text rendering
12946
- * 4. `tiles` - Downloads map tiles for the specified region bounds
12946
+ * 4. `models` - Downloads 3D model assets (Mapbox Standard trees / turbines)
12947
+ * 5. `tiles` - Downloads map tiles for the specified region bounds
12947
12948
  *
12948
12949
  * **Usage:**
12949
12950
  * The DownloadManager is typically instantiated by the OfflineManagerControl
@@ -13203,7 +13204,7 @@ class ModalManager {
13203
13204
  * - Integrates seamlessly as a MapLibre GL control
13204
13205
  * - Intercepts fetch requests to serve offline resources from IndexedDB
13205
13206
  * - Supports light and dark themes
13206
- * - Shows download progress across all phases (style, sprites, glyphs, tiles)
13207
+ * - Shows download progress across all phases (style, sprites, glyphs, models, tiles)
13207
13208
  * - Optional bounding box visualization for regions
13208
13209
  *
13209
13210
  * @example