@geolonia/maps-core 0.5.0 → 0.5.1

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.
@@ -411,11 +411,11 @@ var CustomAttributionControl = class {
411
411
  attributions.push(this.options.customAttribution);
412
412
  }
413
413
  }
414
- const sourceCaches = this._map.style.sourceCaches;
415
- for (const id in sourceCaches) {
416
- const sourceCache = sourceCaches[id];
417
- if (sourceCache.used || sourceCache.usedForTerrain) {
418
- const source = sourceCache.getSource();
414
+ const tileManagers = this._map.style.tileManagers ?? this._map.style.sourceCaches ?? {};
415
+ for (const id in tileManagers) {
416
+ const tileManager = tileManagers[id];
417
+ if (tileManager.used || tileManager.usedForTerrain) {
418
+ const source = tileManager.getSource();
419
419
  if (source.attribution && attributions.indexOf(source.attribution) < 0) {
420
420
  attributions.push(source.attribution);
421
421
  }
@@ -2057,7 +2057,7 @@ var GeoloniaMap = class extends import_maplibre_gl5.default.Map {
2057
2057
  };
2058
2058
 
2059
2059
  // src/version.ts
2060
- var VERSION = "0.5.0";
2060
+ var VERSION = "0.5.1";
2061
2061
  // Annotate the CommonJS export names for ESM import in node:
2062
2062
  0 && (module.exports = {
2063
2063
  CustomAttributionControl,
package/dist/npm/index.js CHANGED
@@ -365,11 +365,11 @@ var CustomAttributionControl = class {
365
365
  attributions.push(this.options.customAttribution);
366
366
  }
367
367
  }
368
- const sourceCaches = this._map.style.sourceCaches;
369
- for (const id in sourceCaches) {
370
- const sourceCache = sourceCaches[id];
371
- if (sourceCache.used || sourceCache.usedForTerrain) {
372
- const source = sourceCache.getSource();
368
+ const tileManagers = this._map.style.tileManagers ?? this._map.style.sourceCaches ?? {};
369
+ for (const id in tileManagers) {
370
+ const tileManager = tileManagers[id];
371
+ if (tileManager.used || tileManager.usedForTerrain) {
372
+ const source = tileManager.getSource();
373
373
  if (source.attribution && attributions.indexOf(source.attribution) < 0) {
374
374
  attributions.push(source.attribution);
375
375
  }
@@ -2011,7 +2011,7 @@ var GeoloniaMap = class extends maplibregl5.Map {
2011
2011
  };
2012
2012
 
2013
2013
  // src/version.ts
2014
- var VERSION = "0.5.0";
2014
+ var VERSION = "0.5.1";
2015
2015
  export {
2016
2016
  attribution_default as CustomAttributionControl,
2017
2017
  DEFAULT_STAGE,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geolonia/maps-core",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "type": "module",
5
5
  "main": "dist/npm/index.cjs",
6
6
  "module": "dist/npm/index.js",
@@ -35,7 +35,7 @@
35
35
  "@types/tinycolor2": "^1.4.6",
36
36
  "@vitest/coverage-v8": "^4.1.2",
37
37
  "jsdom": "^29.0.1",
38
- "maplibre-gl": "5.7.0",
38
+ "maplibre-gl": "5.24.0",
39
39
  "tsup": "^8",
40
40
  "typedoc": "^0.28.20",
41
41
  "typedoc-plugin-markdown": "^4.12.0",