mapicgc-gl-js 1.0.4 → 1.0.6

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.
@@ -0,0 +1,2 @@
1
+ import { t as e } from "./webgl-device-B1jTrfKA.mjs";
2
+ export { e as WebGLDevice };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mapicgc-gl-js",
3
3
  "homepage": "https://openicgc.github.io/mapicgc-doc/",
4
- "version": "1.0.4",
4
+ "version": "1.0.6",
5
5
  "description": "mapicgc-gl-js library",
6
6
  "author": "Institut Cartogràfic i Geològic de Catalunya",
7
7
  "license": "BSD-3-Clause",
@@ -45,31 +45,31 @@
45
45
  "@babel/core": "^7.29.0",
46
46
  "@babel/preset-env": "^7.29.2",
47
47
  "@rollup/plugin-babel": "^7.0.0",
48
- "axios": "^1.14.0",
49
- "dotenv": "^17.3.1",
48
+ "axios": "^1.15.0",
49
+ "dotenv": "^17.4.2",
50
50
  "jest": "30.3.0",
51
51
  "jsdoc": "^4.0.5",
52
- "jsdom": "^29.0.1",
52
+ "jsdom": "^29.0.2",
53
53
  "npm-run-all": "^4.1.5",
54
54
  "package-json-versionify": "^1.0.4",
55
55
  "path": "^0.12.7",
56
56
  "rollup-plugin-polyfill": "^4.2.0",
57
57
  "ssh2-sftp-client": "^12.1.1",
58
- "vite": "^8.0.3",
59
- "vite-plugin-node-polyfills": "^0.26.0",
60
- "vitest": "^4.1.2",
58
+ "vite": "^8.0.8",
59
+ "vite-plugin-node-polyfills": "^0.2.0",
60
+ "vitest": "^4.1.4",
61
61
  "xml2js": "^0.6.2"
62
62
  },
63
63
  "dependencies": {
64
- "@deck.gl/core": "^9.2.11",
65
- "@deck.gl/geo-layers": "^9.2.11",
66
- "@deck.gl/mapbox": "^9.2.11",
67
- "@loaders.gl/3d-tiles": "~4.3.4",
64
+ "@deck.gl/core": "^9.3.0",
65
+ "@deck.gl/geo-layers": "^9.3.0",
66
+ "@deck.gl/mapbox": "^9.3.0",
67
+ "@loaders.gl/3d-tiles": "~4.4.1",
68
68
  "@maplibre/maplibre-gl-compare": "^0.5.0",
69
69
  "@maplibre/maplibre-gl-geocoder": "^1.9.4",
70
70
  "@watergis/maplibre-gl-export": "^4.1.2",
71
71
  "flatgeobuf": "^4.4.0",
72
- "maplibre-gl": "^5.21.1",
72
+ "maplibre-gl": "^5.23.0",
73
73
  "utm-latlng": "^1.0.8"
74
74
  }
75
75
  }
@@ -20,9 +20,33 @@ export default class CompareMaps {
20
20
 
21
21
  setTimeout(function () {
22
22
  _this.mapCompare = new Compare(map1.map, map2.map, container, {});
23
+
24
+ // Collapse attribution controls on both maps
25
+ _this.collapseAttribution(map1.map);
26
+ _this.collapseAttribution(map2.map);
23
27
  }, 1000);
24
28
 
25
29
  //this.mapCompare=new Compare(map1.map,map2.map, container,{});
26
30
  //console.info( this.mapCompare);
27
31
  }
32
+
33
+ /**
34
+ * Collapses the attribution control on a map.
35
+ * @function collapseAttribution
36
+ * @param {Object} map - The map object to collapse attribution on.
37
+ */
38
+ collapseAttribution(map) {
39
+ const tryCollapse = () => {
40
+ const container = map.getContainer();
41
+ const button = container.querySelector('.maplibregl-ctrl-attrib-button');
42
+
43
+ if (button) {
44
+ button.click();
45
+ } else {
46
+ requestAnimationFrame(tryCollapse);
47
+ }
48
+ };
49
+
50
+ tryCollapse();
51
+ }
28
52
  }
@@ -1,2 +0,0 @@
1
- import { t as e } from "./webgl-device-DPB4IspV.mjs";
2
- export { e as WebGLDevice };