map-gl-offline 0.8.3 → 0.8.5

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/dist/index.umd.js CHANGED
@@ -12953,14 +12953,15 @@
12953
12953
  * Download Manager for offline map regions.
12954
12954
  *
12955
12955
  * This module handles the complete download workflow for offline map regions,
12956
- * including styles, sprites, glyphs (fonts), and map tiles. It provides
12956
+ * including styles, sprites, glyphs (fonts), 3D models, and map tiles. It provides
12957
12957
  * progress tracking across all download phases.
12958
12958
  *
12959
12959
  * **Download Phases:**
12960
12960
  * 1. `style` - Downloads the map style JSON and processes sources
12961
12961
  * 2. `sprites` - Downloads sprite images and JSON for map icons
12962
12962
  * 3. `glyphs` - Downloads font glyphs for text rendering
12963
- * 4. `tiles` - Downloads map tiles for the specified region bounds
12963
+ * 4. `models` - Downloads 3D model assets (Mapbox Standard trees / turbines)
12964
+ * 5. `tiles` - Downloads map tiles for the specified region bounds
12964
12965
  *
12965
12966
  * **Usage:**
12966
12967
  * The DownloadManager is typically instantiated by the OfflineManagerControl
@@ -13220,7 +13221,7 @@
13220
13221
  * - Integrates seamlessly as a MapLibre GL control
13221
13222
  * - Intercepts fetch requests to serve offline resources from IndexedDB
13222
13223
  * - Supports light and dark themes
13223
- * - Shows download progress across all phases (style, sprites, glyphs, tiles)
13224
+ * - Shows download progress across all phases (style, sprites, glyphs, models, tiles)
13224
13225
  * - Optional bounding box visualization for regions
13225
13226
  *
13226
13227
  * @example
@@ -13246,7 +13247,7 @@
13246
13247
  /**
13247
13248
  * MapLibre GL JS control for managing offline map regions.
13248
13249
  *
13249
- * Implements the IControl interface to integrate with MapLibre GL maps.
13250
+ * Implements the IControl interface to integrate with MapLibre GL and Mapbox GL maps.
13250
13251
  * Provides a complete UI for downloading, managing, and loading offline map data.
13251
13252
  *
13252
13253
  * The control automatically intercepts fetch requests to serve offline resources
@@ -13410,10 +13411,13 @@
13410
13411
  * Called when the control is added to a map.
13411
13412
  * Implements the IControl.onAdd interface method.
13412
13413
  *
13413
- * @param map - The MapLibre GL map instance
13414
+ * @param map - The MapLibre GL or Mapbox GL map instance
13414
13415
  * @returns The control's container element
13415
13416
  */
13416
13417
  onAdd(map) {
13418
+ // Internally the control works against the MapLibre `Map` typings; the
13419
+ // structural `ControlMap` parameter is what lets it satisfy both
13420
+ // libraries' `IControl` so callers need no cast (see issue #39).
13417
13421
  this.map = map;
13418
13422
  // Detect the correct CSS prefix for the map library in use
13419
13423
  const cssPrefix = detectCssPrefix(map.getContainer());