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/README.md +6 -8
- package/dist/index.d.ts +2 -2
- package/dist/index.esm.js +9 -5
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +9 -5
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +9 -5
- package/dist/index.umd.js.map +1 -1
- package/dist/types/region.d.ts +1 -1
- package/dist/ui/managers/downloadManager.d.ts +3 -2
- package/dist/ui/offlineManagerControl.d.ts +16 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -12959,14 +12959,15 @@ class RegionControl {
|
|
|
12959
12959
|
* Download Manager for offline map regions.
|
|
12960
12960
|
*
|
|
12961
12961
|
* This module handles the complete download workflow for offline map regions,
|
|
12962
|
-
* including styles, sprites, glyphs (fonts), and map tiles. It provides
|
|
12962
|
+
* including styles, sprites, glyphs (fonts), 3D models, and map tiles. It provides
|
|
12963
12963
|
* progress tracking across all download phases.
|
|
12964
12964
|
*
|
|
12965
12965
|
* **Download Phases:**
|
|
12966
12966
|
* 1. `style` - Downloads the map style JSON and processes sources
|
|
12967
12967
|
* 2. `sprites` - Downloads sprite images and JSON for map icons
|
|
12968
12968
|
* 3. `glyphs` - Downloads font glyphs for text rendering
|
|
12969
|
-
* 4. `
|
|
12969
|
+
* 4. `models` - Downloads 3D model assets (Mapbox Standard trees / turbines)
|
|
12970
|
+
* 5. `tiles` - Downloads map tiles for the specified region bounds
|
|
12970
12971
|
*
|
|
12971
12972
|
* **Usage:**
|
|
12972
12973
|
* The DownloadManager is typically instantiated by the OfflineManagerControl
|
|
@@ -13226,7 +13227,7 @@ class ModalManager {
|
|
|
13226
13227
|
* - Integrates seamlessly as a MapLibre GL control
|
|
13227
13228
|
* - Intercepts fetch requests to serve offline resources from IndexedDB
|
|
13228
13229
|
* - Supports light and dark themes
|
|
13229
|
-
* - Shows download progress across all phases (style, sprites, glyphs, tiles)
|
|
13230
|
+
* - Shows download progress across all phases (style, sprites, glyphs, models, tiles)
|
|
13230
13231
|
* - Optional bounding box visualization for regions
|
|
13231
13232
|
*
|
|
13232
13233
|
* @example
|
|
@@ -13252,7 +13253,7 @@ const controlLogger = logger.scope('OfflineControl');
|
|
|
13252
13253
|
/**
|
|
13253
13254
|
* MapLibre GL JS control for managing offline map regions.
|
|
13254
13255
|
*
|
|
13255
|
-
* Implements the IControl interface to integrate with MapLibre GL maps.
|
|
13256
|
+
* Implements the IControl interface to integrate with MapLibre GL and Mapbox GL maps.
|
|
13256
13257
|
* Provides a complete UI for downloading, managing, and loading offline map data.
|
|
13257
13258
|
*
|
|
13258
13259
|
* The control automatically intercepts fetch requests to serve offline resources
|
|
@@ -13416,10 +13417,13 @@ class OfflineManagerControl {
|
|
|
13416
13417
|
* Called when the control is added to a map.
|
|
13417
13418
|
* Implements the IControl.onAdd interface method.
|
|
13418
13419
|
*
|
|
13419
|
-
* @param map - The MapLibre GL map instance
|
|
13420
|
+
* @param map - The MapLibre GL or Mapbox GL map instance
|
|
13420
13421
|
* @returns The control's container element
|
|
13421
13422
|
*/
|
|
13422
13423
|
onAdd(map) {
|
|
13424
|
+
// Internally the control works against the MapLibre `Map` typings; the
|
|
13425
|
+
// structural `ControlMap` parameter is what lets it satisfy both
|
|
13426
|
+
// libraries' `IControl` so callers need no cast (see issue #39).
|
|
13423
13427
|
this.map = map;
|
|
13424
13428
|
// Detect the correct CSS prefix for the map library in use
|
|
13425
13429
|
const cssPrefix = detectCssPrefix(map.getContainer());
|