@nika-js/onlymap 0.9.1 → 0.10.1
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 +24 -0
- package/README.md +27 -3
- package/dist/{basemap-DL0mk9Bf.js → basemap-DzQBuqBn.js} +3882 -3980
- package/dist/cartograph/elements/om-frame.d.ts +67 -1
- package/dist/cartograph/georef.d.ts +18 -4
- package/dist/cartograph/schema.d.ts +11 -0
- package/dist/cartograph.js +1480 -1311
- package/dist/cartograph.standalone.js +1808 -1615
- package/dist/{cityjson-D_V5GY8b.js → cityjson-k-z1r6c0.js} +1 -1
- package/dist/{crs-DsDQ4Q4i.js → crs-BzE_KP4M.js} +25 -2
- package/dist/{crs-Ciu7Xs7a.js → crs-ChglCB3O.js} +39 -16
- package/dist/elements/om-map.d.ts +10 -0
- package/dist/{geoparquet-DJxZA0if.js → geoparquet-BlFSeNwf.js} +10 -10
- package/dist/globe-view-qTt7YaiC.js +104 -0
- package/dist/hillshade-Ds0pONmA.js +298 -0
- package/dist/{hillshade-shader-n_zManfZ.js → hillshade-shader-DI2uLSNU.js} +15 -10
- package/dist/hillshade-shader.d.ts +18 -2
- package/dist/hillshade.d.ts +30 -0
- package/dist/{ifc-Dc-TdSJr.js → ifc-DXwePQRv.js} +131 -131
- package/dist/{index-vLXZuog4.js → index-B9kwlhFA.js} +1 -1
- package/dist/index-BCTAq6uy.js +65 -0
- package/dist/{index-DdTZSuAb.js → index-BK99wPf_.js} +106 -106
- package/dist/index-BSwEOxkR.js +322 -0
- package/dist/{index-BjcPjICh.js → index-Bpk1EipB.js} +59 -59
- package/dist/index-C2VK-Is6.js +641 -0
- package/dist/index-C4oddUIX.js +459 -0
- package/dist/{index-oY3XHIux.js → index-CBYDP-_0.js} +18178 -16943
- package/dist/{index-CvuDsvnk.js → index-oL_18WvP.js} +47 -47
- package/dist/index.d.ts +4 -0
- package/dist/layer-registry.d.ts +27 -0
- package/dist/{lerc-Bph62dCb.js → lerc-xM89n_hR.js} +1 -1
- package/dist/onlymap.standalone.js +48211 -45574
- package/dist/onlymapjs.js +77 -74
- package/dist/parse-manifest.d.ts +6 -0
- package/dist/plane-camera.d.ts +59 -0
- package/dist/plane-layers.d.ts +56 -0
- package/dist/plane-tiles.d.ts +99 -0
- package/dist/plane-tileset.d.ts +31 -0
- package/dist/plane-warp.d.ts +91 -0
- package/dist/post-process-effect-CNMzoP-h.js +197 -0
- package/dist/programmatic.d.ts +16 -1
- package/dist/projection.d.ts +118 -0
- package/dist/{raster-pipeline-BlOnMPJe.js → raster-pipeline-B_gY9-5f.js} +4 -3
- package/dist/{raster-D-eTzCE3.js → raster-yVRqHYLH.js} +4 -4
- package/dist/runtime-core.d.ts +140 -1
- package/dist/serialize/clip.d.ts +50 -0
- package/dist/serialize/declutter.d.ts +44 -0
- package/dist/serialize/emit.d.ts +60 -0
- package/dist/serialize/index.d.ts +64 -0
- package/dist/serialize/strategy.d.ts +30 -0
- package/dist/serialize/style.d.ts +77 -0
- package/dist/snapshot.d.ts +46 -0
- package/dist/surface-anchor.d.ts +6 -0
- package/dist/text-on-path-D-fhYDqa.js +146 -0
- package/dist/text-on-path.d.ts +157 -0
- package/dist/transform/buffer.d.ts +63 -0
- package/dist/transform/contour.d.ts +37 -0
- package/dist/transform/dot-density.d.ts +19 -0
- package/dist/transform/field.d.ts +80 -0
- package/dist/transform/geometry.d.ts +20 -0
- package/dist/transform/index.d.ts +29 -0
- package/dist/transform/simplify.d.ts +10 -0
- package/dist/transform/smooth.d.ts +12 -0
- package/dist/transform-stage.d.ts +92 -0
- package/dist/version.d.ts +1 -1
- package/dist/{zarr-BGDoEtFb.js → zarr-BPeWy3ro.js} +2 -2
- package/docs/cartograph.md +12 -4
- package/docs/cartography.md +328 -0
- package/docs/design/arrows.md +182 -0
- package/docs/design/carto-substrate.md +1055 -0
- package/docs/design/extensions.md +250 -0
- package/llms.txt +3 -2
- package/onlymapjs.attributes.json +18 -0
- package/onlymapjs.html-data.json +169 -19
- package/package.json +1 -1
- package/skills/onlymapjs/SKILL.md +6 -2
- package/skills/onlymapjs/references/syntax.md +22 -2
- package/dist/hillshade-DR3TxO1a.js +0 -186
- package/dist/index-DO_w0tqR.js +0 -514
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
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-CBYDP-_0.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-CBYDP-_0.js";
|
|
3
3
|
import { g as j, i as D } from "./table-accessors-CYWTzpQI.js";
|
|
4
|
-
async function
|
|
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 };
|
|
6
6
|
o || (c.url = E(t, n));
|
|
7
7
|
const i = s.getWorkerPool(c), u = n.jobName || t.name, d = await i.startJob(
|
|
8
8
|
u,
|
|
9
9
|
// eslint-disable-next-line
|
|
10
|
-
|
|
10
|
+
J.bind(null, r)
|
|
11
11
|
), y = N(n);
|
|
12
12
|
return d.postMessage("process", { input: e, options: y }), (await d.result).result;
|
|
13
13
|
}
|
|
14
|
-
async function
|
|
14
|
+
async function J(t, e, n, r) {
|
|
15
15
|
switch (n) {
|
|
16
16
|
case "done":
|
|
17
17
|
e.done(r);
|
|
@@ -66,12 +66,12 @@ async function* pe(t) {
|
|
|
66
66
|
}
|
|
67
67
|
e.length > 0 && (yield e);
|
|
68
68
|
}
|
|
69
|
-
async function*
|
|
69
|
+
async function* be(t) {
|
|
70
70
|
let e = 1;
|
|
71
71
|
for await (const n of t)
|
|
72
72
|
yield { counter: e, line: n }, e++;
|
|
73
73
|
}
|
|
74
|
-
const G = "4.4.3",
|
|
74
|
+
const G = "4.4.3", ge = {
|
|
75
75
|
dataType: null,
|
|
76
76
|
batchType: null,
|
|
77
77
|
name: "JSON",
|
|
@@ -82,11 +82,11 @@ const G = "4.4.3", Te = {
|
|
|
82
82
|
mimeTypes: ["application/json"],
|
|
83
83
|
category: "json",
|
|
84
84
|
text: !0,
|
|
85
|
-
parseTextSync:
|
|
86
|
-
parse: async (t) =>
|
|
85
|
+
parseTextSync: b,
|
|
86
|
+
parse: async (t) => b(new TextDecoder().decode(t)),
|
|
87
87
|
options: {}
|
|
88
88
|
};
|
|
89
|
-
function
|
|
89
|
+
function b(t) {
|
|
90
90
|
return JSON.parse(t);
|
|
91
91
|
}
|
|
92
92
|
class H {
|
|
@@ -111,7 +111,7 @@ class H {
|
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
113
|
const f = new Error("Not implemented");
|
|
114
|
-
class
|
|
114
|
+
class Q {
|
|
115
115
|
handle;
|
|
116
116
|
size = 0;
|
|
117
117
|
bigsize = 0n;
|
|
@@ -145,12 +145,12 @@ class K {
|
|
|
145
145
|
async close() {
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
|
-
async function
|
|
148
|
+
async function Te(t, e, n) {
|
|
149
149
|
t instanceof Blob || (t = new Blob([t]));
|
|
150
150
|
const r = t.slice(e, e + n);
|
|
151
|
-
return await
|
|
151
|
+
return await X(r);
|
|
152
152
|
}
|
|
153
|
-
async function
|
|
153
|
+
async function X(t) {
|
|
154
154
|
return await new Promise((e, n) => {
|
|
155
155
|
const r = new FileReader();
|
|
156
156
|
r.onload = (a) => e(a?.target?.result), r.onerror = (a) => n(a), r.readAsArrayBuffer(t);
|
|
@@ -164,16 +164,16 @@ function Se(t, e, n, r) {
|
|
|
164
164
|
const c = x(n, o, s), i = I(t), u = () => {
|
|
165
165
|
throw new Error("parseSync called parse (which is async");
|
|
166
166
|
};
|
|
167
|
-
return r = B({ url: i, _parseSync: u, _parse: u, loaders: e }, c, r || null),
|
|
167
|
+
return r = B({ url: i, _parseSync: u, _parse: u, loaders: e }, c, r || null), Y(o, t, c, r);
|
|
168
168
|
}
|
|
169
|
-
function
|
|
169
|
+
function Y(t, e, n, r) {
|
|
170
170
|
if (e = _(e, t), t.parseTextSync && typeof e == "string")
|
|
171
171
|
return t.parseTextSync(e, n);
|
|
172
172
|
if (t.parseSync && e instanceof ArrayBuffer)
|
|
173
173
|
return t.parseSync(e, n, r);
|
|
174
174
|
throw new Error(`${t.name} loader: 'parseSync' not supported by this loader, use 'parse' instead. ${r.url || ""}`);
|
|
175
175
|
}
|
|
176
|
-
function
|
|
176
|
+
function Z(t) {
|
|
177
177
|
return { ...t, length: j(t), batchType: "data" };
|
|
178
178
|
}
|
|
179
179
|
async function l(t, e, n, r) {
|
|
@@ -183,9 +183,9 @@ async function l(t, e, n, r) {
|
|
|
183
183
|
if (!o)
|
|
184
184
|
return [];
|
|
185
185
|
const c = x(n, o, a, s);
|
|
186
|
-
return r = B({ url: s, _parseInBatches: l, _parse: k, loaders: a }, c, r || null), await
|
|
186
|
+
return r = B({ url: s, _parseInBatches: l, _parse: k, loaders: a }, c, r || null), await K(o, t, c, r);
|
|
187
187
|
}
|
|
188
|
-
async function
|
|
188
|
+
async function K(t, e, n, r) {
|
|
189
189
|
const a = await ee(t, e, n, r);
|
|
190
190
|
if (!n?.core?.metadata)
|
|
191
191
|
return a;
|
|
@@ -220,7 +220,7 @@ async function* te(t, e, n, r) {
|
|
|
220
220
|
yield ne(s, e);
|
|
221
221
|
}
|
|
222
222
|
function ne(t, e) {
|
|
223
|
-
const n = D(t) ?
|
|
223
|
+
const n = D(t) ? Z(t) : {
|
|
224
224
|
shape: "unknown",
|
|
225
225
|
batchType: "data",
|
|
226
226
|
data: t,
|
|
@@ -237,10 +237,10 @@ async function re(t, e = []) {
|
|
|
237
237
|
function xe(t, e, n, r) {
|
|
238
238
|
let a;
|
|
239
239
|
!Array.isArray(e) && !w(e) ? (n = e, a = void 0) : a = e;
|
|
240
|
-
const s =
|
|
241
|
-
return Array.isArray(t) ? t.map((c) =>
|
|
240
|
+
const s = C(n || {});
|
|
241
|
+
return Array.isArray(t) ? t.map((c) => g(c, a, n || {}, s)) : g(t, a, n || {}, s);
|
|
242
242
|
}
|
|
243
|
-
async function
|
|
243
|
+
async function g(t, e, n, r) {
|
|
244
244
|
if (typeof t == "string") {
|
|
245
245
|
const s = await r(t);
|
|
246
246
|
return Array.isArray(e) ? await l(s, e, n) : await l(s, e, n);
|
|
@@ -258,7 +258,7 @@ async function ae(t, e, n) {
|
|
|
258
258
|
const r = se(t, e, n), a = [];
|
|
259
259
|
for await (const s of r)
|
|
260
260
|
a.push(s);
|
|
261
|
-
return
|
|
261
|
+
return v(...a);
|
|
262
262
|
}
|
|
263
263
|
throw new Error("Writer could not encode data");
|
|
264
264
|
}
|
|
@@ -282,8 +282,8 @@ function oe(t) {
|
|
|
282
282
|
return [{ ...t, start: 0, end: t.length }];
|
|
283
283
|
}
|
|
284
284
|
async function Be(t, e, n) {
|
|
285
|
-
const a = { ...
|
|
286
|
-
return e.encodeURLtoURL ? ue(e, t, a) : V(e, a) ? await
|
|
285
|
+
const a = { ...M(), ...n };
|
|
286
|
+
return e.encodeURLtoURL ? ue(e, t, a) : V(e, a) ? await q(e, t, a) : await e.encode(t, a);
|
|
287
287
|
}
|
|
288
288
|
function ce(t, e, n) {
|
|
289
289
|
if (e.encodeSync)
|
|
@@ -327,15 +327,15 @@ async function ie(t, e, n, r) {
|
|
|
327
327
|
async function ue(t, e, n) {
|
|
328
328
|
if (h)
|
|
329
329
|
throw new Error(`Writer ${t.name} not supported in browser`);
|
|
330
|
-
const r =
|
|
331
|
-
await new
|
|
332
|
-
const s =
|
|
333
|
-
return (await
|
|
330
|
+
const r = T("input");
|
|
331
|
+
await new Q(r, "w").write(e);
|
|
332
|
+
const s = T("output"), o = await ie(r, s, t, n);
|
|
333
|
+
return (await U(o)).arrayBuffer();
|
|
334
334
|
}
|
|
335
335
|
function fe(t) {
|
|
336
336
|
return [{ ...t, start: 0, end: t.length }];
|
|
337
337
|
}
|
|
338
|
-
function
|
|
338
|
+
function T(t) {
|
|
339
339
|
return `/tmp/${t}`;
|
|
340
340
|
}
|
|
341
341
|
function Ae(t, e, n) {
|
|
@@ -535,18 +535,18 @@ class Oe {
|
|
|
535
535
|
}
|
|
536
536
|
export {
|
|
537
537
|
$e as FetchError,
|
|
538
|
-
|
|
538
|
+
ge as JSONLoader,
|
|
539
539
|
Ne as NullLoader,
|
|
540
540
|
Ee as NullWorkerLoader,
|
|
541
541
|
ze as RequestScheduler,
|
|
542
542
|
Oe as _BrowserFileSystem,
|
|
543
543
|
We as _fetchProgress,
|
|
544
544
|
Ae as _selectSource,
|
|
545
|
-
|
|
546
|
-
|
|
545
|
+
Ce as _unregisterLoaders,
|
|
546
|
+
ve as assert,
|
|
547
547
|
z as concatenateArrayBuffersAsync,
|
|
548
|
-
|
|
549
|
-
|
|
548
|
+
Me as createDataSource,
|
|
549
|
+
Ue as document,
|
|
550
550
|
Be as encode,
|
|
551
551
|
Le as encodeInBatches,
|
|
552
552
|
ce as encodeSync,
|
|
@@ -556,33 +556,33 @@ export {
|
|
|
556
556
|
ke as encodeText,
|
|
557
557
|
Fe as encodeTextSync,
|
|
558
558
|
ie as encodeURLtoURL,
|
|
559
|
-
|
|
559
|
+
U as fetchFile,
|
|
560
560
|
je as forEach,
|
|
561
|
-
|
|
561
|
+
M as getLoaderOptions,
|
|
562
562
|
De as getPathPrefix,
|
|
563
|
-
|
|
564
|
-
|
|
563
|
+
qe as global,
|
|
564
|
+
Je as isAsyncIterable,
|
|
565
565
|
h as isBrowser,
|
|
566
566
|
Ve as isIterable,
|
|
567
567
|
Ge as isIterator,
|
|
568
568
|
He as isPromise,
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
569
|
+
Qe as isPureObject,
|
|
570
|
+
Xe as isReadableStream,
|
|
571
|
+
Ye as isResponse,
|
|
572
|
+
Ze as isWorker,
|
|
573
|
+
Ke as isWritableStream,
|
|
574
574
|
et as load,
|
|
575
575
|
xe as loadInBatches,
|
|
576
576
|
tt as makeIterator,
|
|
577
577
|
pe as makeLineIterator,
|
|
578
|
-
|
|
578
|
+
be as makeNumberedLineIterator,
|
|
579
579
|
Re as makeStream,
|
|
580
580
|
me as makeTextDecoderIterator,
|
|
581
581
|
we as makeTextEncoderIterator,
|
|
582
582
|
k as parse,
|
|
583
583
|
l as parseInBatches,
|
|
584
584
|
Se as parseSync,
|
|
585
|
-
|
|
585
|
+
Te as readArrayBuffer,
|
|
586
586
|
nt as registerLoaders,
|
|
587
587
|
p as resolvePath,
|
|
588
588
|
P as selectLoader,
|
package/dist/index.d.ts
CHANGED
|
@@ -32,6 +32,7 @@ import { registerWidget } from "./widget-registry";
|
|
|
32
32
|
import { registerAction } from "./actions";
|
|
33
33
|
import { registerBasemap, configureBasemap } from "./basemap-registry";
|
|
34
34
|
import { registerTerrain } from "./terrain";
|
|
35
|
+
import { registerCrs } from "./projection";
|
|
35
36
|
import { registerRoutingProvider } from "./providers";
|
|
36
37
|
import { configureTelemetry } from "./telemetry";
|
|
37
38
|
import { configureLicense, setKeepBadge, badgeMode } from "./license";
|
|
@@ -59,6 +60,8 @@ export type { BasemapPreset, BasemapStyle } from "./basemap-registry";
|
|
|
59
60
|
export { LIGHTING_PRESET_NAMES, resolveLighting, solarAzElDegrees } from "./scene-lighting";
|
|
60
61
|
export type { LightingIR, LightingOptions, LightingPresetName } from "./scene-lighting";
|
|
61
62
|
export { registerTerrain, getTerrain, parseTerrainAttrs } from "./terrain";
|
|
63
|
+
export { registerCrs, resolveProjection, registeredCrsCodes } from "./projection";
|
|
64
|
+
export type { Projection, PlaneUnits, LngLatPair, PlaneXY } from "./projection";
|
|
62
65
|
export type { TerrainPreset, TerrainIR, ElevationDecoder, LayerTerrainMode } from "./terrain";
|
|
63
66
|
export { registerRoutingProvider, getRoutingProvider, lineStringLengthMeters } from "./providers";
|
|
64
67
|
export type { RoutingProvider, Route, RouteRequest, RouteWaypoint, RouteLeg } from "./providers";
|
|
@@ -132,6 +135,7 @@ export declare const OmMap: {
|
|
|
132
135
|
registerSource: typeof registerSource;
|
|
133
136
|
registerBasemap: typeof registerBasemap;
|
|
134
137
|
registerTerrain: typeof registerTerrain;
|
|
138
|
+
registerCrs: typeof registerCrs;
|
|
135
139
|
registerRoutingProvider: typeof registerRoutingProvider;
|
|
136
140
|
configureBasemap: typeof configureBasemap;
|
|
137
141
|
configureData: typeof configureData;
|
package/dist/layer-registry.d.ts
CHANGED
|
@@ -83,7 +83,34 @@ export interface LayerSchema {
|
|
|
83
83
|
carriesRasterWindow?: boolean;
|
|
84
84
|
/** Answers pixel-identify queries (COG v2 phase 4) via the eager raster-identify registry — the pick path synthesizes a selection from its per-band values when a click/hover lands on no vector feature. */
|
|
85
85
|
carriesRasterIdentify?: boolean;
|
|
86
|
+
/**
|
|
87
|
+
* Draws Web Mercator raster tiles, so on a PROJECTED map it needs the plane
|
|
88
|
+
* itself rather than projected geometry: its tiles have to be re-indexed
|
|
89
|
+
* from the plane's geography and drawn as subdivided warped meshes
|
|
90
|
+
* (docs/design/carto-substrate.md §9, Phase 6). The runtime injects
|
|
91
|
+
* `_planeFrame` only into these types — a flag on the schema for the same
|
|
92
|
+
* reason `carriesTileset` is one, so the list has a single home instead of
|
|
93
|
+
* a type-name check in the renderer.
|
|
94
|
+
*/
|
|
95
|
+
warpsInPlane?: boolean;
|
|
86
96
|
}
|
|
97
|
+
/**
|
|
98
|
+
* Layer types whose geometry comes from a WEB MERCATOR TILE PYRAMID.
|
|
99
|
+
*
|
|
100
|
+
* On a projected map these cannot work by projecting their data — they have
|
|
101
|
+
* none; deck indexes their tiles from the viewport, and an `OrthographicView`
|
|
102
|
+
* sends it down the Cartesian branch, which produces indices that mean nothing
|
|
103
|
+
* in an OSM pyramid (C24/C25). `HillshadeLayer` is the one type taught to
|
|
104
|
+
* re-index and warp, and it says so with `warpsInPlane`.
|
|
105
|
+
*
|
|
106
|
+
* Listed here rather than in the validator so "which layers understand a
|
|
107
|
+
* plane" has ONE home: the flag says which do, this says which would need to.
|
|
108
|
+
* Teaching a new type to warp is then setting the flag, and the validator
|
|
109
|
+
* stops refusing it without being edited.
|
|
110
|
+
*/
|
|
111
|
+
export declare const MERCATOR_PYRAMID_TYPES: readonly string[];
|
|
112
|
+
/** Whether this type draws Mercator-pyramid tiles and has NOT been taught the plane. */
|
|
113
|
+
export declare function needsMercatorPyramid(type: string): boolean;
|
|
87
114
|
export declare function registerLayer(schema: Omit<LayerSchema, "tier"> & {
|
|
88
115
|
tier?: LayerSchema["tier"];
|
|
89
116
|
}): void;
|