@nika-js/onlymap 0.10.1 → 0.10.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 +5 -0
- package/dist/{basemap-DzQBuqBn.js → basemap-tBj0LERd.js} +2 -2
- package/dist/{geoparquet-BlFSeNwf.js → geoparquet-CBJW5XwY.js} +1 -1
- package/dist/{globe-view-qTt7YaiC.js → globe-view-3AKRpYIV.js} +1 -1
- package/dist/{hillshade-Ds0pONmA.js → hillshade-CN9mKpQa.js} +1 -1
- package/dist/{index-CBYDP-_0.js → index-6t601Plg.js} +19 -19
- package/dist/{index-oL_18WvP.js → index-BFfQG-Ht.js} +2 -2
- package/dist/{index-C2VK-Is6.js → index-BeJbVyAr.js} +1 -1
- package/dist/{index-Bpk1EipB.js → index-C5K9K8Fz.js} +1 -1
- package/dist/{index-C4oddUIX.js → index-CEmaQNfr.js} +1 -1
- package/dist/{index-BK99wPf_.js → index-CgaBNCVC.js} +1 -1
- package/dist/{index-B9kwlhFA.js → index-DwrJ4Tco.js} +1 -1
- package/dist/{index-BCTAq6uy.js → index-UaAM3SbL.js} +3 -3
- package/dist/{index-BSwEOxkR.js → index-vkIEL1Jf.js} +3 -3
- package/dist/{lerc-xM89n_hR.js → lerc-D9aqC4Y4.js} +1 -1
- package/dist/onlymap.standalone.js +2 -2
- package/dist/onlymapjs.js +1 -1
- package/dist/{post-process-effect-CNMzoP-h.js → post-process-effect-qnYbdo-D.js} +1 -1
- package/dist/{raster-yVRqHYLH.js → raster-cox_VW7j.js} +3 -3
- package/dist/{raster-pipeline-B_gY9-5f.js → raster-pipeline-CB5CLYy-.js} +1 -1
- package/dist/{text-on-path-D-fhYDqa.js → text-on-path-C3pSnfna.js} +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/{zarr-BPeWy3ro.js → zarr-0zMHITia.js} +2 -2
- package/docs/cartograph.md +2 -2
- package/llms.txt +1 -1
- package/package.json +1 -1
- package/skills/onlymapjs/SKILL.md +1 -1
- package/skills/onlymapjs/references/syntax.md +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,11 @@ 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.10.2 — 2026-09-25
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
- **A popup opened by a click now closes when you click away.** Clicking a feature to open a tooltip left it on screen with no way to dismiss it — it only changed when you clicked a different feature. It was erratic rather than simply stuck: the same popup did close if your pointer happened to leave a feature last, so it looked intermittent. Tooltips now dismiss whenever the selection clears, whichever kind of pick opened them. A popup carrying its own close button is unaffected and still stays open when you click inside it.
|
|
15
|
+
|
|
11
16
|
## 0.10.1 — 2026-09-25
|
|
12
17
|
|
|
13
18
|
### Fixed
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { aJ as Y_, N as Bu, H as Pd, k as K_, aK as J_, aL as Q_, D as Xf, Z as ey } from "./index-
|
|
2
|
-
import { a as ty } from "./globe-view-
|
|
1
|
+
import { aJ as Y_, N as Bu, H as Pd, k as K_, aK as J_, aL as Q_, D as Xf, Z as ey } from "./index-6t601Plg.js";
|
|
2
|
+
import { a as ty } from "./globe-view-3AKRpYIV.js";
|
|
3
3
|
var Ou = { exports: {} };
|
|
4
4
|
/**
|
|
5
5
|
* MapLibre GL JS
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as L, j as x, a6 as A, a7 as E, a8 as d, a9 as h, aa as u, ab as z, p as V, W as Z, G as D } from "./index-
|
|
1
|
+
import { d as L, j as x, a6 as A, a7 as E, a8 as d, a9 as h, aa as u, ab as z, p as V, W as Z, G as D } from "./index-6t601Plg.js";
|
|
2
2
|
const c = Math.PI / 180, G = 180 / Math.PI;
|
|
3
3
|
function w(l, t = 0) {
|
|
4
4
|
const a = Math.min(180, l) * c;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { al as P, am as T, an as N, ao as Z, c as B, ap as E, aq as C, ar as b, as as D, at as I, au as O } from "./index-
|
|
1
|
+
import { al as P, am as T, an as N, ao as Z, c as B, ap as E, aq as C, ar as b, as as D, at as I, au as O } from "./index-6t601Plg.js";
|
|
2
2
|
import { N as _, c as H } from "./hillshade-apron-Bem3DWyJ.js";
|
|
3
3
|
import { p as $, h as j, m as A, a as U } from "./hillshade-shader-DI2uLSNU.js";
|
|
4
4
|
function R(t, e, o) {
|
|
@@ -31145,7 +31145,7 @@ const pte = {
|
|
|
31145
31145
|
}, gte = {
|
|
31146
31146
|
match: (t, e) => ["csv", "tsv"].includes(go(t) ?? "") || /text\/(csv|tab-separated-values)/i.test(e ?? ""),
|
|
31147
31147
|
parse: async (t) => {
|
|
31148
|
-
const [e, i, n] = await Promise.all([t.text(), import("./index-
|
|
31148
|
+
const [e, i, n] = await Promise.all([t.text(), import("./index-C5K9K8Fz.js"), import("./index-BFfQG-Ht.js")]), r = await n.parse(e, i.CSVLoader, { csv: { shape: "object-row-table" } });
|
|
31149
31149
|
return mte(r.data) ?? r.data;
|
|
31150
31150
|
}
|
|
31151
31151
|
};
|
|
@@ -31167,7 +31167,7 @@ const yte = {
|
|
|
31167
31167
|
parse: async (t, e) => {
|
|
31168
31168
|
t.body?.cancel().catch(() => {
|
|
31169
31169
|
});
|
|
31170
|
-
const [i, n] = await Promise.all([import("./index-
|
|
31170
|
+
const [i, n] = await Promise.all([import("./index-BFfQG-Ht.js"), import("./index-CgaBNCVC.js")]), r = t.url || e, s = /* @__PURE__ */ new Map(), o = (m) => {
|
|
31171
31171
|
const v = String(m);
|
|
31172
31172
|
let x = s.get(v);
|
|
31173
31173
|
return x || (x = wO(v), s.set(v, x)), x.then((C) => C.clone());
|
|
@@ -31180,13 +31180,13 @@ const yte = {
|
|
|
31180
31180
|
}, bte = {
|
|
31181
31181
|
match: (t, e) => go(t) === "kml" || /application\/vnd\.google-earth\.kml/i.test(e ?? ""),
|
|
31182
31182
|
parse: async (t) => {
|
|
31183
|
-
const [e, i, n] = await Promise.all([t.text(), import("./index-
|
|
31183
|
+
const [e, i, n] = await Promise.all([t.text(), import("./index-BFfQG-Ht.js"), import("./index-DwrJ4Tco.js")]);
|
|
31184
31184
|
return jl(await i.parse(e, n.KMLLoader));
|
|
31185
31185
|
}
|
|
31186
31186
|
}, vte = /* @__PURE__ */ new Set(["waypoint", "track", "route"]), _te = {
|
|
31187
31187
|
match: (t, e) => go(t) === "gpx" || /application\/gpx\+xml/i.test(e ?? ""),
|
|
31188
31188
|
parse: async (t, e) => {
|
|
31189
|
-
const [i, n, r] = await Promise.all([t.text(), import("./index-
|
|
31189
|
+
const [i, n, r] = await Promise.all([t.text(), import("./index-BFfQG-Ht.js"), import("./index-DwrJ4Tco.js")]), o = ((await n.parse(i, r.GPXLoader)).features ?? []).map((l) => {
|
|
31190
31190
|
const u = l.properties?._gpxType, h = u === "trk" ? "track" : u === "rte" ? "route" : "waypoint";
|
|
31191
31191
|
return { ...l, properties: { ...l.properties, _gpxKind: h } };
|
|
31192
31192
|
}), a = e.split("#")[1]?.toLowerCase().replace(/s$/, "");
|
|
@@ -31219,7 +31219,7 @@ const yte = {
|
|
|
31219
31219
|
t.arrayBuffer(),
|
|
31220
31220
|
import("./index-BYbMtNVH.js"),
|
|
31221
31221
|
import("./index-CgPV7QlM.js"),
|
|
31222
|
-
import("./geoparquet-
|
|
31222
|
+
import("./geoparquet-CBJW5XwY.js")
|
|
31223
31223
|
]), o = new Uint8Array(i);
|
|
31224
31224
|
if (o.length < 8 || o[0] !== 80 || o[1] !== 65 || o[2] !== 82 || o[3] !== 49)
|
|
31225
31225
|
throw new Error(`data="${e}": not a Parquet file (missing PAR1 magic bytes).`);
|
|
@@ -69096,7 +69096,7 @@ cn({
|
|
|
69096
69096
|
type: "COGLayer",
|
|
69097
69097
|
carriesRasterWindow: !0,
|
|
69098
69098
|
carriesRasterIdentify: !0,
|
|
69099
|
-
loadClass: () => import("./raster-
|
|
69099
|
+
loadClass: () => import("./raster-cox_VW7j.js").then((t) => t.r).then((t) => t.OmCOGLayer),
|
|
69100
69100
|
props: [
|
|
69101
69101
|
{ attr: "src", kind: "scalar", deckProp: "geotiff", type: "string", required: !0 },
|
|
69102
69102
|
// COG v2 (issue #13): 1-based band selection — a single band (colormap-
|
|
@@ -69132,7 +69132,7 @@ cn({
|
|
|
69132
69132
|
});
|
|
69133
69133
|
cn({
|
|
69134
69134
|
type: "ZarrLayer",
|
|
69135
|
-
loadClass: () => import("./zarr-
|
|
69135
|
+
loadClass: () => import("./zarr-0zMHITia.js").then((t) => t.OmZarrLayer),
|
|
69136
69136
|
props: [
|
|
69137
69137
|
{ attr: "src", kind: "scalar", deckProp: "src", type: "string", required: !0 },
|
|
69138
69138
|
{ attr: "variable", kind: "scalar", deckProp: "variable", type: "string" },
|
|
@@ -69164,7 +69164,7 @@ cn({
|
|
|
69164
69164
|
});
|
|
69165
69165
|
cn({
|
|
69166
69166
|
type: "HillshadeLayer",
|
|
69167
|
-
loadClass: () => import("./hillshade-
|
|
69167
|
+
loadClass: () => import("./hillshade-CN9mKpQa.js").then((t) => t.OmHillshadeLayer),
|
|
69168
69168
|
warpsInPlane: !0,
|
|
69169
69169
|
props: [
|
|
69170
69170
|
{ attr: "src", kind: "scalar", deckProp: "src", type: "string", required: !0 },
|
|
@@ -69194,7 +69194,7 @@ cn({
|
|
|
69194
69194
|
});
|
|
69195
69195
|
cn({
|
|
69196
69196
|
type: "TextOnPathLayer",
|
|
69197
|
-
loadClass: () => import("./text-on-path-
|
|
69197
|
+
loadClass: () => import("./text-on-path-C3pSnfna.js").then((t) => t.OmTextOnPathLayer),
|
|
69198
69198
|
props: [
|
|
69199
69199
|
{ attr: "get-path", kind: "accessor", deckProp: "getPath", type: "string" },
|
|
69200
69200
|
{ attr: "get-text", kind: "accessor", deckProp: "getText", type: "string" },
|
|
@@ -82193,7 +82193,7 @@ class S8 {
|
|
|
82193
82193
|
`[onlymapjs] basemap="${e}" (Mapbox GL) is not implemented yet in this version — falling back to standalone (no basemap). Use a maplibre-* basemap instead (no token required).`
|
|
82194
82194
|
);
|
|
82195
82195
|
else {
|
|
82196
|
-
this.mode = "basemap", this.basemapAttr = e, import("./basemap-
|
|
82196
|
+
this.mode = "basemap", this.basemapAttr = e, import("./basemap-tBj0LERd.js").then(({ MapLibreBasemapAdapter: s }) => {
|
|
82197
82197
|
this.destroyed || i !== this.rendererGeneration || (this.basemap = new s(
|
|
82198
82198
|
this.parent,
|
|
82199
82199
|
// this.basemapAttr, not the captured param: a style switch that
|
|
@@ -82493,7 +82493,7 @@ class S8 {
|
|
|
82493
82493
|
this.postProcess = null, this.applyEffects();
|
|
82494
82494
|
return;
|
|
82495
82495
|
}
|
|
82496
|
-
import("./index-
|
|
82496
|
+
import("./index-vkIEL1Jf.js").then(({ buildPostProcessEffects: i }) => {
|
|
82497
82497
|
this.destroyed || this.effectsIR !== e || (this.postProcess = i(e, this.pixelsPerMm()), this.applyEffects());
|
|
82498
82498
|
});
|
|
82499
82499
|
}
|
|
@@ -82811,7 +82811,7 @@ class S8 {
|
|
|
82811
82811
|
* than the export failing.
|
|
82812
82812
|
*/
|
|
82813
82813
|
async captureBand(e, i) {
|
|
82814
|
-
const { bandScaleFor: n } = await import("./index-
|
|
82814
|
+
const { bandScaleFor: n } = await import("./index-CEmaQNfr.js"), r = n(i);
|
|
82815
82815
|
return this.withCapturePixelRatio(r, async () => {
|
|
82816
82816
|
this.bandIsolation = e ? new Set(e) : null;
|
|
82817
82817
|
try {
|
|
@@ -82833,7 +82833,7 @@ class S8 {
|
|
|
82833
82833
|
async resolvedPostProcessPass() {
|
|
82834
82834
|
const e = this.buildEffects();
|
|
82835
82835
|
if (e.length === 0) return { present: !1 };
|
|
82836
|
-
const { PostProcessEffect: i } = await import("./index-
|
|
82836
|
+
const { PostProcessEffect: i } = await import("./index-UaAM3SbL.js");
|
|
82837
82837
|
for (const n of e)
|
|
82838
82838
|
if (n instanceof i) {
|
|
82839
82839
|
const r = n;
|
|
@@ -83191,7 +83191,7 @@ class S8 {
|
|
|
83191
83191
|
const { width: n, height: r } = i, s = (v) => {
|
|
83192
83192
|
const x = i.project([v[0], v[1]]);
|
|
83193
83193
|
return [x[0], x[1]];
|
|
83194
|
-
}, o = i.unproject([n / 2, r / 2]), a = i.unproject([n / 2 + 1, r / 2]), l = Math.max(da([o[0], o[1]], [a[0], a[1]]), 1e-9), u = await this.resolvedPostProcessPass(), { serializeToSvg: h } = await import("./index-
|
|
83194
|
+
}, o = i.unproject([n / 2, r / 2]), a = i.unproject([n / 2 + 1, r / 2]), l = Math.max(da([o[0], o[1]], [a[0], a[1]]), 1e-9), u = await this.resolvedPostProcessPass(), { serializeToSvg: h } = await import("./index-CEmaQNfr.js"), m = await h(this.lastIRs, {
|
|
83195
83195
|
width: n,
|
|
83196
83196
|
height: r,
|
|
83197
83197
|
project: s,
|
|
@@ -83933,7 +83933,7 @@ function L8(t, e, i, n, r, s) {
|
|
|
83933
83933
|
if (u) return u;
|
|
83934
83934
|
const h = `${r}|${l}#${o.length}`;
|
|
83935
83935
|
if (!Ly.has(h)) {
|
|
83936
|
-
const m = import("./index-
|
|
83936
|
+
const m = import("./index-BeJbVyAr.js").then(async ({ runTransforms: v }) => {
|
|
83937
83937
|
gP(a, l, await v(o, e, i, n, r));
|
|
83938
83938
|
}).catch((v) => {
|
|
83939
83939
|
console.error(`[onlymapjs] ${r} failed to load the geometry transforms:`, v), gP(a, l, t);
|
|
@@ -84161,7 +84161,7 @@ function D8({ layerIRs: t, core: e, mapEl: i, selection: n, history: r, featureT
|
|
|
84161
84161
|
}
|
|
84162
84162
|
};
|
|
84163
84163
|
}
|
|
84164
|
-
const U8 = "0.10.
|
|
84164
|
+
const U8 = "0.10.2", LMe = "https://om-api.nika.eco/v1/t", to = { endpoint: LMe };
|
|
84165
84165
|
function NMe(t) {
|
|
84166
84166
|
for (const e of Object.keys(t))
|
|
84167
84167
|
to[e] = t[e];
|
|
@@ -87006,7 +87006,7 @@ class XRe extends _o {
|
|
|
87006
87006
|
if (this.selection = n, this.lastPickType = i, this.notifyWidgets((s) => s.includes("selection")), this.scheduleOverlayFlush(), n) {
|
|
87007
87007
|
const s = () => this.dispatchToBehaviors(n.type, this.pickPayload(n), n.layerId);
|
|
87008
87008
|
n.type === "hover" ? Fr(this, s) : s();
|
|
87009
|
-
} else r
|
|
87009
|
+
} else r && Fr(this, () => this.emit("hide-tooltip", {}));
|
|
87010
87010
|
}
|
|
87011
87011
|
/**
|
|
87012
87012
|
* The single drag-pick path — deck.gl's continuous drag picks (via
|
|
@@ -87341,7 +87341,7 @@ class XRe extends _o {
|
|
|
87341
87341
|
this.core?.setEffects([]);
|
|
87342
87342
|
return;
|
|
87343
87343
|
}
|
|
87344
|
-
import("./index-
|
|
87344
|
+
import("./index-vkIEL1Jf.js").then(({ parseEffectEls: i }) => {
|
|
87345
87345
|
!this.core || !this.isConnected || this.core.setEffects(i(this));
|
|
87346
87346
|
});
|
|
87347
87347
|
}
|
|
@@ -89152,7 +89152,7 @@ async function vPe(t) {
|
|
|
89152
89152
|
e(t);
|
|
89153
89153
|
}
|
|
89154
89154
|
async function NIe() {
|
|
89155
|
-
return import("./raster-
|
|
89155
|
+
return import("./raster-cox_VW7j.js").then((t) => t.r);
|
|
89156
89156
|
}
|
|
89157
89157
|
const _Pe = {
|
|
89158
89158
|
registerLayer: cn,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { aM as R, aN as S, aO as E, aP as N, aQ as h, aR as w, aS as W, aT as O, aU as x, aV as I, aW as B, aX as _, aY as P, aZ as k, a_ as $, a$ as z, b0 as C, b1 as F, b2 as v, b3 as M, b4 as p, b5 as U } from "./index-
|
|
2
|
-
import { b6 as $e, b7 as ze, b8 as Ce, b9 as ve, ba as Me, bb as Ue, bc as je, bd as De, be as qe, bf as Je, bg as Ve, bh as Ge, bi as He, bj as Qe, bk as Xe, bl as Ye, bm as Ze, bn as Ke, bo as et, bp as tt, bq as nt, br as rt, bs as at, bt as st, bu as ot } from "./index-
|
|
1
|
+
import { aM as R, aN as S, aO as E, aP as N, aQ as h, aR as w, aS as W, aT as O, aU as x, aV as I, aW as B, aX as _, aY as P, aZ as k, a_ as $, a$ as z, b0 as C, b1 as F, b2 as v, b3 as M, b4 as p, b5 as U } from "./index-6t601Plg.js";
|
|
2
|
+
import { b6 as $e, b7 as ze, b8 as Ce, b9 as ve, ba as Me, bb as Ue, bc as je, bd as De, be as qe, bf as Je, bg as Ve, bh as Ge, bi as He, bj as Qe, bk as Xe, bl as Ye, bm as Ze, bn as Ke, bo as et, bp as tt, bq as nt, br as rt, bs as at, bt as st, bu as ot } from "./index-6t601Plg.js";
|
|
3
3
|
import { g as j, i as D } from "./table-accessors-CYWTzpQI.js";
|
|
4
4
|
async function q(t, e, n = {}, r = {}) {
|
|
5
5
|
const a = R(t), s = S.getWorkerFarm(n), { source: o } = n, c = { name: a, source: o };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { aB as tt, aC as et, aD as j, at as nt, au as ot, aE as B, aF as rt, aG as U, aq as st, ar as _, aH as C, aI as it } from "./index-
|
|
1
|
+
import { aB as tt, aC as et, aD as j, at as nt, au as ot, aE as B, aF as rt, aG as U, aq as st, ar as _, aH as C, aI as it } from "./index-6t601Plg.js";
|
|
2
2
|
const J = Math.PI / 180, T = tt * J;
|
|
3
3
|
function Q(t, r) {
|
|
4
4
|
const n = Math.max(Math.cos(r * J), 1e-6);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { bx as Be, by as le, bz as ce, bA as De, bB as Oe, bC as ke } from "./index-
|
|
1
|
+
import { bx as Be, by as le, bz as ce, bA as De, bB as Oe, bC as ke } from "./index-6t601Plg.js";
|
|
2
2
|
import { y as ve, a as he, z as G, R as J, A as ue, C as Fe, F as xe, n as je, S as Ie, E as Ne } from "./recordbatch-Bpc0uxFn.js";
|
|
3
3
|
import { g as V, a as fe, b as Le, c as Ue, d as Me, e as qe, m as Ve } from "./table-accessors-CYWTzpQI.js";
|
|
4
4
|
import { c as $e } from "./convert-arrow-schema-DrAihRf9.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { bB as Bt, bM as Xt, bN as Yt, bO as Us } from "./index-
|
|
1
|
+
import { bB as Bt, bM as Xt, bN as Yt, bO as Us } from "./index-6t601Plg.js";
|
|
2
2
|
import { w as gs, t as Hs, f as Ws, m as Qs } from "./mgrs-BY9bIvp4.js";
|
|
3
3
|
import { c as Xs } from "./convert-arrow-schema-DrAihRf9.js";
|
|
4
4
|
import { y as Ys, A as bt, a as Ks, z as Vs, R as Zs } from "./recordbatch-Bpc0uxFn.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as t, a as o, b as i, C as l, c as p, d as n, D as _, e as c, f as g, F as h, L as m, g as L, h as y, i as f, j as w, M as S, k as V, O as b, l as C, m as E, P as I, T as P, n as T, o as M, U as d, V as A, p as O, q as u, W as N, r as k, s as x, t as D, u as G, G as R, v as j, w as W, x as q, y as v, z, B as F, E as U, H as Y, I as B, J as H, K as J, N as K, Q, R as X, S as Z, X as $, Y as aa, Z as sa, _ as ea, $ as ra, a0 as ta, a1 as oa, a2 as ia } from "./index-
|
|
2
|
-
import { P as s } from "./post-process-effect-
|
|
3
|
-
import { G as pa, a as na } from "./globe-view-
|
|
1
|
+
import { A as t, a as o, b as i, C as l, c as p, d as n, D as _, e as c, f as g, F as h, L as m, g as L, h as y, i as f, j as w, M as S, k as V, O as b, l as C, m as E, P as I, T as P, n as T, o as M, U as d, V as A, p as O, q as u, W as N, r as k, s as x, t as D, u as G, G as R, v as j, w as W, x as q, y as v, z, B as F, E as U, H as Y, I as B, J as H, K as J, N as K, Q, R as X, S as Z, X as $, Y as aa, Z as sa, _ as ea, $ as ra, a0 as ta, a1 as oa, a2 as ia } from "./index-6t601Plg.js";
|
|
2
|
+
import { P as s } from "./post-process-effect-qnYbdo-D.js";
|
|
3
|
+
import { G as pa, a as na } from "./globe-view-3AKRpYIV.js";
|
|
4
4
|
export {
|
|
5
5
|
t as AmbientLight,
|
|
6
6
|
o as Attribute,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ac as j, ad as S, ae as A, af as M, ag as L } from "./index-
|
|
2
|
-
import { ah as H, ai as V, aj as X, ak as K } from "./index-
|
|
3
|
-
import { P as h } from "./post-process-effect-
|
|
1
|
+
import { ac as j, ad as S, ae as A, af as M, ag as L } from "./index-6t601Plg.js";
|
|
2
|
+
import { ah as H, ai as V, aj as X, ak as K } from "./index-6t601Plg.js";
|
|
3
|
+
import { P as h } from "./post-process-effect-qnYbdo-D.js";
|
|
4
4
|
const O = `
|
|
5
5
|
float omfx_lum(vec3 c) { return dot(c, vec3(0.299, 0.587, 0.114)); }
|
|
6
6
|
float omfx_hash(vec2 p) { return fract(sin(dot(p, vec2(12.9898, 78.233))) * 43758.5453); }
|
|
@@ -96796,7 +96796,7 @@ function hyA({ layerIRs: e, core: A, mapEl: t, selection: i, history: r, feature
|
|
|
96796
96796
|
}
|
|
96797
96797
|
};
|
|
96798
96798
|
}
|
|
96799
|
-
const ByA = "0.10.
|
|
96799
|
+
const ByA = "0.10.2", M0e = "https://om-api.nika.eco/v1/t", Vu = { endpoint: M0e };
|
|
96800
96800
|
function v0e(e) {
|
|
96801
96801
|
for (const A of Object.keys(e))
|
|
96802
96802
|
Vu[A] = e[A];
|
|
@@ -99641,7 +99641,7 @@ class Ope extends LE {
|
|
|
99641
99641
|
if (this.selection = i, this.lastPickType = t, this.notifyWidgets((s) => s.includes("selection")), this.scheduleOverlayFlush(), i) {
|
|
99642
99642
|
const s = () => this.dispatchToBehaviors(i.type, this.pickPayload(i), i.layerId);
|
|
99643
99643
|
i.type === "hover" ? ph(this, s) : s();
|
|
99644
|
-
} else r
|
|
99644
|
+
} else r && ph(this, () => this.emit("hide-tooltip", {}));
|
|
99645
99645
|
}
|
|
99646
99646
|
/**
|
|
99647
99647
|
* The single drag-pick path — deck.gl's continuous drag picks (via
|
package/dist/onlymapjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { bP as e, bQ as r, bR as t, as as c, C as o, bS as i, c as n, bT as d, bU as l, bV as S, bW as E, ah as g, bX as L, bY as T, bZ as _, b_ as A, b$ as p, c0 as m, c1 as I, c2 as D, L as M, g as u, c3 as b, c4 as y, c5 as f, c6 as O, c7 as P, bE as R, c8 as C, ap as N, c9 as F, aB as h, ca as B, W as v, cb as x, aA as G, cc as U, cd as W, ce as w, cf as Y, cg as k, ch as X, ci as H, cj as K, ck as V, cl as j, cm as z, cn as J, co as q, cp as Q, cq as Z, cr as $, ak as aa, cs as sa, ct as ea, cu as ra, cv as ta, cw as ca, cx as oa, cy as ia, cz as na, cA as da, cB as la, cC as Sa, cD as Ea, aq as ga, cE as La, cF as Ta, ae as _a, cG as Aa, cH as pa, cI as ma, cJ as Ia, cK as Da, cL as Ma, cM as ua, cN as ba, cO as ya, cP as fa, cQ as Oa, cR as Pa, cS as Ra, cT as Ca, cU as Na, cV as Fa, cW as ha, cX as Ba, cY as va, cZ as xa, c_ as Ga, c$ as Ua, d0 as Wa, d1 as wa, d2 as Ya, d3 as ka, d4 as Xa, d5 as Ha, d6 as Ka, aC as Va, d7 as ja, d8 as za, d9 as Ja, da as qa, db as Qa, dc as Za, dd as $a, de as as, df as ss, dg as es, dh as rs, di as ts, dj as cs, dk as os, dl as is, dm as ns, dn as ds } from "./index-
|
|
1
|
+
import { bP as e, bQ as r, bR as t, as as c, C as o, bS as i, c as n, bT as d, bU as l, bV as S, bW as E, ah as g, bX as L, bY as T, bZ as _, b_ as A, b$ as p, c0 as m, c1 as I, c2 as D, L as M, g as u, c3 as b, c4 as y, c5 as f, c6 as O, c7 as P, bE as R, c8 as C, ap as N, c9 as F, aB as h, ca as B, W as v, cb as x, aA as G, cc as U, cd as W, ce as w, cf as Y, cg as k, ch as X, ci as H, cj as K, ck as V, cl as j, cm as z, cn as J, co as q, cp as Q, cq as Z, cr as $, ak as aa, cs as sa, ct as ea, cu as ra, cv as ta, cw as ca, cx as oa, cy as ia, cz as na, cA as da, cB as la, cC as Sa, cD as Ea, aq as ga, cE as La, cF as Ta, ae as _a, cG as Aa, cH as pa, cI as ma, cJ as Ia, cK as Da, cL as Ma, cM as ua, cN as ba, cO as ya, cP as fa, cQ as Oa, cR as Pa, cS as Ra, cT as Ca, cU as Na, cV as Fa, cW as ha, cX as Ba, cY as va, cZ as xa, c_ as Ga, c$ as Ua, d0 as Wa, d1 as wa, d2 as Ya, d3 as ka, d4 as Xa, d5 as Ha, d6 as Ka, aC as Va, d7 as ja, d8 as za, d9 as Ja, da as qa, db as Qa, dc as Za, dd as $a, de as as, df as ss, dg as es, dh as rs, di as ts, dj as cs, dk as os, dl as is, dm as ns, dn as ds } from "./index-6t601Plg.js";
|
|
2
2
|
export {
|
|
3
3
|
e as ALL_POSITION_VALUES,
|
|
4
4
|
r as AUDIT_EXEMPTIONS,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { c as se, t as $e, i as Ct, a as ke, s as Lt, C as It, b as Gt, F as vt, A as Et, d as Ft, R as ye, e as At, p as jt, m as Rt, f as Mt, g as We, h as Ut, r as le, j as Ot, k as xt, l as Kt, n as Dt } from "./raster-pipeline-
|
|
1
|
+
import { c as se, t as $e, i as Ct, a as ke, s as Lt, C as It, b as Gt, F as vt, A as Et, d as Ft, R as ye, e as At, p as jt, m as Rt, f as Mt, g as We, h as Ut, r as le, j as Ot, k as xt, l as Kt, n as Dt } from "./raster-pipeline-CB5CLYy-.js";
|
|
2
2
|
import { N as Nt, c as zt } from "./hillshade-apron-Bem3DWyJ.js";
|
|
3
3
|
import { r as Bt } from "./hillshade-shader-DI2uLSNU.js";
|
|
4
|
-
import { bK as _t, bL as $t } from "./index-
|
|
4
|
+
import { bK as _t, bL as $t } from "./index-6t601Plg.js";
|
|
5
5
|
import we from "./index-CW1n5LdO.js";
|
|
6
6
|
function kt(e, t) {
|
|
7
7
|
const n = e.length / 3, r = new Uint8ClampedArray(n * 4), o = 0, i = n, a = n * 2;
|
|
@@ -1072,7 +1072,7 @@ j.set(f.Zstd, () => import("./zstd-jXobGRcq.js").then((e) => e.decode));
|
|
|
1072
1072
|
j.set(f.Jpeg, () => Promise.resolve(ce));
|
|
1073
1073
|
j.set(f.Jpeg6, () => Promise.resolve(ce));
|
|
1074
1074
|
j.set(f.Webp, () => Promise.resolve(ce));
|
|
1075
|
-
j.set(f.Lerc, () => import("./lerc-
|
|
1075
|
+
j.set(f.Lerc, () => import("./lerc-D9aqC4Y4.js").then((e) => e.decode));
|
|
1076
1076
|
async function ue(e, t, n) {
|
|
1077
1077
|
const r = j.get(t);
|
|
1078
1078
|
if (!r)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { w as he } from "./mgrs-BY9bIvp4.js";
|
|
2
|
-
import { a3 as de, bD as fe, bE as re, c as oe, bF as me, G as pe, bG as ge, aK as Z, bH as ve, N as be, bI as xe, bJ as Pe, al as Te, ap as ie } from "./index-
|
|
2
|
+
import { a3 as de, bD as fe, bE as re, c as oe, bF as me, G as pe, bG as ge, aK as Z, bH as ve, N as be, bI as xe, bJ as Pe, al as Te, ap as ie } from "./index-6t601Plg.js";
|
|
3
3
|
import { p as ye, a as Le, h as we } from "./hillshade-shader-DI2uLSNU.js";
|
|
4
4
|
function Oe(n, e, t) {
|
|
5
5
|
const { projectedCorners: s } = e, { topLeft: r, topRight: o, bottomRight: i, bottomLeft: a } = s, c = t(r[0], r[1]), u = t(o[0], o[1]), l = t(i[0], i[1]), d = t(a[0], a[1]), f = [
|
package/dist/version.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as ur, d as lr, R as zt, e as fr, m as dr, p as St, f as hr, k as pr, l as mr } from "./raster-pipeline-
|
|
2
|
-
import { c as gr } from "./index-
|
|
1
|
+
import { A as ur, d as lr, R as zt, e as fr, m as dr, p as St, f as hr, k as pr, l as mr } from "./raster-pipeline-CB5CLYy-.js";
|
|
2
|
+
import { c as gr } from "./index-6t601Plg.js";
|
|
3
3
|
import $t from "./index-CW1n5LdO.js";
|
|
4
4
|
var Et;
|
|
5
5
|
function h(e, t, n) {
|
package/docs/cartograph.md
CHANGED
|
@@ -22,8 +22,8 @@ to PDF at true page size via CSS `@page` and exports PNG/JPEG at print DPI throu
|
|
|
22
22
|
<html>
|
|
23
23
|
<head>
|
|
24
24
|
<meta charset="utf-8">
|
|
25
|
-
<script type="module" src="https://unpkg.com/@nika-js/onlymap@0.10.
|
|
26
|
-
<link rel="stylesheet" href="https://unpkg.com/@nika-js/onlymap@0.10.
|
|
25
|
+
<script type="module" src="https://unpkg.com/@nika-js/onlymap@0.10.2/dist/cartograph.standalone.js"></script>
|
|
26
|
+
<link rel="stylesheet" href="https://unpkg.com/@nika-js/onlymap@0.10.2/dist/cartograph.css">
|
|
27
27
|
</head>
|
|
28
28
|
<body>
|
|
29
29
|
<om-cartograph cartograph-id="cg-lot-12" format="cartograph/2" size="A4" theme="minimal"
|
package/llms.txt
CHANGED
|
@@ -42,7 +42,7 @@ Programmatic/native bridge rule: `MapController.setLayers()` accepts normal func
|
|
|
42
42
|
- `<om-widget type="legend|layer-switcher|basemap-switcher|lighting|clip-box|zoom-controls|undo-redo|scale-bar|attribution|filter|vega-lite|dynamic-chart|measure" position="bottom-end">` — static UI panels. `position` takes one of 8 managed slots (logical, RTL-aware: `top-start|top-center|top-end|center-start|center-end|bottom-start|bottom-center|bottom-end`; legacy corners `top-left` etc. alias) — same-slot widgets stack with flush edges and a shared gap (never overlap); provider attribution joins `bottom-end` and the license badge joins `bottom-start` as in-flow members, so required chrome never covers a widget; `order="1"` orders within a slot; adjacent compact button widgets (zoom-controls, undo-redo, widgets-toggle) auto-merge into ONE control group with dividers (`cluster="false"` opts a widget out); `position="manual"` renders a plain block you place with your own CSS (even outside the map). At narrow map widths managed widgets auto-fold into one accessible drawer per map side — at ≤640px when some row (top/center/bottom) has widgets on more than one of its slots, and only at ≤416px when every occupied row is one-sided (a lone legend at center-start keeps the row to itself and survives narrower maps); `fold="never"` exempts an essential widget, `widgets-fold="off"` opts the map out, `--om-widget-fold-breakpoint` changes the threshold. Layout tokens on `<om-map>`: `widget-style="gap:10 opacity:0.9 inset:16"` (keys inset/gap/inset-x/-y/gap-x/-y/opacity/radius/size, px except opacity) or the `--om-widget-inset-x/-y/-gap-x/-gap-y/-opacity/-radius/-fold-breakpoint` custom properties. Built-ins are themeable from page CSS via custom properties (they inherit through the shadow root): `om-map { --om-widget-bg: #111827; --om-widget-fg: #f9fafb; }` — full set: `--om-widget-bg/-fg/-muted/-border/-hover-bg/-accent`; scope to a single widget with an `om-widget[type=legend]` selector instead. `measure` is a geodesic ruler: `modes="distance area volume"` (default `distance area`), `units="metric|imperial|nautical"` — click the map to place points, live per-segment + total labels render on the map, and it dispatches an `om-measure` event; it reuses the draw capture stack (measure/draw mutually exclusive) and its geometry is ephemeral (never saved, not an undo step) — see the dedicated `measure`/`volume` bullet above for the full event shape and the `profile`/`density`/`swell`/`shrink`/`deadband` volume-mode attributes. `scale-bar` now takes the same `units`. `dynamic-chart` is the same Vega-Lite rendering as `vega-lite` but fed by a live DOM event instead of a layer: `on="<event-name>"` (required) + `series-field="<name>"` (default `series`) reads `event.detail[seriesField]` as `data.values` and re-embeds on every event where it's a present array, at a fixed `width`; omitting the field on a later event freezes the chart with no separate pause API — built for a feature (a drawn line's elevation profile) that computes its own series live and has no layer to bind to. No `type` + HTML + `<script type="om/widget">` = custom widget with `ctx` (`ctx.layers`, `ctx.data(id)`, `ctx.dataInViewport(id)`, `ctx.stats(id, field)`, `ctx.viewport`, `ctx.selection`, `ctx.emit(action, payload)`), `this.watch = ['data:<layerId>', 'viewport', 'selection', 'layers', 'history', 'basemap']` (`layers` also fires on visibility/filter changes; `basemap` on basemap switches; `history` on undo/redo availability), `this.$(sel)`, `vegaEmbed`/`d3` as globals.
|
|
43
43
|
- Custom-widget event emission (the #1 custom-widget bug — a widget that renders but does nothing): a widget DRIVES the map ONLY by EMITTING a registered action; it never mutates the map or dispatches its own `CustomEvent`. Two ways: (1) declarative `data-emit="<action>"` + `data-*` payload keys on an element (fires on click, or change for form controls whose `.value` is auto-added; `data-*` values are STRINGS — use `ctx.emit` for numeric/array payloads like a slider's range); (2) `ctx.emit(action, payload)` for typed payloads, wired INSIDE `render` (so `ctx` is in scope) by assigning `.oninput`/`.onclick` — e.g. a day slider: `this.render = (ctx) => { this.$("#day").oninput = e => ctx.emit("filter-layer", { layer: "quakes", field: "day", range: [+e.target.value, +e.target.value] }); }`. Actions + payloads: `filter-layer {layer, field?, range:[min,max]}`, `toggle-layer {layer, visible?}`, `fly-to {center:[lng,lat], zoom?, duration?}`, `zoom-to-feature {layer, featureId}`, `set-basemap {basemap}`, `highlight-feature {layer, featureId}`, `show-overlay`/`hide-overlay {target}`, `story-play`/`story-pause`/`story-seek {story, t?}`, `undo`/`redo`, `zoom-in`/`zoom-out`, `set-widgets-visible {visible}`; register more with `OmMap.registerAction(name, handler)`. NEVER inline `onclick=`/`oninput=` — `ctx` isn't a global and CSP blocks them, so it silently fires nothing (validation errors on it). For a plain value/time slider prefer the built-in `<om-widget type="filter" layer=… field=…>` — it wires `filter-layer` for you; hand-author only for bespoke UI.
|
|
44
44
|
- `<om-overlay id="..." anchor-from="selection">` — rich geo-anchored HTML (≤ ~20 per map). Anchors: `anchor="[lng, lat]"` (static), `anchor-from="selection"` (follows picks), or `anchor-layer="regions" anchor-feature-id="mission"` (anchored to a feature's own geometry — bbox center — no coordinates in markup; `{{field}}` interpolates that feature's attributes). Selection-anchored overlays scope with `layer="…"` (one layer's picks only) and `selection-type="click"|"hover"` (one pick type only) — a click-opened popup should ALWAYS set `selection-type="click"`, else merely hovering any pickable feature drags it there and re-templates it against the hovered object; with it, hover is inert and a click on empty space still dismisses. `{{field}}` interpolates the picked feature HTML-escaped; `{{{field}}}` is raw (avoid); `{{z}}` is the pick's ELEVATION in meters, present only when a `pickable="3d"` layer ran deck's depth pass for that pick (absent — not `0` — otherwise, so "no elevation" is distinguishable from sea level). `clip-to-map` (opt-in) hides the overlay when its own BOX would spill past the map viewport rather than only when its anchor leaves — for small transient tips that track the cursor; an overhanging absolutely-positioned box inflates the page's scrollable overflow and the scrollbar -> map resize -> reprojection loop shows as view jitter. For labels on many features use `PopupLayer`, not overlays. STYLING: overlay content renders inside a shadow root (style isolation, like widgets) — page stylesheets/classes do NOT reach it; use inline `style="…"` on the content or a `<style>` element INSIDE the overlay (children move into the shadow root wholesale, so it applies there); inheritable props + CSS custom properties pierce.
|
|
45
|
-
- `<om-behavior on="click|hover|drag|load|data-loaded" layer="..." action="...">` — declarative interaction. Built-in actions: `show-overlay`, `hide-overlay`, `show-tooltip`, `hide-tooltip`, `toggle-layer`, `set-pickable` (`{layer, pickable: true|false|"3d"}` — runtime picking/popup toggle, story-capturable; the per-layer popup on/off switch a viewer-facing export needs), `filter-layer`, `highlight-feature`, `zoom-to-feature`, `set-basemap`, `undo`, `redo`; scene/tool actions `set-lighting`, `set-effect` (`{preset}` — swap a post-process finish; see the effects bullet), `set-terrain`, `set-clip-box` (`{min,max,invert?,highlight?}` / `{clear:true}`), `clip-box-edit` (`{editing}`), `export-region-3d` (`{target?, format?:"glb"|"b3dm"}` — what the draw widget's `export-3d` button emits), the draw actions `draw-mode` (`{target?:"sketch", mode:"point"|"line"|"polygon"|null}` — null exits drawing), `draw-commit`, `draw-cancel`, `draw-delete` (removes the last shape), `draw-clear`, `draw-config` (`{target?, autosave?, fillColor?, lineColor?}`) and `draw-save` (`{target?, format?:"download"|"file-system"|"both"}`) — every one of these drives the same store a `data="draw:<target>"` layer reads, so a custom toolbar can replace `<om-widget type="draw">` entirely; and the measure actions `measure-mode` (`{mode:"distance"|"area"|"volume"|null}`), `measure-units`, `measure-clear`, `measure-config` (`{profile?, baseSurface?, density?, swell?, shrink?, deadband?}`), `measure-flat-target-plane` (`{flat}`). One payload contract everywhere: `{ layer, target, feature, featureId, coordinate }`.
|
|
45
|
+
- `<om-behavior on="click|hover|drag|load|data-loaded" layer="..." action="...">` — declarative interaction. Built-in actions: `show-overlay`, `hide-overlay`, `show-tooltip`, `hide-tooltip`, `toggle-layer`, `set-pickable` (`{layer, pickable: true|false|"3d"}` — runtime picking/popup toggle, story-capturable; the per-layer popup on/off switch a viewer-facing export needs), `filter-layer`, `highlight-feature`, `zoom-to-feature`, `set-basemap`, `undo`, `redo`; scene/tool actions `set-lighting`, `set-effect` (`{preset}` — swap a post-process finish; see the effects bullet), `set-terrain`, `set-clip-box` (`{min,max,invert?,highlight?}` / `{clear:true}`), `clip-box-edit` (`{editing}`), `export-region-3d` (`{target?, format?:"glb"|"b3dm"}` — what the draw widget's `export-3d` button emits), the draw actions `draw-mode` (`{target?:"sketch", mode:"point"|"line"|"polygon"|null}` — null exits drawing), `draw-commit`, `draw-cancel`, `draw-delete` (removes the last shape), `draw-clear`, `draw-config` (`{target?, autosave?, fillColor?, lineColor?}`) and `draw-save` (`{target?, format?:"download"|"file-system"|"both"}`) — every one of these drives the same store a `data="draw:<target>"` layer reads, so a custom toolbar can replace `<om-widget type="draw">` entirely; and the measure actions `measure-mode` (`{mode:"distance"|"area"|"volume"|null}`), `measure-units`, `measure-clear`, `measure-config` (`{profile?, baseSurface?, density?, swell?, shrink?, deadband?}`), `measure-flat-target-plane` (`{flat}`). One payload contract everywhere: `{ layer, target, feature, featureId, coordinate }`. A `show-tooltip` popup DISMISSES ITSELF when the selection clears — the pointer leaving the feature for a hover, or a click on empty map for a click — so you never wire `hide-tooltip` by hand for that. A tooltip whose template contains an interactive `[data-emit]` element takes pointer events and so does NOT close when clicked, which is what lets it carry its own close button.
|
|
46
46
|
- Undo/redo is built in: user-facing manifest changes (layer toggles, filter changes, basemap switches, element add/remove, drawn sketches) are recorded automatically — the manifest is the state. `<om-widget type="undo-redo">` renders the buttons; Cmd/Ctrl-Z, Shift-Cmd/Ctrl-Z, and Ctrl-Y work on any map (text inputs keep their native undo). Camera moves, hover effects, and story playback are deliberately NOT undo steps. Widget scripts: `ctx.history.canUndo/canRedo` with watch token `history`; `ctx.emit("undo")`/`ctx.emit("redo")`.
|
|
47
47
|
- `<om-fallback>` — static no-JS fallback, direct child of `<om-map>` (one per map, no attributes, plain HTML content — links allowed). Shown ONLY where scripts never run (chat-app/email file previews — iOS QuickLook renders HTML attachments with JS off — file managers, sandboxed webviews); hidden automatically once the map boots. GOOD PRACTICE: include one on every complete page, especially pages that may be shared as a file. To PRODUCE a shareable single file, `npx @nika-js/onlymap export map.html` embeds every relative data/src/scenegraph URL as a data: URL (format detection preserved — the original extension rides a #name.ext fragment), pins relative library refs to the CDN, adds a generic om-fallback when missing, and warns when embedded data is heavy (>1 MB per file / >5 MB total) or when a source cannot be embedded (shapefile sidecars, COG Range streams, Zarr directories, {z}/{x}/{y} templates — those need hosting) ("This interactive map requires JavaScript — open this file in a web browser", plus a hosted-version link when one exists). Without one, the stylesheet shows a generic text-only banner. The gate is pure CSS (`om-map:not(:defined)` in onlymapjs.css) refined by the `scripting` media feature on 2023+ engines: with scripting DISABLED the fallback shows instantly; with scripting ENABLED it never flashes during a slow load and only surfaces after a ~4s grace with load-failure wording (blocked/unreachable bundle). The CSS must load without JS — a real `<link rel="stylesheet">` or inlined `<style>` on no-build pages; a bundler-emitted stylesheet is fine in npm projects.
|
|
48
48
|
- PRINT LAYOUTS (`@nika-js/onlymap/cartograph`, separate lazy entry — the core bundle does not grow): `<om-cartograph size="A3" orientation="landscape">` is a standalone page measured in MILLIMETRES carrying `<om-frame>`s (live `<om-map>` with the frame's own camera, or `mode="static"` georeferenced rasters placed by `crs`+`corners`) plus cartographic furniture: `<om-legend for="...">` (rows DERIVED from the live map's own symbology incl. classified breaks; author literal `<om-legend-row>`s with `derived="false"`), `<om-scalebar>` (metric|imperial|nautical), `<om-north>`, `<om-graticule>` (4326/3857/UTM), `<om-shape>`, `<om-image>`, `<om-text>` with `{{title}}`/`{{date}}`/`{{frame.<id>.scale}}`/`{{atlas.<field>}}` tokens. `overview-of="<frame-id>"` draws a locator inset's footprint. A live frame georeferences whatever its map shows: zoomed out past the whole world, the map wraps inside the frame like any web map (the graticule labels each copy, the scale bar measures its own row) — the frame never limits or changes the camera, and once the map inside it settles after a pan/rotate/tilt the frame's georeference follows the map's own view, so north arrow, scale bar, graticule, locator and `{{frame.<id>.scale}}` describe what is on screen (and a freeze captures that view). `max-pitch` and `min-zoom` on `<om-map>` exist as author-set controls for kiosk-style maps and are never applied automatically. `<om-atlas for="<frame-id>" layer="<layer-id>">` renders one page per feature (sequentially through ONE live map — WebGL context limits make cloned pages fail at scale) and exports a ZIP. Print via `page.print()` or `?print=1` (true page size via @page; live frames swap to print-DPI captures first), PNG via `renderCartograph(page, {dpi})` or `?export=png&dpi=300`. `bleed`/`crop-marks`/`safe-zone` (screen-only guide)/`flatten` are press-shop attributes; `cvd="deuteranopia|protanopia|tritanopia|achromatopsia"` simulates colour-vision deficiencies page-wide and `lintLegendColours()` flags collapsing palettes. Free plan: a small foot credit is injected — suppressed by any authored `om-text` crediting OnlyMap, or by a paid key on a live frame's map. Deep reference: docs/cartograph.md.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nika-js/onlymap",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.2",
|
|
4
4
|
"description": "Declarative deck.gl maps for HTML and React — interactive WebGL mapping with GeoJSON/CSV/Arrow data, MapLibre basemaps, widgets, popups, and live streams from a custom-element manifest or typed React components. TypeScript, no build step.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"publishConfig": {
|
|
@@ -23,7 +23,7 @@ Use OnlyMapJS as a declarative HTML map library. Write custom elements such as `
|
|
|
23
23
|
</script>
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
-
For no-build CDN pages, use the single-file standalone bundle from a raw-file CDN — `https://unpkg.com/@nika-js/onlymap@0.10.
|
|
26
|
+
For no-build CDN pages, use the single-file standalone bundle from a raw-file CDN — `https://unpkg.com/@nika-js/onlymap@0.10.2` (the bare package URL serves `dist/onlymap.standalone.js`) — plus `<link rel="stylesheet" href="https://unpkg.com/@nika-js/onlymap@0.10.2/dist/onlymapjs.css">`. Never a rebundling CDN (esm.sh, skypack): re-bundling duplicates the deck.gl/luma.gl runtime and every layer fails shader compilation.
|
|
27
27
|
|
|
28
28
|
## React Projects
|
|
29
29
|
|
|
@@ -16,8 +16,8 @@ Vite/npm project:
|
|
|
16
16
|
Static CDN page (raw-file CDNs only — unpkg/jsDelivr; never esm.sh or another rebundling CDN, which duplicates the WebGL runtime and breaks layer shaders):
|
|
17
17
|
|
|
18
18
|
```html
|
|
19
|
-
<link rel="stylesheet" href="https://unpkg.com/@nika-js/onlymap@0.10.
|
|
20
|
-
<script type="module" src="https://unpkg.com/@nika-js/onlymap@0.10.
|
|
19
|
+
<link rel="stylesheet" href="https://unpkg.com/@nika-js/onlymap@0.10.2/dist/onlymapjs.css">
|
|
20
|
+
<script type="module" src="https://unpkg.com/@nika-js/onlymap@0.10.2"></script>
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
Always include `onlymapjs.css` — it carries the MapLibre basemap styles and the no-JS fallback rules (`<om-fallback>` / default banner). For the fallback to work in script-disabled previews it must load without JavaScript: a real `<link rel="stylesheet">` or inlined `<style>` on no-build pages (a bundler-emitted stylesheet is fine in npm projects).
|
|
@@ -714,7 +714,7 @@ Events: `click`, `hover`, `drag`, `load`, `data-loaded`.
|
|
|
714
714
|
Common built-in actions:
|
|
715
715
|
|
|
716
716
|
- `show-overlay`, `hide-overlay`
|
|
717
|
-
- `show-tooltip`, `hide-tooltip`
|
|
717
|
+
- `show-tooltip`, `hide-tooltip` — a tooltip dismisses ITSELF when the selection clears (pointer leaving the feature on hover, a click on empty map for a click), so do not wire `hide-tooltip` by hand for that. A template containing an interactive `[data-emit]` element takes pointer events and therefore does not close on its own click, which is how a popup carries its own close button.
|
|
718
718
|
- `toggle-layer`
|
|
719
719
|
- `set-effect` — payload `{ preset }` (a preset name, or `"none"` to remove it); optional `<op>-<param>` knob overrides, e.g. `{ preset: "vintage", "grain-amount": 0.02 }`. Writes one `<om-effect preset>` child, so it is undoable; NOT story-rewindable yet (rewind restores `<om-map>` attributes, this adds an element). A hand-composed op chain is left alone.
|
|
720
720
|
- `set-pickable` — payload `{ layer, pickable: true|false|"3d" }`; writes/removes the layer's `pickable` attribute at runtime (turns popups/tooltips/hover behaviors on or off per layer — the viewer-facing popup toggle), story-capturable and undoable
|