mapicgc-gl-js 1.0.1 → 1.0.3
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 +35 -1
- package/dist/chunk-efA98nb6-Dfm7IivL.mjs +13 -0
- package/dist/html2canvas-DhrjCa5K-zEqRDH-g.mjs +4024 -0
- package/dist/index.es-D_FsJY9H-CO3QIBGM.mjs +5741 -0
- package/dist/mapicgc-gl-js.css +2 -0
- package/dist/mapicgc-gl.css +1948 -1
- package/dist/mapicgc-gl.js +813 -497
- package/dist/mapicgc-gl.mjs +88130 -5
- package/dist/purify.es-DVGU85zV-CJOZ7ABI.mjs +549 -0
- package/dist/typeof-CTd55yxz-BxqQpTq1.mjs +11 -0
- package/dist/webgl-device-CDzrheIu.mjs +2 -0
- package/dist/webgl-device-DPB4IspV.mjs +5573 -0
- package/package.json +21 -22
- package/src/config.js +824 -58
- package/src/constants/Terrains.js +7 -7
- package/src/map/Map.js +115 -18
- package/test/exemples/addImageLayerICGC.html +29 -0
- package/test/exemples/addMapStyle.html +7 -5
- package/test/exemples/addReliefStyle.html +108 -0
- package/test/vitest/Config.test.js +145 -0
- package/test/vitest/MapFunctions.test.js +971 -0
- package/vite.config.mjs +7 -2
- package/dist/html2canvas.esm-DgdJBc_o-DJc3y-dg.mjs +0 -4534
- package/dist/index-zWha-mdE.mjs +0 -80703
- package/dist/index.es-H945btOb-DbvF5zOC.mjs +0 -6689
- package/dist/mapicgc-gl.umd.js +0 -3532
- package/dist/purify.es-BGDLgQxM-BpzlfVQe.mjs +0 -472
- package/test/vitest/Map.test.js +0 -215
- package/test/vitest/MapStyle.test.js +0 -129
package/README.md
CHANGED
|
@@ -113,9 +113,43 @@ MapICGC GL JS integrates the following libraries:
|
|
|
113
113
|
|
|
114
114
|
<br>
|
|
115
115
|
|
|
116
|
+
|
|
117
|
+
## Tests
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
## Tests
|
|
121
|
+
|
|
122
|
+
This project includes an automated test suite using [Vitest](https://vitest.dev/):
|
|
123
|
+
|
|
124
|
+
- **test/vitest/MapFunctions.test.js**: Covers all public methods of the `Map` class, including:
|
|
125
|
+
- getConfigStyles, getConfigWMSLayers, getConfigOrtoLayers, getConfigVectorLayers
|
|
126
|
+
- addControl, addLayer, addSource, addMarker, addAttributionControl
|
|
127
|
+
- setStyle, setSky, setEventedParent, setFeatureState, hasControl, _dealOrto3dStyle
|
|
128
|
+
- And many other public methods and behaviors
|
|
129
|
+
|
|
130
|
+
- **test/vitest/Config.test.js**: Tests configuration loading and structure (`ConfigICGC`):
|
|
131
|
+
- Remote and local config loading
|
|
132
|
+
- Fallback if the API call fails
|
|
133
|
+
- Validation of the `mapicgc-config.json` structure (default options, styles, layers, terrains, geocoder, logo, map3d, etc)
|
|
134
|
+
|
|
135
|
+
All these tests pass successfully with:
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
npm run test
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
or directly with Vitest:
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
npx vitest run
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
---
|
|
116
148
|
## Developed by:
|
|
117
149
|
|
|
118
|
-
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
<a href="https://www.icgc.cat/" target="_blank"><img src="https://eines.icgc.cat/recursos/logos/ICGC_color_norma.svg" alt="ICGC Logo" width="150"></img></a>
|
|
119
153
|
|
|
120
154
|
|
|
121
155
|
## License
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//#region node_modules/@watergis/maplibre-gl-export/dist/chunk-efA98nb6.js
|
|
2
|
+
var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, i = Object.getPrototypeOf, a = Object.prototype.hasOwnProperty, o = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), s = (e, i, o, s) => {
|
|
3
|
+
if (i && typeof i == "object" || typeof i == "function") for (var c = r(i), l = 0, u = c.length, d; l < u; l++) d = c[l], !a.call(e, d) && d !== o && t(e, d, {
|
|
4
|
+
get: ((e) => i[e]).bind(null, d),
|
|
5
|
+
enumerable: !(s = n(i, d)) || s.enumerable
|
|
6
|
+
});
|
|
7
|
+
return e;
|
|
8
|
+
}, c = (n, r, a) => (a = n == null ? {} : e(i(n)), s(r || !n || !n.__esModule ? t(a, "default", {
|
|
9
|
+
value: n,
|
|
10
|
+
enumerable: !0
|
|
11
|
+
}) : a, n));
|
|
12
|
+
//#endregion
|
|
13
|
+
export { o as n, c as t };
|