map-gl-offline 0.8.4 → 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.d.ts +1 -1
- package/dist/index.esm.js +5 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +5 -2
- package/dist/index.umd.js.map +1 -1
- package/dist/ui/offlineManagerControl.d.ts +15 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -13253,7 +13253,7 @@ const controlLogger = logger.scope('OfflineControl');
|
|
|
13253
13253
|
/**
|
|
13254
13254
|
* MapLibre GL JS control for managing offline map regions.
|
|
13255
13255
|
*
|
|
13256
|
-
* Implements the IControl interface to integrate with MapLibre GL maps.
|
|
13256
|
+
* Implements the IControl interface to integrate with MapLibre GL and Mapbox GL maps.
|
|
13257
13257
|
* Provides a complete UI for downloading, managing, and loading offline map data.
|
|
13258
13258
|
*
|
|
13259
13259
|
* The control automatically intercepts fetch requests to serve offline resources
|
|
@@ -13417,10 +13417,13 @@ class OfflineManagerControl {
|
|
|
13417
13417
|
* Called when the control is added to a map.
|
|
13418
13418
|
* Implements the IControl.onAdd interface method.
|
|
13419
13419
|
*
|
|
13420
|
-
* @param map - The MapLibre GL map instance
|
|
13420
|
+
* @param map - The MapLibre GL or Mapbox GL map instance
|
|
13421
13421
|
* @returns The control's container element
|
|
13422
13422
|
*/
|
|
13423
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).
|
|
13424
13427
|
this.map = map;
|
|
13425
13428
|
// Detect the correct CSS prefix for the map library in use
|
|
13426
13429
|
const cssPrefix = detectCssPrefix(map.getContainer());
|