@edugis-org/webmapx 0.1.8 → 0.1.9

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.
@@ -3,7 +3,7 @@ import { t } from "./webmapx-base-tool-DfRa7TlD.js";
3
3
  import { css as n, html as r, nothing as i } from "lit";
4
4
  import { customElement as a, query as o, state as s } from "lit/decorators.js";
5
5
  //#region src/utils/epsg-lookup-manager.ts
6
- var c = "https://cdn.jsdelivr.net/npm/@edugis-org/webmapx@0.1.8/public", l = 6e4, u = new class {
6
+ var c = "https://cdn.jsdelivr.net/npm/@edugis-org/webmapx@0.1.9/public", l = 6e4, u = new class {
7
7
  constructor() {
8
8
  this.worker = null, this.isReady = !1, this.isInitializing = !1, this.initPromise = null, this.pendingRequests = /* @__PURE__ */ new Map(), this.requestCounter = 0, this.idleTimeout = null, this.idleTimeoutMs = l;
9
9
  }
@@ -26,7 +26,7 @@ var i = {
26
26
  "3d": () => import("./webmapx-3d-tool-CLppA7mK.js"),
27
27
  truearea: () => import("./webmapx-truearea-tool-CSU9mE1D.js"),
28
28
  "view-mode": () => import("./webmapx-view-mode-tool-D1QyQfq8.js"),
29
- coordinates: () => import("./webmapx-coordinates-tool-EOqZodjr.js"),
29
+ coordinates: () => import("./webmapx-coordinates-tool-DnTSkrRG.js"),
30
30
  settings: () => import("./webmapx-settings-EHSm-AGU.js"),
31
31
  "config-edit": () => import("./webmapx-config-edit-tool-BztWspia.js")
32
32
  };
@@ -1298,7 +1298,7 @@ function ve(e, t) {
1298
1298
  }
1299
1299
  //#endregion
1300
1300
  //#region src/bootstrap/locale-loader.ts
1301
- var ye = "https://cdn.jsdelivr.net/npm/@edugis-org/webmapx@0.1.8/src/locales";
1301
+ var ye = "https://cdn.jsdelivr.net/npm/@edugis-org/webmapx@0.1.9/src/locales";
1302
1302
  async function W(e) {
1303
1303
  if (H.hasResourceBundle(e, "webmapx")) {
1304
1304
  await H.changeLanguage(e);
@@ -2560,38 +2560,39 @@ var Je = class {
2560
2560
  ]), n.locale && n.locale !== "en" && await W(n.locale);
2561
2561
  let c = document.querySelector(e);
2562
2562
  if (!c) throw Error(`[webmapx] Mount target not found: "${e}"`);
2563
- c.innerHTML = `<webmapx-map adapter="${i}"><webmapx-layout></webmapx-layout></webmapx-map>`;
2564
- let l = c.querySelector("webmapx-map"), u = n.map, { engine: d, tools: f, locale: p, plugins: m, ...h } = n, g = o.length > 0 ? qe(o) : typeof f == "object" && !Array.isArray(f) ? f : void 0, _ = Ge({
2565
- ...h,
2563
+ let l = e.replace(/^#/, "").replace(/[^a-zA-Z0-9_-]/g, "-") || "webmapx-map";
2564
+ c.innerHTML = `<webmapx-map id="${l}" adapter="${i}"><webmapx-layout></webmapx-layout></webmapx-map>`;
2565
+ let u = c.querySelector("webmapx-map"), d = n.map, { engine: f, tools: p, locale: m, plugins: h, ...g } = n, _ = o.length > 0 ? qe(o) : typeof p == "object" && !Array.isArray(p) ? p : void 0, v = Ge({
2566
+ ...g,
2566
2567
  map: {
2567
2568
  type: i,
2568
2569
  center: [0, 0],
2569
2570
  zoom: 2,
2570
- ...u
2571
+ ...d
2571
2572
  },
2572
- ...g ? { tools: g } : {}
2573
+ ..._ ? { tools: _ } : {}
2573
2574
  }, "WebMapX.mount");
2574
- l.setConfig(_);
2575
- let v = l.querySelector("webmapx-layout");
2576
- if (v && v.childElementCount === 0) {
2575
+ u.setConfig(v);
2576
+ let y = u.querySelector("webmapx-layout");
2577
+ if (y && y.childElementCount === 0) {
2577
2578
  let { buildLayoutFromConfig: e } = await import("./dynamic-layout-DmLc5_yX.js");
2578
- e(v, g ?? _.tools);
2579
+ e(y, _ ?? v.tools);
2579
2580
  }
2580
- let y = await l.getAdapterAsync?.();
2581
- if (!y) {
2581
+ let b = await u.getAdapterAsync?.();
2582
+ if (!b) {
2582
2583
  console.error("[webmapx] Adapter not available — check engine config.");
2583
2584
  return;
2584
2585
  }
2585
- let b = u?.style ?? Ke, x = {
2586
- center: u?.center ?? [0, 0],
2587
- zoom: u?.zoom ?? 2,
2588
- ...u?.bearing == null ? {} : { bearing: u.bearing },
2589
- ...u?.pitch == null ? {} : { pitch: u.pitch },
2590
- ...u?.minZoom == null ? {} : { minZoom: u.minZoom },
2591
- ...u?.maxZoom == null ? {} : { maxZoom: u.maxZoom },
2592
- ...typeof b == "string" ? { styleUrl: b } : { style: b }
2586
+ let x = d?.style ?? Ke, S = {
2587
+ center: d?.center ?? [0, 0],
2588
+ zoom: d?.zoom ?? 2,
2589
+ ...d?.bearing == null ? {} : { bearing: d.bearing },
2590
+ ...d?.pitch == null ? {} : { pitch: d.pitch },
2591
+ ...d?.minZoom == null ? {} : { minZoom: d.minZoom },
2592
+ ...d?.maxZoom == null ? {} : { maxZoom: d.maxZoom },
2593
+ ...typeof x == "string" ? { styleUrl: x } : { style: x }
2593
2594
  };
2594
- y.initialize(e.replace(/^#/, ""), x);
2595
+ b.initialize(l, S);
2595
2596
  }
2596
2597
  };
2597
2598
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edugis-org/webmapx",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "description": "A modular web map UI with built-in adapters for MapLibre, OpenLayers, Leaflet, and Cesium.",
5
5
  "license": "ISC",
6
6
  "author": "Anne Blankert",