@nika-js/onlymap 0.8.1 → 0.8.2
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/CHANGELOG.md +6 -0
- package/dist/{LercDecode.es-DKhLh4TO.js → LercDecode.es-BSylOuVc.js} +1 -1
- package/dist/{basemap-BjXMRr_M.js → basemap-CMaYhtEE.js} +1 -1
- package/dist/cartograph/elements/om-frame.d.ts +8 -0
- package/dist/cartograph.js +106 -94
- package/dist/cartograph.standalone.js +199 -187
- package/dist/{geoparquet-D9pYDrCk.js → geoparquet-DZjsJtQQ.js} +1 -1
- package/dist/{index-CqtubBZ4.js → index-BQkmbcQr.js} +1 -1
- package/dist/{index-D6R4z3Zs.js → index-Cw9SL11B.js} +15 -12
- package/dist/{index-BGQidVp5.js → index-DRFEoCuu.js} +1 -1
- package/dist/{index-Zm8MxpvR.js → index-Dl0UKZF-.js} +2 -2
- package/dist/{index-BdKNZcs-.js → index-tSk19VJe.js} +1 -1
- package/dist/{lerc-BdHcL8pi.js → lerc-Dphd_hZG.js} +2 -2
- package/dist/onlymap.standalone.js +6 -3
- package/dist/onlymapjs.js +1 -1
- package/dist/{raster-B7rPpOTP.js → raster-Bb9CjpGL.js} +3 -3
- package/dist/{raster-pipeline-X2-mnFQx.js → raster-pipeline-D_Hw3Wax.js} +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/{zarr-BF-buFRB.js → zarr-DJA83o9G.js} +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,12 @@ Note: npm collapsed a few closely-spaced releases — the GPX/FlatGeobuf (0.5.4)
|
|
|
8
8
|
and GeoParquet (0.5.5) work shipped to npm together as **0.5.6**, so npm's
|
|
9
9
|
version list jumps 0.5.3 → 0.5.6. Each logical version is listed here regardless.
|
|
10
10
|
|
|
11
|
+
## 0.8.2 — 2026-09-18
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
- **The tilt limit on a cartograph frame now actually holds.** 0.8.1 worked out how far each frame could tilt and then, on any map with a basemap, failed to tell the map about it — so the camera could still be pushed to a near-horizontal angle where the frame loses its georeference, and with it the scale bar, north arrow, graticule and export. It now holds on every map, and survives switching the basemap.
|
|
15
|
+
- **The limit follows the map instead of being fixed when the frame loads.** Zooming out makes a frame able to tilt less, not more; the ceiling now tightens and loosens as you move the map, rather than staying at whatever the frame was showing when it opened.
|
|
16
|
+
|
|
11
17
|
## 0.8.1 — 2026-09-18
|
|
12
18
|
|
|
13
19
|
### Fixed
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as ny, L as sy, M as oy, m as ay, c as ka, a as Sd, z as oc, G as sm, V as ly, W as cy, b as uy, g as hy, d as Vu, f as Ed, e as dy, l as py, u as fy, D as Qf, h as my } from "./index-
|
|
1
|
+
import { C as ny, L as sy, M as oy, m as ay, c as ka, a as Sd, z as oc, G as sm, V as ly, W as cy, b as uy, g as hy, d as Vu, f as Ed, e as dy, l as py, u as fy, D as Qf, h as my } from "./index-Cw9SL11B.js";
|
|
2
2
|
const Cd = Math.PI / 180, gy = 180 / Math.PI;
|
|
3
3
|
function em(Pe, K = 0) {
|
|
4
4
|
const pe = Math.min(180, Pe) * Cd;
|
|
@@ -75,6 +75,14 @@ export declare class OmFrameElement extends CartographElementBase implements Car
|
|
|
75
75
|
* depends on the box's aspect and the current zoom.
|
|
76
76
|
*/
|
|
77
77
|
private capMapPitch;
|
|
78
|
+
/**
|
|
79
|
+
* The ceiling follows the camera, so a zoom changes it.
|
|
80
|
+
*
|
|
81
|
+
* Bound once so add/remove pair up. Cheap enough to run on every reported
|
|
82
|
+
* view: a probe is four unprojections and the attribute is only written when
|
|
83
|
+
* the whole-degree answer actually moves.
|
|
84
|
+
*/
|
|
85
|
+
private readonly onLiveViewChanged;
|
|
78
86
|
/**
|
|
79
87
|
* Draw another frame's footprint on this one. The outline is DENSIFIED —
|
|
80
88
|
* sampled along each edge and projected point by point — because a
|
package/dist/cartograph.js
CHANGED
|
@@ -57,7 +57,7 @@ function L(r) {
|
|
|
57
57
|
const t = r.trim().toLowerCase();
|
|
58
58
|
return t === "transparent" || t === "rgba(0, 0, 0, 0)" || t === "none" ? null : r;
|
|
59
59
|
}
|
|
60
|
-
const
|
|
60
|
+
const z = 96 / 25.4, Ut = {
|
|
61
61
|
A0: { widthMm: 841, heightMm: 1189 },
|
|
62
62
|
A1: { widthMm: 594, heightMm: 841 },
|
|
63
63
|
A2: { widthMm: 420, heightMm: 594 },
|
|
@@ -66,11 +66,11 @@ const j = 96 / 25.4, Ut = {
|
|
|
66
66
|
A5: { widthMm: 148, heightMm: 210 },
|
|
67
67
|
Letter: { widthMm: 215.9, heightMm: 279.4 },
|
|
68
68
|
Legal: { widthMm: 215.9, heightMm: 355.6 }
|
|
69
|
-
},
|
|
69
|
+
}, zt = "A4";
|
|
70
70
|
function ct(r, t, e, n) {
|
|
71
71
|
const i = t != null ? Number(t) : NaN, s = e != null ? Number(e) : NaN;
|
|
72
72
|
if (Number.isFinite(i) && i > 0 && Number.isFinite(s) && s > 0) return { widthMm: i, heightMm: s };
|
|
73
|
-
const o = Ut[r ??
|
|
73
|
+
const o = Ut[r ?? zt] ?? Ut[zt];
|
|
74
74
|
return n === "landscape" ? { widthMm: o.heightMm, heightMm: o.widthMm } : { ...o };
|
|
75
75
|
}
|
|
76
76
|
let et = null;
|
|
@@ -109,7 +109,7 @@ async function er(r, t = /* @__PURE__ */ new Date()) {
|
|
|
109
109
|
const c = new DataView(new ArrayBuffer(22));
|
|
110
110
|
return c.setUint32(0, 101010256, !0), c.setUint16(4, 0, !0), c.setUint16(6, 0, !0), c.setUint16(8, o.length, !0), c.setUint16(10, o.length, !0), c.setUint32(12, a - l, !0), c.setUint32(16, l, !0), c.setUint16(20, 0, !0), s.push(new Uint8Array(c.buffer)), new Blob(s, { type: "application/zip" });
|
|
111
111
|
}
|
|
112
|
-
const dt = ["protanopia", "deuteranopia", "tritanopia", "achromatopsia"],
|
|
112
|
+
const dt = ["protanopia", "deuteranopia", "tritanopia", "achromatopsia"], ve = {
|
|
113
113
|
protan: "protanopia",
|
|
114
114
|
deutan: "deuteranopia",
|
|
115
115
|
tritan: "tritanopia",
|
|
@@ -117,9 +117,9 @@ const dt = ["protanopia", "deuteranopia", "tritanopia", "achromatopsia"], Me = {
|
|
|
117
117
|
};
|
|
118
118
|
function Ft(r) {
|
|
119
119
|
const t = r?.trim().toLowerCase();
|
|
120
|
-
return !t || t === "none" ? null : dt.includes(t) ? t :
|
|
120
|
+
return !t || t === "none" ? null : dt.includes(t) ? t : ve[t] ?? null;
|
|
121
121
|
}
|
|
122
|
-
const rr = ["none", ...dt, ...Object.keys(
|
|
122
|
+
const rr = ["none", ...dt, ...Object.keys(ve)], It = {
|
|
123
123
|
protanopia: [0.11238, 0.88762, 0, 0.11238, 0.88762, 0, 401e-5, -401e-5, 1],
|
|
124
124
|
deuteranopia: [0.29275, 0.70725, 0, 0.29275, 0.70725, 0, -0.02234, 0.02234, 1],
|
|
125
125
|
tritanopia: [1, 0.14461, -0.14461, 0, 0.85659, 0.14341, 0, 0.85659, 0.14341],
|
|
@@ -140,7 +140,7 @@ function nr(r) {
|
|
|
140
140
|
const n = /^rgba?\(\s*([\d.]+)[\s,]+([\d.]+)[\s,]+([\d.]+)/.exec(t);
|
|
141
141
|
return n ? { r: Number(n[1]), g: Number(n[2]), b: Number(n[3]) } : null;
|
|
142
142
|
}
|
|
143
|
-
function
|
|
143
|
+
function jt(r, t) {
|
|
144
144
|
const e = It[t], [n, i, s] = [q(r.r), q(r.g), q(r.b)];
|
|
145
145
|
return {
|
|
146
146
|
r: lt(e[0] * n + e[1] * i + e[2] * s),
|
|
@@ -158,13 +158,13 @@ function Gt(r, t) {
|
|
|
158
158
|
const X = Math.atan2(tt, U) * c;
|
|
159
159
|
return X >= 0 ? X : X + 360;
|
|
160
160
|
}, [b, w] = [g(d, i), g(h, a)], y = s - e, C = p - f;
|
|
161
|
-
let
|
|
162
|
-
f * p !== 0 && (
|
|
163
|
-
const F = 2 * Math.sqrt(f * p) * Math.sin(
|
|
161
|
+
let v = 0;
|
|
162
|
+
f * p !== 0 && (v = w - b, v > 180 ? v -= 360 : v < -180 && (v += 360));
|
|
163
|
+
const F = 2 * Math.sqrt(f * p) * Math.sin(v * l / 2), _ = (e + s) / 2, k = (f + p) / 2;
|
|
164
164
|
let N = b + w;
|
|
165
165
|
f * p !== 0 && (Math.abs(b - w) > 180 && (N += b + w < 360 ? 360 : -360), N /= 2);
|
|
166
|
-
const T = 1 - 0.17 * Math.cos((N - 30) * l) + 0.24 * Math.cos(2 * N * l) + 0.32 * Math.cos((3 * N + 6) * l) - 0.2 * Math.cos((4 * N - 63) * l),
|
|
167
|
-
return Math.sqrt((y /
|
|
166
|
+
const T = 1 - 0.17 * Math.cos((N - 30) * l) + 0.24 * Math.cos(2 * N * l) + 0.32 * Math.cos((3 * N + 6) * l) - 0.2 * Math.cos((4 * N - 63) * l), M = 1 + 0.015 * (_ - 50) ** 2 / Math.sqrt(20 + (_ - 50) ** 2), A = 1 + 0.045 * k, $ = 1 + 0.015 * k * T, E = -2 * Math.sqrt(k ** 7 / (k ** 7 + 25 ** 7)) * Math.sin(60 * Math.exp(-(((N - 275) / 25) ** 2)) * l);
|
|
167
|
+
return Math.sqrt((y / M) ** 2 + (C / A) ** 2 + (F / $) ** 2 + E * (C / A) * (F / $));
|
|
168
168
|
}
|
|
169
169
|
const ir = 10;
|
|
170
170
|
function or(r, t = ir) {
|
|
@@ -181,7 +181,7 @@ function or(r, t = ir) {
|
|
|
181
181
|
for (let c = 0; c < l.length; c++)
|
|
182
182
|
for (let u = c + 1; u < l.length; u++) {
|
|
183
183
|
if (Gt(l[c].rgb, l[u].rgb) < t) continue;
|
|
184
|
-
const d = Gt(
|
|
184
|
+
const d = Gt(jt(l[c].rgb, a), jt(l[u].rgb, a));
|
|
185
185
|
d < t && (n.push({ type: a, a: l[c].entry, b: l[u].entry, distance: d }), i.set(a, (i.get(a) ?? 0) + 1));
|
|
186
186
|
}
|
|
187
187
|
let s = null, o = 0;
|
|
@@ -211,14 +211,14 @@ function sr(r, t, e, n) {
|
|
|
211
211
|
}
|
|
212
212
|
return r.putImageData(i, 0, 0), !0;
|
|
213
213
|
}
|
|
214
|
-
const
|
|
214
|
+
const Me = (r) => `om-carto-cvd-${r}`;
|
|
215
215
|
function ar(r) {
|
|
216
216
|
if (r.getElementById("om-carto-cvd-filters")) return;
|
|
217
217
|
const t = r.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
218
218
|
t.id = "om-carto-cvd-filters", t.setAttribute("aria-hidden", "true"), t.setAttribute("width", "0"), t.setAttribute("height", "0"), t.style.cssText = "position:absolute;width:0;height:0;overflow:hidden;";
|
|
219
219
|
for (const e of dt) {
|
|
220
220
|
const n = r.createElementNS("http://www.w3.org/2000/svg", "filter");
|
|
221
|
-
n.id =
|
|
221
|
+
n.id = Me(e), n.setAttribute("color-interpolation-filters", "linearRGB");
|
|
222
222
|
const i = r.createElementNS("http://www.w3.org/2000/svg", "feColorMatrix");
|
|
223
223
|
i.setAttribute("type", "matrix");
|
|
224
224
|
const s = It[e];
|
|
@@ -260,44 +260,44 @@ async function Rt(r, t = {}) {
|
|
|
260
260
|
const h = Math.min(u / (l / 25.4), u / (c / 25.4)), f = Math.sqrt(m / (l / 25.4 * (c / 25.4))), p = Math.min(h, f);
|
|
261
261
|
d > p && (d = Math.floor(p), n.push(`Requested ${i} dpi exceeds this browser's canvas budget for a ${l.toFixed(0)}×${c.toFixed(0)}mm page; rendered at ${d} dpi instead.`)), n.push(...await lr(e)), typeof document < "u" && document.fonts?.ready && await document.fonts.ready;
|
|
262
262
|
const g = Ot(d), b = Math.max(1, Math.round(l * g.pxPerMm)), w = Math.max(1, Math.round(c * g.pxPerMm)), y = cr(e);
|
|
263
|
-
for (const
|
|
264
|
-
if (!(!ft(
|
|
263
|
+
for (const M of y)
|
|
264
|
+
if (!(!ft(M) || !M.prepareCartograph))
|
|
265
265
|
try {
|
|
266
|
-
await
|
|
266
|
+
await M.prepareCartograph(Ot(d));
|
|
267
267
|
} catch (A) {
|
|
268
|
-
|
|
268
|
+
M.discardCartograph?.(), n.push(`${M.tagName.toLowerCase()}${M.id ? `#${M.id}` : ""} could not be captured: ${A.message}`);
|
|
269
269
|
}
|
|
270
270
|
const C = document.createElement("canvas");
|
|
271
271
|
C.width = b, C.height = w;
|
|
272
|
-
const
|
|
273
|
-
if (!
|
|
272
|
+
const v = C.getContext("2d");
|
|
273
|
+
if (!v) throw new Error("[onlymapjs/cartograph] renderCartograph: could not get a 2D canvas context.");
|
|
274
274
|
const F = typeof getComputedStyle == "function" ? getComputedStyle(e) : null;
|
|
275
|
-
|
|
276
|
-
for (const
|
|
277
|
-
if (!ft(
|
|
278
|
-
const A = S(
|
|
279
|
-
if (
|
|
275
|
+
v.fillStyle = L(F?.backgroundColor) ?? "#ffffff", v.fillRect(0, 0, b, w);
|
|
276
|
+
for (const M of y) {
|
|
277
|
+
if (!ft(M)) continue;
|
|
278
|
+
const A = S(M);
|
|
279
|
+
if (v.save(), v.translate((A.x + a) * g.pxPerMm, (A.y + a) * g.pxPerMm), A.rotation) {
|
|
280
280
|
const $ = A.w / 2 * g.pxPerMm, E = A.h / 2 * g.pxPerMm;
|
|
281
|
-
|
|
281
|
+
v.translate($, E), v.rotate(A.rotation * Math.PI / 180), v.translate(-$, -E);
|
|
282
282
|
}
|
|
283
283
|
try {
|
|
284
|
-
|
|
284
|
+
M.paintCartograph(v, g);
|
|
285
285
|
} catch ($) {
|
|
286
|
-
n.push(`${
|
|
286
|
+
n.push(`${M.tagName.toLowerCase()}${M.id ? `#${M.id}` : ""} failed to render: ${$.message}`);
|
|
287
287
|
}
|
|
288
|
-
|
|
288
|
+
v.restore();
|
|
289
289
|
}
|
|
290
290
|
const _ = e.querySelector(":scope > [data-om-carto-marks]");
|
|
291
|
-
for (const
|
|
292
|
-
const A = Number(
|
|
293
|
-
[A, $, E, U].every(Number.isFinite) && (
|
|
291
|
+
for (const M of _?.querySelectorAll("line") ?? []) {
|
|
292
|
+
const A = Number(M.getAttribute("x1")), $ = Number(M.getAttribute("y1")), E = Number(M.getAttribute("x2")), U = Number(M.getAttribute("y2"));
|
|
293
|
+
[A, $, E, U].every(Number.isFinite) && (v.save(), v.strokeStyle = M.getAttribute("stroke") || "#000000", v.lineWidth = (Number(M.getAttribute("stroke-width")) || 0.2) * g.pxPerMm, v.beginPath(), v.moveTo((A + a) * g.pxPerMm, ($ + a) * g.pxPerMm), v.lineTo((E + a) * g.pxPerMm, (U + a) * g.pxPerMm), v.stroke(), v.restore());
|
|
294
294
|
}
|
|
295
295
|
const k = Ft(t.cvd === "page" ? e.getAttribute("cvd") : t.cvd);
|
|
296
|
-
k && !sr(
|
|
297
|
-
for (const
|
|
296
|
+
k && !sr(v, b, w, k) && n.push("Colour-vision simulation was skipped: a cross-origin image on the page makes the export canvas unreadable.");
|
|
297
|
+
for (const M of y) ft(M) && M.discardCartograph?.();
|
|
298
298
|
const N = t.format === "jpeg" ? "image/jpeg" : "image/png";
|
|
299
299
|
N === "image/jpeg" && e.querySelector("om-text") && n.push("JPEG compresses text edges — prefer PNG for a page carrying labels.");
|
|
300
|
-
const T = await new Promise((
|
|
300
|
+
const T = await new Promise((M) => C.toBlob(M, N, t.quality));
|
|
301
301
|
if (!T) throw new Error("[onlymapjs/cartograph] renderCartograph: the canvas produced no image (it may have exceeded a browser limit).");
|
|
302
302
|
return { blob: T, widthPx: b, heightPx: w, dpi: d, warnings: n };
|
|
303
303
|
}
|
|
@@ -452,24 +452,24 @@ class R extends fr {
|
|
|
452
452
|
}
|
|
453
453
|
const pt = "cartograph/2", Wn = ["default", "dark", "sepia", "blueprint", "minimal"], Vt = ["A0", "A1", "A2", "A3", "A4", "A5", "Letter", "Legal"], gr = /* @__PURE__ */ new Map([
|
|
454
454
|
["projection", "live frames render Web Mercator (EPSG:3857) only — Globe support is design-only; use a static frame for other projections"]
|
|
455
|
-
]),
|
|
455
|
+
]), j = ["id", "x", "y", "w", "h", "rotation", "z", "locked", "hidden"], P = {
|
|
456
456
|
"om-cartograph": ["cartograph-id", "format", "size", "width", "height", "orientation", "theme", "title", "attribution", "notes", "cvd", "bleed", "crop-marks", "safe-zone", "dpi", "flatten", "color-profile", "allow-url-actions"],
|
|
457
|
-
"om-frame": [...
|
|
458
|
-
"om-legend": [...
|
|
457
|
+
"om-frame": [...j, "src", "mode", "center", "zoom", "bearing", "pitch", "dpi", "crs", "corners", "crs-def", "overview-of", "overview-stroke", "atlas-fit", "atlas-margin", "frame-stroke", "frame-bg"],
|
|
458
|
+
"om-legend": [...j, "for", "title", "columns", "derived"],
|
|
459
459
|
"om-legend-row": ["layer", "match", "label", "hide", "order", "color", "shape"],
|
|
460
460
|
// NOTE: the discriminator on furniture is `kind`, never `style` — `style` is
|
|
461
461
|
// the global HTML attribute the runtime itself writes for mm placement, so
|
|
462
462
|
// `style="double"` would be erased on the first render. `kind` also matches
|
|
463
463
|
// om-text/om-shape, so the whole vocabulary has ONE discriminator word.
|
|
464
|
-
"om-scalebar": [...
|
|
465
|
-
"om-north": [...
|
|
466
|
-
"om-graticule": [...
|
|
467
|
-
"om-text": [...
|
|
468
|
-
"om-shape": [...
|
|
469
|
-
"om-image": [...
|
|
464
|
+
"om-scalebar": [...j, "for", "units", "segments", "segment-length", "kind"],
|
|
465
|
+
"om-north": [...j, "for", "kind"],
|
|
466
|
+
"om-graticule": [...j, "for", "crs", "crs-def", "interval", "interval-x", "interval-y", "kind", "labels", "format"],
|
|
467
|
+
"om-text": [...j, "kind", "font-size", "weight", "align", "font", "color", "bg"],
|
|
468
|
+
"om-shape": [...j, "kind", "fill", "fill-opacity", "stroke", "stroke-width", "radius"],
|
|
469
|
+
"om-image": [...j, "src", "fit"],
|
|
470
470
|
"om-atlas": ["id", "for", "layer", "filter", "sort", "filename", "page-name"]
|
|
471
|
-
}, gt = Object.keys(P), br = ["metric", "imperial", "nautical"], yr = 0.3048, wr = 1609.344,
|
|
472
|
-
function
|
|
471
|
+
}, gt = Object.keys(P), br = ["metric", "imperial", "nautical"], yr = 0.3048, wr = 1609.344, vr = 1852;
|
|
472
|
+
function Mr(r) {
|
|
473
473
|
return r != null && br.includes(r) ? r : null;
|
|
474
474
|
}
|
|
475
475
|
function ke(r) {
|
|
@@ -487,7 +487,7 @@ const Ht = {
|
|
|
487
487
|
{ metersPerUnit: yr, label: "ft" },
|
|
488
488
|
{ metersPerUnit: wr, label: "mi" }
|
|
489
489
|
],
|
|
490
|
-
nautical: [{ metersPerUnit:
|
|
490
|
+
nautical: [{ metersPerUnit: vr, label: "nmi" }]
|
|
491
491
|
};
|
|
492
492
|
function $e({ groundMetersPerMm: r, maxWidthMm: t, segments: e = 4, units: n = "metric", segmentLengthMeters: i }) {
|
|
493
493
|
if (!Number.isFinite(r) || r <= 0 || !Number.isFinite(t) || t <= 0) return null;
|
|
@@ -651,7 +651,7 @@ function W(r, t) {
|
|
|
651
651
|
function Pr(r) {
|
|
652
652
|
r.querySelector(`:scope > [${Et}]`)?.remove();
|
|
653
653
|
}
|
|
654
|
-
const Xt = "data-om-carto-page", Zt = "data-om-carto-marks", bt = "data-om-carto-credit", yt = "Built with OnlyMap by NIKA · free for non-commercial use", rt = 2, Jt = 1.2, wt = 2.4, Qt = 1.5,
|
|
654
|
+
const Xt = "data-om-carto-page", Zt = "data-om-carto-marks", bt = "data-om-carto-credit", yt = "Built with OnlyMap by NIKA · free for non-commercial use", rt = 2, Jt = 1.2, wt = 2.4, Qt = 1.5, vt = 1.2, te = 0.3, ee = 0.8, Mt = "http://www.w3.org/2000/svg", Tr = 6e4;
|
|
655
655
|
class Fe extends R {
|
|
656
656
|
static observedAttributes = [...P["om-cartograph"]];
|
|
657
657
|
frameListenerBound = !1;
|
|
@@ -701,15 +701,15 @@ class Fe extends R {
|
|
|
701
701
|
return;
|
|
702
702
|
}
|
|
703
703
|
const s = this.ownerDocument.createElement("div");
|
|
704
|
-
s.setAttribute(bt, ""), s.setAttribute("z", "2147483644"), s.textContent = yt, s.style.cssText = `position:absolute;left:${rt}mm;bottom:${Jt}mm;z-index:2147483644;font:${wt}mm/${Qt} system-ui,sans-serif;color:#374151;background:rgba(255,255,255,.72);padding:${te}mm ${
|
|
704
|
+
s.setAttribute(bt, ""), s.setAttribute("z", "2147483644"), s.textContent = yt, s.style.cssText = `position:absolute;left:${rt}mm;bottom:${Jt}mm;z-index:2147483644;font:${wt}mm/${Qt} system-ui,sans-serif;color:#374151;background:rgba(255,255,255,.72);padding:${te}mm ${vt}mm;border-radius:${ee}mm;pointer-events:none;`, this.armCreditPainter(s), this.appendChild(s);
|
|
705
705
|
}
|
|
706
706
|
/** Give the runtime-owned DOM credit the same canvas paint contract as authored furniture. */
|
|
707
707
|
armCreditPainter(t) {
|
|
708
708
|
t.paintCartograph = (e, n) => {
|
|
709
709
|
const i = (c) => c * n.pxPerMm, o = wt * Qt + te * 2, a = this.pageSize.heightMm - Jt - o;
|
|
710
710
|
e.save(), e.font = `${i(wt)}px system-ui, sans-serif`;
|
|
711
|
-
const l = e.measureText(yt).width / n.pxPerMm +
|
|
712
|
-
e.fillStyle = "rgba(255,255,255,.72)", e.beginPath(), typeof e.roundRect == "function" ? e.roundRect(i(rt), i(a), i(l), i(o), i(ee)) : e.rect(i(rt), i(a), i(l), i(o)), e.fill(), e.fillStyle = "#374151", e.textAlign = "left", e.textBaseline = "middle", e.fillText(yt, i(rt +
|
|
711
|
+
const l = e.measureText(yt).width / n.pxPerMm + vt * 2;
|
|
712
|
+
e.fillStyle = "rgba(255,255,255,.72)", e.beginPath(), typeof e.roundRect == "function" ? e.roundRect(i(rt), i(a), i(l), i(o), i(ee)) : e.rect(i(rt), i(a), i(l), i(o)), e.fill(), e.fillStyle = "#374151", e.textAlign = "left", e.textBaseline = "middle", e.fillText(yt, i(rt + vt), i(a + o / 2)), e.restore();
|
|
713
713
|
};
|
|
714
714
|
}
|
|
715
715
|
/**
|
|
@@ -816,7 +816,7 @@ class Fe extends R {
|
|
|
816
816
|
a?.remove();
|
|
817
817
|
return;
|
|
818
818
|
}
|
|
819
|
-
const l = this.ownerDocument, c = a ?? l.createElementNS(
|
|
819
|
+
const l = this.ownerDocument, c = a ?? l.createElementNS(Mt, "svg");
|
|
820
820
|
if (c.setAttribute(Zt, ""), c.setAttribute("viewBox", `${-n} ${-n} ${t + n * 2} ${e + n * 2}`), c.setAttribute("width", `${t + n * 2}mm`), c.setAttribute("height", `${e + n * 2}mm`), c.style.cssText = `position:absolute;left:${-n}mm;top:${-n}mm;pointer-events:none;z-index:2147483646;`, c.replaceChildren(), i) {
|
|
821
821
|
const u = Math.min(n, 4), m = Math.min(n * 0.35, 1.5), d = [];
|
|
822
822
|
for (const h of [0, t])
|
|
@@ -825,12 +825,12 @@ class Fe extends R {
|
|
|
825
825
|
d.push([h + p * m, f, h + p * (m + u), f]), d.push([h, f + g * m, h, f + g * (m + u)]);
|
|
826
826
|
}
|
|
827
827
|
for (const [h, f, p, g] of d) {
|
|
828
|
-
const b = l.createElementNS(
|
|
828
|
+
const b = l.createElementNS(Mt, "line");
|
|
829
829
|
b.setAttribute("x1", String(h)), b.setAttribute("y1", String(f)), b.setAttribute("x2", String(p)), b.setAttribute("y2", String(g)), b.setAttribute("stroke", "#000"), b.setAttribute("stroke-width", "0.15"), c.appendChild(b);
|
|
830
830
|
}
|
|
831
831
|
}
|
|
832
832
|
if (o) {
|
|
833
|
-
const u = l.createElementNS(
|
|
833
|
+
const u = l.createElementNS(Mt, "rect");
|
|
834
834
|
u.setAttribute("x", String(s)), u.setAttribute("y", String(s)), u.setAttribute("width", String(Math.max(0, t - s * 2))), u.setAttribute("height", String(Math.max(0, e - s * 2))), u.setAttribute("fill", "none"), u.setAttribute("stroke", "#22aaff"), u.setAttribute("stroke-width", "0.2"), u.setAttribute("stroke-dasharray", "2 1.5"), u.setAttribute("data-om-carto-screen-only", ""), c.appendChild(u);
|
|
835
835
|
}
|
|
836
836
|
a || this.appendChild(c);
|
|
@@ -849,7 +849,7 @@ class Fe extends R {
|
|
|
849
849
|
this.style.removeProperty("filter");
|
|
850
850
|
return;
|
|
851
851
|
}
|
|
852
|
-
ar(this.ownerDocument), this.style.filter = `url(#${
|
|
852
|
+
ar(this.ownerDocument), this.style.filter = `url(#${Me(t)})`;
|
|
853
853
|
}
|
|
854
854
|
}
|
|
855
855
|
x("om-cartograph", Fe);
|
|
@@ -967,7 +967,7 @@ function K(r) {
|
|
|
967
967
|
async function Oe(r, t) {
|
|
968
968
|
const e = K(r);
|
|
969
969
|
if (e && !t) return e;
|
|
970
|
-
const n = Y(r) ?? "EPSG:3857", i = t?.trim() || await
|
|
970
|
+
const n = Y(r) ?? "EPSG:3857", i = t?.trim() || await zr(n);
|
|
971
971
|
if (!i) return null;
|
|
972
972
|
const s = (await import("./index-CcLC9jE5.js")).default, a = s(i, "+proj=longlat +datum=WGS84 +no_defs");
|
|
973
973
|
return {
|
|
@@ -979,7 +979,7 @@ async function Oe(r, t) {
|
|
|
979
979
|
function ie(r, t) {
|
|
980
980
|
return !Number.isInteger(r) || r < 1 || r > 60 ? null : `+proj=utm +zone=${r}${t === "S" ? " +south" : ""} +datum=WGS84 +units=m +no_defs`;
|
|
981
981
|
}
|
|
982
|
-
async function
|
|
982
|
+
async function zr(r) {
|
|
983
983
|
const t = Number(/^EPSG:(\d+)$/.exec(r)?.[1]);
|
|
984
984
|
if (!Number.isFinite(t)) return null;
|
|
985
985
|
if (t >= 32601 && t <= 32660) return ie(t - 32600, "N");
|
|
@@ -987,7 +987,7 @@ async function jr(r) {
|
|
|
987
987
|
const { CRS_DEFS: e } = await import("./crs-DsDQ4Q4i.js");
|
|
988
988
|
return e[t]?.def ?? null;
|
|
989
989
|
}
|
|
990
|
-
function
|
|
990
|
+
function jr(r, t) {
|
|
991
991
|
const e = t.length, n = r.map((i, s) => [...i, t[s]]);
|
|
992
992
|
for (let i = 0; i < e; i++) {
|
|
993
993
|
let s = i;
|
|
@@ -1010,7 +1010,7 @@ function Dr(r, t) {
|
|
|
1010
1010
|
const [d, h] = o(r[m]), [f, p] = t[m];
|
|
1011
1011
|
a.push([d, h, 1, 0, 0, 0, -d * f, -h * f]), l.push(f), a.push([0, 0, 0, d, h, 1, -d * p, -h * p]), l.push(p);
|
|
1012
1012
|
}
|
|
1013
|
-
const c =
|
|
1013
|
+
const c = jr(a, l);
|
|
1014
1014
|
if (!c || c.some((m) => !Number.isFinite(m))) return null;
|
|
1015
1015
|
const u = (m) => [m[0] / s + e, m[1] / s + n];
|
|
1016
1016
|
return { matrix: [c[0], c[1], c[2], c[3], c[4], c[5], c[6], c[7], 1], normalize: o, denormalize: u };
|
|
@@ -1394,13 +1394,13 @@ class Ue extends R {
|
|
|
1394
1394
|
this.mounting && this.abandonMount(), this.captureImage = null, this.liveMap && (this.liveMapOwned ? this.releaseLiveMap() : this.liveMap.hidden = !0);
|
|
1395
1395
|
}
|
|
1396
1396
|
releaseLiveMap() {
|
|
1397
|
-
this.liveMapOwned ? this.liveMap?.remove() : this.liveMap && (this.liveMap.hidden = !0), this.liveMap = null, this.liveMapOwned = !1, this.mountedSource = null, this.liveCorners = null, this.captureImage = null;
|
|
1397
|
+
this.liveMap?.removeEventListener("om-view-changed", this.onLiveViewChanged), this.liveMapOwned ? this.liveMap?.remove() : this.liveMap && (this.liveMap.hidden = !0), this.liveMap = null, this.liveMapOwned = !1, this.mountedSource = null, this.liveCorners = null, this.captureImage = null;
|
|
1398
1398
|
}
|
|
1399
1399
|
updateLiveCorners(t = Q(this)) {
|
|
1400
1400
|
if (!t) return;
|
|
1401
1401
|
const e = G();
|
|
1402
1402
|
if (!e) return;
|
|
1403
|
-
const { w: n, h: i } = S(this), s = Pt(e, t, n *
|
|
1403
|
+
const { w: n, h: i } = S(this), s = Pt(e, t, n * z, i * z);
|
|
1404
1404
|
this.liveCorners = s, s ? this.lastError === "degenerate-view" && this.clearPlaceholder() : this.showPlaceholder(
|
|
1405
1405
|
"degenerate-view",
|
|
1406
1406
|
"This camera cannot be georeferenced — the frame's top edge reaches the horizon. Reduce pitch below ~60°."
|
|
@@ -1416,9 +1416,9 @@ class Ue extends R {
|
|
|
1416
1416
|
if (!s) return;
|
|
1417
1417
|
At(i, s);
|
|
1418
1418
|
const o = i;
|
|
1419
|
-
o.style.position = "absolute", o.style.inset = "0", o.style.display = "block", this.liveMapOwned = i.parentElement !== this, this.liveMapOwned && this.appendChild(i), i.setAttribute("data-om-carto-frame", ""), this.liveMap = o, this.mountedSource = t, this.sizeLiveMap(), this.clearPlaceholder();
|
|
1419
|
+
o.style.position = "absolute", o.style.inset = "0", o.style.display = "block", this.liveMapOwned = i.parentElement !== this, this.liveMapOwned && this.appendChild(i), i.setAttribute("data-om-carto-frame", ""), this.liveMap = o, o.addEventListener("om-view-changed", this.onLiveViewChanged), this.mountedSource = t, this.sizeLiveMap(), this.clearPlaceholder();
|
|
1420
1420
|
const { w: a, h: l } = S(this);
|
|
1421
|
-
if (this.liveCorners = Pt(n, s, a *
|
|
1421
|
+
if (this.liveCorners = Pt(n, s, a * z, l * z), await o.ready, e !== this.mountToken || (At(i, s), await o.whenSettled?.({ timeout: 2e4 }), e !== this.mountToken)) return;
|
|
1422
1422
|
this.signalReady();
|
|
1423
1423
|
} catch (n) {
|
|
1424
1424
|
if (e !== this.mountToken) return;
|
|
@@ -1441,11 +1441,23 @@ class Ue extends R {
|
|
|
1441
1441
|
* depends on the box's aspect and the current zoom.
|
|
1442
1442
|
*/
|
|
1443
1443
|
capMapPitch() {
|
|
1444
|
-
const t = G()
|
|
1445
|
-
if (!t || !
|
|
1446
|
-
const
|
|
1447
|
-
|
|
1444
|
+
const t = G();
|
|
1445
|
+
if (!t || !this.liveMap) return;
|
|
1446
|
+
const e = this.liveMap.getViewStateInternal?.(), n = e ? { center: [e.longitude, e.latitude], zoom: e.zoom, bearing: e.bearing, pitch: e.pitch } : Q(this);
|
|
1447
|
+
if (!n) return;
|
|
1448
|
+
const { w: i, h: s } = S(this), o = Kr(t, n, i * z, s * z), a = o >= 60 ? null : String(o);
|
|
1449
|
+
a !== this.liveMap.getAttribute("max-pitch") && (a === null ? this.liveMap.removeAttribute("max-pitch") : this.liveMap.setAttribute("max-pitch", a));
|
|
1448
1450
|
}
|
|
1451
|
+
/**
|
|
1452
|
+
* The ceiling follows the camera, so a zoom changes it.
|
|
1453
|
+
*
|
|
1454
|
+
* Bound once so add/remove pair up. Cheap enough to run on every reported
|
|
1455
|
+
* view: a probe is four unprojections and the attribute is only written when
|
|
1456
|
+
* the whole-degree answer actually moves.
|
|
1457
|
+
*/
|
|
1458
|
+
onLiveViewChanged = () => {
|
|
1459
|
+
this.capMapPitch();
|
|
1460
|
+
};
|
|
1449
1461
|
// -------------------------------------------------------------------------
|
|
1450
1462
|
// Locator inset (overview-of)
|
|
1451
1463
|
// -------------------------------------------------------------------------
|
|
@@ -1474,7 +1486,7 @@ class Ue extends R {
|
|
|
1474
1486
|
];
|
|
1475
1487
|
for (const [b, w] of h)
|
|
1476
1488
|
for (let y = 0; y < le; y++) {
|
|
1477
|
-
const C = y / le,
|
|
1489
|
+
const C = y / le, v = [b[0] + (w[0] - b[0]) * C, b[1] + (w[1] - b[1]) * C], F = i.project(v);
|
|
1478
1490
|
F && l.push(`${F.xMm.toFixed(3)},${F.yMm.toFixed(3)}`);
|
|
1479
1491
|
}
|
|
1480
1492
|
if (l.length < 3) {
|
|
@@ -1536,7 +1548,7 @@ class Ue extends R {
|
|
|
1536
1548
|
if (o <= 0 || a <= 0) return;
|
|
1537
1549
|
const l = G();
|
|
1538
1550
|
if (!l) return;
|
|
1539
|
-
const c = new l.WebMercatorViewport({ width: o *
|
|
1551
|
+
const c = new l.WebMercatorViewport({ width: o * z, height: a * z, longitude: 0, latitude: 0, zoom: 0 }).fitBounds([
|
|
1540
1552
|
[e, n],
|
|
1541
1553
|
[i, s]
|
|
1542
1554
|
]);
|
|
@@ -1584,7 +1596,7 @@ class Ue extends R {
|
|
|
1584
1596
|
}
|
|
1585
1597
|
x("om-frame", Ue);
|
|
1586
1598
|
const it = "http://www.w3.org/2000/svg", Jr = ["single", "double", "line", "ticks"];
|
|
1587
|
-
class
|
|
1599
|
+
class ze extends R {
|
|
1588
1600
|
static observedAttributes = [...P["om-scalebar"]];
|
|
1589
1601
|
/** The geometry currently drawn — reused by the canvas exporter. */
|
|
1590
1602
|
get drawing() {
|
|
@@ -1604,7 +1616,7 @@ class je extends R {
|
|
|
1604
1616
|
return Jr.includes(t) ? t : "single";
|
|
1605
1617
|
}
|
|
1606
1618
|
get unitSystem() {
|
|
1607
|
-
return
|
|
1619
|
+
return Mr(this.getAttribute("units")) ?? "metric";
|
|
1608
1620
|
}
|
|
1609
1621
|
renderNow() {
|
|
1610
1622
|
if (this.applyPlacement(), this.style.display = "block", !O(this)) {
|
|
@@ -1654,9 +1666,9 @@ class je extends R {
|
|
|
1654
1666
|
t.textAlign = l.anchor === "middle" ? "center" : l.anchor === "end" ? "right" : "left", t.fillText(l.text, o(l.x), o(l.y));
|
|
1655
1667
|
}
|
|
1656
1668
|
}
|
|
1657
|
-
x("om-scalebar",
|
|
1669
|
+
x("om-scalebar", ze);
|
|
1658
1670
|
const J = "http://www.w3.org/2000/svg";
|
|
1659
|
-
class
|
|
1671
|
+
class je extends R {
|
|
1660
1672
|
static observedAttributes = [...P["om-north"]];
|
|
1661
1673
|
/** Degrees clockwise from the page's "up", or null when unknowable. */
|
|
1662
1674
|
get bearing() {
|
|
@@ -1702,7 +1714,7 @@ class ze extends R {
|
|
|
1702
1714
|
t.save(), t.translate(l(m), l(s / 2)), t.rotate(n * Math.PI / 180), t.translate(-l(m), -l(s / 2)), t.fillStyle = a, t.strokeStyle = a, this.indicatorKind === "rose" && (t.lineWidth = l(0.2), t.beginPath(), t.arc(l(m), l(u / 2), l(Math.min(i, u) / 2), 0, Math.PI * 2), t.stroke()), t.beginPath(), t.moveTo(l(m), 0), t.lineTo(l(m + d), l(u)), t.lineTo(l(m), l(u - d * 0.55)), t.lineTo(l(m - d), l(u)), t.closePath(), t.fill(), t.font = `${l(c)}px ${o?.fontFamily || "system-ui, sans-serif"}`, t.textAlign = "center", t.textBaseline = "alphabetic", t.fillText("N", l(m), l(s)), t.restore();
|
|
1703
1715
|
}
|
|
1704
1716
|
}
|
|
1705
|
-
x("om-north",
|
|
1717
|
+
x("om-north", je);
|
|
1706
1718
|
const ot = "http://www.w3.org/2000/svg", Qr = ["rect", "ellipse", "line", "arrow"];
|
|
1707
1719
|
class De extends R {
|
|
1708
1720
|
static observedAttributes = [...P["om-shape"]];
|
|
@@ -1970,15 +1982,15 @@ class We extends R {
|
|
|
1970
1982
|
let f = h(2);
|
|
1971
1983
|
const p = this.getAttribute("title");
|
|
1972
1984
|
p && (t.fillStyle = m, t.font = `600 ${h(2.6)}px ${d}`, t.textBaseline = "top", t.fillText(p, h(2), f), f += h(4));
|
|
1973
|
-
const g = this.rows, b = Number(this.getAttribute("columns")), w = Math.min(g.length || 1, Number.isFinite(b) && b > 1 ? Math.floor(b) : 1), y = Math.max(1, Math.ceil(g.length / w)), C = 3,
|
|
1985
|
+
const g = this.rows, b = Number(this.getAttribute("columns")), w = Math.min(g.length || 1, Number.isFinite(b) && b > 1 ? Math.floor(b) : 1), y = Math.max(1, Math.ceil(g.length / w)), C = 3, v = Math.max(1, (n - 4 - C * (w - 1)) / w), F = f;
|
|
1974
1986
|
let _ = -1, k = 2;
|
|
1975
1987
|
t.font = `${h(2.6)}px ${d}`;
|
|
1976
1988
|
for (const [N, T] of g.entries()) {
|
|
1977
|
-
const
|
|
1978
|
-
if (
|
|
1989
|
+
const M = Math.min(w - 1, Math.floor(N / y));
|
|
1990
|
+
if (M !== _ && (_ = M, k = 2 + _ * (v + C), f = _ === 0 ? F : h(2)), f > o || (t.fillStyle = T.color, T.shape === "line" ? t.fillRect(h(k), f + h(1.2), h(3.2), h(0.9)) : T.shape === "point" ? (t.beginPath(), t.arc(h(k + 1.6), f + h(1.6), h(1.6), 0, Math.PI * 2), t.fill()) : t.fillRect(h(k), f, h(3.2), h(3.2)), t.fillStyle = m, t.textBaseline = "top", t.fillText(T.label, h(k + 4.7), f + h(0.3)), f += h(4.2), !T.legend)) continue;
|
|
1979
1991
|
const A = T.legend;
|
|
1980
1992
|
if (t.save(), t.font = `${h(2.1)}px ${d}`, t.globalAlpha = 0.7, t.fillText(A.field, h(k + 2.7), f), t.globalAlpha = 1, f += h(2.8), A.kind === "ramp") {
|
|
1981
|
-
const $ = Math.min(24, Math.max(1,
|
|
1993
|
+
const $ = Math.min(24, Math.max(1, v - 2.7)), E = k + 2.7, U = t.createLinearGradient(h(E), 0, h(E + $), 0);
|
|
1982
1994
|
A.colors.forEach((X, Xe) => U.addColorStop(A.colors.length === 1 ? 0 : Xe / (A.colors.length - 1), X)), t.fillStyle = U, t.fillRect(h(E), f, h($), h(2.4)), f += h(3.4), t.fillStyle = m, t.font = `${h(2.1)}px ${d}`, t.fillText(A.domain[0].toLocaleString("en-US"), h(E), f);
|
|
1983
1995
|
const tt = A.domain[1].toLocaleString("en-US");
|
|
1984
1996
|
t.textAlign = "right", t.fillText(tt, h(E + $), f), t.textAlign = "left", f += h(3.2);
|
|
@@ -2230,12 +2242,12 @@ function wn(r) {
|
|
|
2230
2242
|
!Number.isFinite(a) || !Number.isFinite(l) || (t = Math.min(t, a), n = Math.max(n, a), e = Math.min(e, l), i = Math.max(i, l));
|
|
2231
2243
|
return !Number.isFinite(t) || !Number.isFinite(e) ? null : [t, e, n, i];
|
|
2232
2244
|
}
|
|
2233
|
-
function
|
|
2245
|
+
function vn(r, t) {
|
|
2234
2246
|
const [e, n, i, s] = r, o = Math.max(i - e, 1e-4), a = Math.max(s - n, 1e-4), l = o * t, c = a * t;
|
|
2235
2247
|
return [e - l, n - c, i + l, s + c];
|
|
2236
2248
|
}
|
|
2237
2249
|
const Hn = ([r, t, e, n]) => Math.max(0, e - r) * Math.max(0, n - t);
|
|
2238
|
-
function
|
|
2250
|
+
function Mn({ features: r, filter: t, sort: e }) {
|
|
2239
2251
|
let n = t ? r.filter((s) => An(t, s)) : [...r];
|
|
2240
2252
|
const i = Sn(e);
|
|
2241
2253
|
return i.length > 0 && (n = [...n].sort((s, o) => {
|
|
@@ -2331,7 +2343,7 @@ class He extends R {
|
|
|
2331
2343
|
if (!e || s)
|
|
2332
2344
|
return this.rejection = e ? s : null, this.pages = [];
|
|
2333
2345
|
const o = this.materialize(i);
|
|
2334
|
-
return this.pages =
|
|
2346
|
+
return this.pages = Mn({ features: o, filter: this.compileFilter(), sort: this.getAttribute("sort") }), this.currentIndex = Math.min(this.currentIndex, Math.max(0, this.pages.length - 1)), this.pages;
|
|
2335
2347
|
}
|
|
2336
2348
|
/**
|
|
2337
2349
|
* Rows from the layer, with the layer's OWN declarative filters applied —
|
|
@@ -2384,7 +2396,7 @@ class He extends R {
|
|
|
2384
2396
|
if (n.getAttribute("atlas-fit") !== "feature") continue;
|
|
2385
2397
|
const i = wn(t);
|
|
2386
2398
|
if (!i) continue;
|
|
2387
|
-
const s = Number(n.getAttribute("atlas-margin")), o =
|
|
2399
|
+
const s = Number(n.getAttribute("atlas-margin")), o = vn(i, Number.isFinite(s) && s > 0 ? s : 0.15);
|
|
2388
2400
|
n.fitBounds?.(o);
|
|
2389
2401
|
}
|
|
2390
2402
|
e?.setAtlasFields({ ...Lt(t), index: String(this.currentIndex + 1), count: String(this.count) }), e?.refreshFurniture(), this.dispatchEvent(
|
|
@@ -2463,7 +2475,7 @@ function _n(r, t) {
|
|
|
2463
2475
|
const p = S(h);
|
|
2464
2476
|
Un(h, p, a, l, c, t), Pn.has(f) && !h.hasAttribute("hidden") && d.push({ el: h, box: p });
|
|
2465
2477
|
}
|
|
2466
|
-
f === "om-frame" &&
|
|
2478
|
+
f === "om-frame" && zn(h, t), f === "om-legend" && jn(h, m, t), f === "om-atlas" && Dn(h, m, t), f === "om-scalebar" && Gn(h, m, t), f === "om-text" && qn(h, m, t);
|
|
2467
2479
|
for (const p of ["for", "overview-of"]) {
|
|
2468
2480
|
const g = h.getAttribute(p);
|
|
2469
2481
|
g && !u.has(g) && t("error", h, `${p}="${g}" references no frame on this page.`, `Point it at one of: ${[...u].join(", ") || "(no frames)"}.`, p);
|
|
@@ -2523,7 +2535,7 @@ function Un(r, t, e, n, i, s) {
|
|
|
2523
2535
|
);
|
|
2524
2536
|
}
|
|
2525
2537
|
}
|
|
2526
|
-
function
|
|
2538
|
+
function zn(r, t) {
|
|
2527
2539
|
if ((r.getAttribute("mode") === "static" ? "static" : "live") === "static") {
|
|
2528
2540
|
const n = r.getAttribute("corners"), i = mt(n);
|
|
2529
2541
|
i || t(
|
|
@@ -2572,7 +2584,7 @@ function _t(r, t) {
|
|
|
2572
2584
|
const e = r.getAttribute("for");
|
|
2573
2585
|
return e ? t.find((n) => n.id === e) : t.length === 1 ? t[0] : void 0;
|
|
2574
2586
|
}
|
|
2575
|
-
function
|
|
2587
|
+
function jn(r, t, e) {
|
|
2576
2588
|
const n = r.getAttribute("derived") !== "false", i = _t(r, t);
|
|
2577
2589
|
n && i?.getAttribute("mode") === "static" && e(
|
|
2578
2590
|
"warning",
|
|
@@ -2686,7 +2698,7 @@ async function Kn(r) {
|
|
|
2686
2698
|
return { valid: s.length === 0, errors: s, warnings: o };
|
|
2687
2699
|
}
|
|
2688
2700
|
function Xn() {
|
|
2689
|
-
x("om-cartograph", Fe), x("om-text", Ie), x("om-frame", Ue), x("om-scalebar",
|
|
2701
|
+
x("om-cartograph", Fe), x("om-text", Ie), x("om-frame", Ue), x("om-scalebar", ze), x("om-north", je), x("om-shape", De), x("om-image", Ge), x("om-legend", We), x("om-graticule", Ve), x("om-atlas", He);
|
|
2690
2702
|
}
|
|
2691
2703
|
ye(() => import("@nika-js/onlymap"));
|
|
2692
2704
|
dr();
|
|
@@ -2710,14 +2722,14 @@ export {
|
|
|
2710
2722
|
Ve as OmGraticuleElement,
|
|
2711
2723
|
Ge as OmImageElement,
|
|
2712
2724
|
We as OmLegendElement,
|
|
2713
|
-
|
|
2714
|
-
|
|
2725
|
+
je as OmNorthElement,
|
|
2726
|
+
ze as OmScalebarElement,
|
|
2715
2727
|
De as OmShapeElement,
|
|
2716
2728
|
Ie as OmTextElement,
|
|
2717
2729
|
Ut as PAGE_PRESETS,
|
|
2718
2730
|
Vt as PAGE_SIZE_NAMES,
|
|
2719
|
-
|
|
2720
|
-
|
|
2731
|
+
j as PLACED_ATTR_NAMES,
|
|
2732
|
+
z as PX_PER_MM,
|
|
2721
2733
|
Sr as SCALE_GROUP_SEPARATOR,
|
|
2722
2734
|
hr as URL_ACTION_TIMEOUT_MS,
|
|
2723
2735
|
Fr as alignOffset,
|
|
@@ -2729,7 +2741,7 @@ export {
|
|
|
2729
2741
|
Hn as boundsArea,
|
|
2730
2742
|
S as boxMm,
|
|
2731
2743
|
hn as buildGraticule,
|
|
2732
|
-
|
|
2744
|
+
Mn as buildPages,
|
|
2733
2745
|
$e as buildScalebar,
|
|
2734
2746
|
Ar as buildScalebarDrawing,
|
|
2735
2747
|
K as builtinCrsForward,
|
|
@@ -2762,7 +2774,7 @@ export {
|
|
|
2762
2774
|
Y as normalizeCrs,
|
|
2763
2775
|
Wr as northBearingDegrees,
|
|
2764
2776
|
Pe as ownerCartograph,
|
|
2765
|
-
|
|
2777
|
+
vn as padBounds,
|
|
2766
2778
|
Ot as paintEnvForDpi,
|
|
2767
2779
|
nr as parseColor,
|
|
2768
2780
|
mt as parseCorners,
|
|
@@ -2786,7 +2798,7 @@ export {
|
|
|
2786
2798
|
xn as sanitizeFilename,
|
|
2787
2799
|
Br as scaleVariation,
|
|
2788
2800
|
ye as setCoreLoader,
|
|
2789
|
-
|
|
2801
|
+
jt as simulate,
|
|
2790
2802
|
on as swatchShapeFor,
|
|
2791
2803
|
kr as tokensIn,
|
|
2792
2804
|
ie as utmDef,
|