@nika-js/onlymap 0.5.0 → 0.5.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/README.md +3 -2
- package/dist/{LercDecode.es-B-OFS9hR.js → LercDecode.es-BNF7PeWz.js} +1 -1
- package/dist/{basemap-CXVNH22A.js → basemap-7GQL0KSL.js} +1 -1
- package/dist/data-layer.d.ts +11 -0
- package/dist/{index-BonJP_St.js → index-7PZgoR0X.js} +1 -1
- package/dist/{index-CjZMcGou.js → index-9W_UXlPB.js} +2 -2
- package/dist/{index-DuY3Zn6r.js → index-BKiYWYJz.js} +1 -1
- package/dist/{index-DE7T4lfa.js → index-ULFXRQAo.js} +1 -1
- package/dist/{index-DiYFebYs.js → index-ppCRU8Eb.js} +1931 -1919
- package/dist/ir-snapshot.d.ts +2 -0
- package/dist/ir.d.ts +7 -0
- package/dist/{lerc-BhtFlCQ3.js → lerc-C-D0ZLmp.js} +2 -2
- package/dist/onlymap.standalone.js +3410 -3398
- package/dist/onlymapjs.js +1 -1
- package/dist/{raster-BpVAEzbU.js → raster-D43jYSib.js} +2 -2
- package/dist/version.d.ts +1 -1
- package/llms.txt +1 -1
- package/package.json +1 -1
- package/skills/onlymapjs/SKILL.md +1 -1
- package/skills/onlymapjs/references/syntax.md +18 -2
package/README.md
CHANGED
|
@@ -46,7 +46,7 @@ deck.gl is the best WebGL data-visualization engine there is — and OnlyMapJS i
|
|
|
46
46
|
|---|---|---|
|
|
47
47
|
| Setup | `new Deck({...})`, canvas + basemap sync wiring | one `<om-map>` element (or `<OmMap>` in React) |
|
|
48
48
|
| State | your reducers/stores drive `setProps` | the manifest **is** the state — edit an attribute, the map reconciles; undo/redo built in |
|
|
49
|
-
| Data loading | fetch + parse + reload yourself | `data="…"` — GeoJSON, CSV, Arrow/GeoArrow, Shapefile, KML, CityJSON, WebSocket streams, polled REST; GeoTIFF/COG rasters via `type="COGLayer"` |
|
|
49
|
+
| Data loading | fetch + parse + reload yourself | `data="…"` — GeoJSON, CSV, Arrow/GeoArrow, Shapefile, KML, CityJSON, WebSocket streams, polled REST, tiled XYZ/vector (`TileLayer`/`MVTLayer`); GeoTIFF/COG rasters via `type="COGLayer"` |
|
|
50
50
|
| Accessors | JS functions + `updateTriggers` bookkeeping | `get-*` expressions; update triggers derived automatically |
|
|
51
51
|
| UI | build legends/popups/filters from scratch | built-in widgets, overlays, behaviors — declarative |
|
|
52
52
|
| Testing | mock WebGL or ship untested | `OmMap.validate`, IR snapshots, headless behavioral harness |
|
|
@@ -69,7 +69,7 @@ Or with no build step at all, straight from a CDN:
|
|
|
69
69
|
|
|
70
70
|
The bare package URL serves `dist/onlymap.standalone.js`, a single-file bundle built for exactly this (jsDelivr too). Use a CDN that serves the package's raw files — **not** a rebundling CDN like esm.sh, which re-splits the bundle into duplicate copies of the deck.gl/luma.gl runtime and breaks every layer's shader compilation.
|
|
71
71
|
|
|
72
|
-
Then `npx @nika-js/onlymap init` wires up VS Code IntelliSense and `!`-prefixed manifest snippets for your project. The library ships with
|
|
72
|
+
Then `npx @nika-js/onlymap init` wires up VS Code IntelliSense and `!`-prefixed manifest snippets for your project. The library ships with 595 unit/behavioral tests and 58 Playwright GPU tests.
|
|
73
73
|
|
|
74
74
|
The [examples](https://github.com/NikaGeospatial/onlymapjs/tree/main/examples) are the best tour: widgets, behaviors & overlays, basemaps, columnar/Arrow data, manual drawing, 3D models, scene lighting (with the native lighting widget), DEM terrain, a live WebSocket ship feed, and a polled driver fleet.
|
|
75
75
|
|
|
@@ -115,6 +115,7 @@ Built-ins: `scale()` (types: `sequential`, `diverging`, `threshold`, `sqrt`, `lo
|
|
|
115
115
|
| **GeoTIFF / COG raster** | `<om-layer type="COGLayer" src="./dem.tif" min="0" max="1900" colormap="viridis">` | Cloud-Optimized GeoTIFFs stream tiles by Range request (lazy chunk); min/max restretch + colormap swaps are GPU uniforms, nodata → transparent, legend ramp derives automatically; plain 8-bit RGB COGs need no attributes at all |
|
|
116
116
|
| **WebSocket stream** | `data="wss://feed" key="id" flush="250ms" source="myFormat"` | upsert-by-key, burst coalescing, auto-reconnect; decode any format via `OmMap.registerSource` |
|
|
117
117
|
| **Polled REST snapshot** | `data="/api/fleet.json" refresh="5s"` | full-snapshot replace per poll; outages keep the last good data |
|
|
118
|
+
| **Tiled layer (XYZ / vector)** | `<om-layer type="TileLayer" data="…/{z}/{x}/{y}.png">` or `type="MVTLayer"` | a `{z}/{x}/{y}` `data` template is deck's tile URL — passed through, never fetched as rows; raster `TileLayer` gets a built-in `BitmapLayer` renderer, `MVTLayer` self-renders vector tiles (`get-*` accessors apply to tile features) |
|
|
118
119
|
| **Draw store** | `data="draw:sketch"` | live in-memory GeoJSON feature store written by `<om-widget type="draw" target="sketch">` |
|
|
119
120
|
|
|
120
121
|
Private endpoints: `OmMap.configureData({ headers, credentials, fetch })` — applied to every fetch including refreshes. Credentials stay out of markup by design. Full guide: [docs/live-data.md](docs/live-data.md).
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as ny, L as sy, M as oy, m as ay, c as ka, z as oc, a as Sd, 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, z as oc, a as Sd, 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-ppCRU8Eb.js";
|
|
2
2
|
const Cd = Math.PI / 180, gy = 180 / Math.PI;
|
|
3
3
|
function em(Pe, Q = 0) {
|
|
4
4
|
const me = Math.min(180, Pe) * Cd;
|
package/dist/data-layer.d.ts
CHANGED
|
@@ -129,6 +129,17 @@ export interface DataRequestConfig {
|
|
|
129
129
|
export declare function configureData(config: DataRequestConfig): void;
|
|
130
130
|
/** `data="draw:sketch"` — the reserved scheme for a widget-fed sketch layer (never collides with http/ws/inline). */
|
|
131
131
|
export declare function isDrawUrl(url: string): boolean;
|
|
132
|
+
/**
|
|
133
|
+
* A tile URL template (spec: "Tiled layers"). deck's `TileLayer`/`MVTLayer`
|
|
134
|
+
* (and any `TileLayer` subclass) take their `data` prop as a `{z}/{x}/{y}`
|
|
135
|
+
* template STRING — a template deck expands per tile, NOT a document to fetch
|
|
136
|
+
* and parse into rows. OnlyMapJS otherwise routes every `data` attribute
|
|
137
|
+
* through getData() (fetch → parse), so a template would be fetched literally
|
|
138
|
+
* (`…/{z}/{x}/{y}.png`) and 404; this classifier lets the parser pass it
|
|
139
|
+
* through to deck untouched instead. Same `{z}/{x}/{y}` convention terrain and
|
|
140
|
+
* basemap tile URLs already use.
|
|
141
|
+
*/
|
|
142
|
+
export declare function isTileTemplateUrl(url: string): boolean;
|
|
132
143
|
/**
|
|
133
144
|
* Push a new sketch snapshot into a `draw:<name>` store (the draw widget's
|
|
134
145
|
* DrawSession.onChange calls this). A FRESH array reference is stored so
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as E, j as S, k as R, n as N, o as h, p as w, q as O, s as W, r as x, t as I, v as B, w as _, x as P, y as k, A as $, B as z, E as v, F, H as C, I as U, J as p, K as M } from "./index-
|
|
2
|
-
import { N as $e, R as ze, _ as ve, O as Ce, P as Ue, Q as Me, S as je, T as De, U as Je, X as qe, Y as He, Z as Ve, $ as Ge, a0 as Ke, a1 as Qe, a2 as Xe, a3 as Ye, a4 as Ze, a5 as et, a6 as tt, a7 as nt, a8 as rt, a9 as at, aa as st, ab as ot } from "./index-
|
|
1
|
+
import { i as E, j as S, k as R, n as N, o as h, p as w, q as O, s as W, r as x, t as I, v as B, w as _, x as P, y as k, A as $, B as z, E as v, F, H as C, I as U, J as p, K as M } from "./index-ppCRU8Eb.js";
|
|
2
|
+
import { N as $e, R as ze, _ as ve, O as Ce, P as Ue, Q as Me, S as je, T as De, U as Je, X as qe, Y as He, Z as Ve, $ as Ge, a0 as Ke, a1 as Qe, a2 as Xe, a3 as Ye, a4 as Ze, a5 as et, a6 as tt, a7 as nt, a8 as rt, a9 as at, aa as st, ab as ot } from "./index-ppCRU8Eb.js";
|
|
3
3
|
import { g as j, i as D } from "./table-accessors-CYWTzpQI.js";
|
|
4
4
|
async function J(t, e, n = {}, r = {}) {
|
|
5
5
|
const a = E(t), s = S.getWorkerFarm(n), { source: o } = n, c = { name: a, source: o };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ai as Bt, av as Xt, aw as Yt, ax as Us } from "./index-
|
|
1
|
+
import { ai as Bt, av as Xt, aw as Yt, ax as Us } from "./index-ppCRU8Eb.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,4 +1,4 @@
|
|
|
1
|
-
import { ae as Be, af as le, ag as ce, ah as De, ai as Oe, aj as ke } from "./index-
|
|
1
|
+
import { ae as Be, af as le, ag as ce, ah as De, ai as Oe, aj as ke } from "./index-ppCRU8Eb.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";
|