@nika-js/onlymap 0.7.6 → 0.8.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 +19 -0
- package/README.md +3 -1
- package/dist/{LercDecode.es-sRuTJq5Y.js → LercDecode.es-DKhLh4TO.js} +1 -1
- package/dist/{basemap-BCGMmc2F.js → basemap-BjXMRr_M.js} +538 -502
- package/dist/basemap.d.ts +23 -0
- package/dist/cartograph/api.d.ts +45 -0
- package/dist/cartograph/atlas.d.ts +50 -0
- package/dist/cartograph/core-loader.d.ts +35 -0
- package/dist/cartograph/cvd.d.ts +106 -0
- package/dist/cartograph/element-base.d.ts +26 -0
- package/dist/cartograph/elements/om-atlas.d.ts +47 -0
- package/dist/cartograph/elements/om-cartograph.d.ts +76 -0
- package/dist/cartograph/elements/om-frame.d.ts +121 -0
- package/dist/cartograph/elements/om-graticule.d.ts +24 -0
- package/dist/cartograph/elements/om-image.d.ts +12 -0
- package/dist/cartograph/elements/om-legend.d.ts +16 -0
- package/dist/cartograph/elements/om-north.d.ts +11 -0
- package/dist/cartograph/elements/om-scalebar.d.ts +13 -0
- package/dist/cartograph/elements/om-shape.d.ts +16 -0
- package/dist/cartograph/elements/om-text.d.ts +9 -0
- package/dist/cartograph/georef.d.ts +126 -0
- package/dist/cartograph/graticule.d.ts +70 -0
- package/dist/cartograph/html-data.d.ts +27 -0
- package/dist/cartograph/index.d.ts +1 -0
- package/dist/cartograph/layout.d.ts +23 -0
- package/dist/cartograph/legend.d.ts +75 -0
- package/dist/cartograph/live-frame.d.ts +83 -0
- package/dist/cartograph/paint.d.ts +54 -0
- package/dist/cartograph/refs.d.ts +33 -0
- package/dist/cartograph/render.d.ts +64 -0
- package/dist/cartograph/scalebar.d.ts +91 -0
- package/dist/cartograph/schema.d.ts +38 -0
- package/dist/cartograph/standalone.d.ts +1 -0
- package/dist/cartograph/textlayout.d.ts +45 -0
- package/dist/cartograph/tokens.d.ts +45 -0
- package/dist/cartograph/url-actions.d.ts +26 -0
- package/dist/cartograph/validate.d.ts +38 -0
- package/dist/cartograph/zip.d.ts +22 -0
- package/dist/cartograph.css +1 -0
- package/dist/cartograph.js +2797 -0
- package/dist/cartograph.standalone.js +7669 -0
- package/dist/crs-DsDQ4Q4i.js +71 -0
- package/dist/download.d.ts +6 -0
- package/dist/elements/om-map.d.ts +2 -0
- package/dist/feature-access.d.ts +14 -0
- package/dist/field-access.d.ts +1 -10
- package/dist/{geoparquet-CK9IjEjH.js → geoparquet-D9pYDrCk.js} +1 -1
- package/dist/{index-CN_tn36D.js → index-BGQidVp5.js} +1 -1
- package/dist/{index-CIEJyv5x.js → index-BdKNZcs-.js} +1 -1
- package/dist/index-CcLC9jE5.js +4798 -0
- package/dist/{index-C1ZQGJxa.js → index-CqtubBZ4.js} +1 -1
- package/dist/{index-CNRYpb0x.js → index-D6R4z3Zs.js} +6296 -6203
- package/dist/{index-CW3bdfHB.js → index-Zm8MxpvR.js} +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/{lerc-Bb2JZ92v.js → lerc-BdHcL8pi.js} +2 -2
- package/dist/onlymap.standalone.js +10777 -10648
- package/dist/onlymapjs.js +12 -11
- package/dist/{raster-DpYssEe7.js → raster-B7rPpOTP.js} +3 -3
- package/dist/{raster-pipeline-BVCB-0yq.js → raster-pipeline-X2-mnFQx.js} +1 -1
- package/dist/runtime-core.d.ts +42 -0
- package/dist/snapshot.d.ts +17 -0
- package/dist/units.d.ts +9 -0
- package/dist/version.d.ts +1 -1
- package/dist/{zarr-DNb4iqbL.js → zarr-BF-buFRB.js} +2 -2
- package/docs/cartograph.md +396 -0
- package/llms.txt +1 -0
- package/onlymapjs.html-data.json +978 -0
- package/package.json +17 -6
- package/skills/onlymapjs/SKILL.md +2 -2
- package/skills/onlymapjs/references/syntax.md +27 -2
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
const s = [
|
|
2
|
+
[33, 129.5],
|
|
3
|
+
[33, 131],
|
|
4
|
+
[36, 132.166666666667],
|
|
5
|
+
[33, 133.5],
|
|
6
|
+
[36, 134.333333333333],
|
|
7
|
+
[36, 136],
|
|
8
|
+
[36, 137.166666666667],
|
|
9
|
+
[36, 138.5],
|
|
10
|
+
[36, 139.833333333333],
|
|
11
|
+
[40, 140.833333333333],
|
|
12
|
+
[44, 140.25],
|
|
13
|
+
[44, 142.25],
|
|
14
|
+
[44, 144.25],
|
|
15
|
+
[26, 142],
|
|
16
|
+
[26, 127.5],
|
|
17
|
+
[26, 124],
|
|
18
|
+
[26, 131],
|
|
19
|
+
[20, 136],
|
|
20
|
+
[26, 154]
|
|
21
|
+
], l = {
|
|
22
|
+
// Netherlands — Amersfoort / RD New (3DBAG).
|
|
23
|
+
28992: {
|
|
24
|
+
def: "+proj=sterea +lat_0=52.1561605555556 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel +towgs84=565.4171,50.3319,465.5524,-0.398957,0.343988,-1.8774,4.0725 +units=m +no_defs"
|
|
25
|
+
},
|
|
26
|
+
// Switzerland — CH1903+ / LV95.
|
|
27
|
+
2056: {
|
|
28
|
+
def: "+proj=somerc +lat_0=46.9524055555556 +lon_0=7.43958333333333 +k_0=1 +x_0=2600000 +y_0=1200000 +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +units=m +no_defs"
|
|
29
|
+
},
|
|
30
|
+
// Germany — ETRS89 / UTM zones 32N and 33N.
|
|
31
|
+
25832: { def: "+proj=utm +zone=32 +ellps=GRS80 +units=m +no_defs" },
|
|
32
|
+
25833: { def: "+proj=utm +zone=33 +ellps=GRS80 +units=m +no_defs" },
|
|
33
|
+
// Plain WGS84 UTM zones 32N/33N (EPSG:326xx) — the generic, non-European-specific
|
|
34
|
+
// code many CityJSON files declare instead of the ETRS89 pair above (e.g.
|
|
35
|
+
// Ingolstadt's own open-data LoD3 export). Numerically near-identical to
|
|
36
|
+
// 25832/25833 at map-rendering precision (WGS84 vs. ETRS89 differ by ~cm in
|
|
37
|
+
// Europe), so no +towgs84 shift is needed — same bare projection string.
|
|
38
|
+
32632: { def: "+proj=utm +zone=32 +datum=WGS84 +units=m +no_defs" },
|
|
39
|
+
32633: { def: "+proj=utm +zone=33 +datum=WGS84 +units=m +no_defs" },
|
|
40
|
+
// Austria — MGI / Austria GK West/Central/East (the national cadastral
|
|
41
|
+
// system's three meridian-strip zones; Vienna sits in GK East). Same
|
|
42
|
+
// Bessel ellipsoid + towgs84 shift and y_0=-5,000,000 false-northing
|
|
43
|
+
// convention across all three — proj4 strings verified against epsg.io,
|
|
44
|
+
// not hand-derived, and cross-checked by reprojecting a real Vienna
|
|
45
|
+
// open-data file's own extent and confirming it lands in Vienna.
|
|
46
|
+
31254: { def: "+proj=tmerc +lat_0=0 +lon_0=10.3333333333333 +k=1 +x_0=0 +y_0=-5000000 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs" },
|
|
47
|
+
31255: { def: "+proj=tmerc +lat_0=0 +lon_0=13.3333333333333 +k=1 +x_0=0 +y_0=-5000000 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs" },
|
|
48
|
+
31256: { def: "+proj=tmerc +lat_0=0 +lon_0=16.3333333333333 +k=1 +x_0=0 +y_0=-5000000 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs" },
|
|
49
|
+
// Singapore — SVY21 / Singapore TM (the national grid; NUS's own Singapore
|
|
50
|
+
// HDB buildings dataset declares this via metadata.referenceSystem
|
|
51
|
+
// directly, unlike the Austria/3DBAG files, which had none). proj4 string
|
|
52
|
+
// verified against epsg.io, cross-checked by reprojecting a real dataset's
|
|
53
|
+
// own extent and confirming it lands in Singapore (103.68-103.99°E,
|
|
54
|
+
// 1.27-1.46°N — matches).
|
|
55
|
+
3414: { def: "+proj=tmerc +lat_0=1.36666666666667 +lon_0=103.833333333333 +k=1 +x_0=28001.642 +y_0=38744.572 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs" },
|
|
56
|
+
// Japan — JGD2011 geographic 2D. EPSG axis order is (lat, lon).
|
|
57
|
+
6668: { def: "+proj=longlat +ellps=GRS80 +no_defs", geographic: !0, swapXY: !0 },
|
|
58
|
+
// WGS 84. Files in the wild store lon/lat despite EPSG's formal (lat, lon).
|
|
59
|
+
4326: { def: "+proj=longlat +datum=WGS84 +no_defs", geographic: !0 },
|
|
60
|
+
3857: { def: "+proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +no_defs" }
|
|
61
|
+
};
|
|
62
|
+
for (let e = 0; e < s.length; e++) {
|
|
63
|
+
const [o, t] = s[e];
|
|
64
|
+
l[6669 + e] = {
|
|
65
|
+
def: `+proj=tmerc +lat_0=${o} +lon_0=${t} +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs`,
|
|
66
|
+
swapXY: !0
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
export {
|
|
70
|
+
l as CRS_DEFS
|
|
71
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** Shared browser-download primitive. Import-safe outside a browser. */
|
|
2
|
+
export interface DownloadBlobOptions {
|
|
3
|
+
/** Keep the object URL alive briefly for browsers that start downloads asynchronously. */
|
|
4
|
+
revokeAfterMs?: number;
|
|
5
|
+
}
|
|
6
|
+
export declare function downloadBlob(blob: Blob, filename: string, options?: DownloadBlobOptions): void;
|
|
@@ -306,6 +306,8 @@ export declare class OmMapElement extends HTMLElementBase {
|
|
|
306
306
|
/** A layer's current per-frame channel patch (tests/e2e assert trace progress through this). */
|
|
307
307
|
getAnimatedPropsInternal(layerId: string): Record<string, unknown> | undefined;
|
|
308
308
|
/** Current camera state (story initial-state capture) — internal-suffix API. */
|
|
309
|
+
/** Push `max-pitch` to the runtime; absent or unparseable restores the default. */
|
|
310
|
+
private applyMaxPitch;
|
|
309
311
|
getViewStateInternal(): {
|
|
310
312
|
longitude: number;
|
|
311
313
|
latitude: number;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Import-free helpers for feature-shaped data.
|
|
3
|
+
*
|
|
4
|
+
* These live below `field-access.ts` so lightweight consumers such as the
|
|
5
|
+
* Cartograph bundle can share GeoJSON field/coordinate semantics without
|
|
6
|
+
* pulling in row materialisation, licensing, or the rest of the map runtime.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Shape-less named-field read: GeoJSON properties win over envelope fields,
|
|
10
|
+
* matching `flattenFeature()` and preserving an explicitly stored undefined.
|
|
11
|
+
*/
|
|
12
|
+
export declare function readNamedField(row: unknown, field: string): unknown;
|
|
13
|
+
/** Recursively walk Point/LineString/Polygon/Multi* coordinates. */
|
|
14
|
+
export declare function collectCoordinates(coordinates: unknown, out: [number, number][]): void;
|
package/dist/field-access.d.ts
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* for ctx.stats/dataInViewport so widget code never has to think about it.
|
|
6
6
|
*/
|
|
7
7
|
import type { Shape, LayerData } from "./ir";
|
|
8
|
+
export { collectCoordinates, readNamedField } from "./feature-access";
|
|
8
9
|
export declare function getField(row: unknown, field: string, shape: Shape): unknown;
|
|
9
10
|
/** Normalizes a picked feature to flat (GeoJSON properties lifted to the top level) — for ctx.selection.object. */
|
|
10
11
|
export declare function flattenFeature(row: unknown, shape: Shape): unknown;
|
|
@@ -22,13 +23,3 @@ export declare function matchesFeatureId(row: unknown, featureId: string, shape:
|
|
|
22
23
|
* asRows view — the Tier-2 rule, stated once here instead of at each caller.
|
|
23
24
|
*/
|
|
24
25
|
export declare function findRowIndexById(data: LayerData, featureId: string, shape: Shape): number;
|
|
25
|
-
/**
|
|
26
|
-
* Shape-less named-field read: a GeoJSON Feature's field lives under
|
|
27
|
-
* `properties`, a flat row carries it directly — probe both, `in`-checked so
|
|
28
|
-
* an explicit null/undefined stored under properties still wins. For callers
|
|
29
|
-
* that have no `Shape` in hand (the Tracking layer pair); everything with a
|
|
30
|
-
* shape should use `getField`.
|
|
31
|
-
*/
|
|
32
|
-
export declare function readNamedField(row: unknown, field: string): unknown;
|
|
33
|
-
/** Recursively walks GeoJSON `coordinates` (Point/LineString/Polygon/Multi*) collecting every [lng, lat] vertex. */
|
|
34
|
-
export declare function collectCoordinates(coordinates: unknown, out: [number, number][]): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ag as Be, ah as le, ai as ce, aj as De, ak as Oe, al as ke } from "./index-
|
|
1
|
+
import { ag as Be, ah as le, ai as ce, aj as De, ak as Oe, al as ke } from "./index-D6R4z3Zs.js";
|
|
2
2
|
import { y as ve, a as he, z as G, R as J, A as ue, C as Fe, F as je, n as xe, 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";
|