@nika-js/onlymap 0.3.0 → 0.3.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/.vscode/onlymap.code-snippets +13 -0
- package/LICENSE.md +4 -0
- package/README.md +4 -3
- package/THIRD-PARTY-LICENSES.md +7874 -0
- package/dist/{Arrow.dom-7AXne1TU.js → Arrow.dom-BNjbQ9jb.js} +23 -23
- package/dist/LercDecode.es-CVmNpXBp.js +303 -0
- package/dist/assets/LercDecode.es-BJb2dZu5.js +305 -0
- package/dist/assets/__vite-browser-external-DDArsqdc.js +29 -0
- package/dist/assets/lerc-wasm.wasm +0 -0
- package/dist/assets/lzw-BY5a_5nb.js +83 -0
- package/dist/assets/worker-DtIrTJB7.js +305 -0
- package/dist/assets/zstd-QGAv3PMm.js +383 -0
- package/dist/{basemap-DrK6zcu8.js → basemap-BSb-g03Z.js} +6228 -6247
- package/dist/{convert-arrow-schema-CvZ3cT5m.js → convert-arrow-schema-DrAihRf9.js} +31 -31
- package/dist/ctx.d.ts +3 -0
- package/dist/index-CIEkseeV.js +3108 -0
- package/dist/index-D67FynN5.js +594 -0
- package/dist/{index-C9tgnPNw.js → index-QSkZjzIL.js} +4 -4
- package/dist/index-WeMwLoaQ.js +1446 -0
- package/dist/{index-CsicbycJ.js → index-lV5eG2Xt.js} +21442 -21860
- package/dist/index.d.ts +2 -0
- package/dist/ir.d.ts +3 -0
- package/dist/layer-registry.d.ts +15 -1
- package/dist/legend-spec.d.ts +66 -0
- package/dist/lerc-DJzRIT6z.js +30 -0
- package/dist/lerc-wasm.wasm +0 -0
- package/dist/lzw-BY5a_5nb.js +83 -0
- package/dist/mgrs-BY9bIvp4.js +799 -0
- package/dist/onlymapjs.css +1 -1
- package/dist/onlymapjs.js +24 -23
- package/dist/raster-BKf1dx54.js +8843 -0
- package/dist/raster.d.ts +61 -0
- package/dist/{recordbatch-HRu0SMKp.js → recordbatch-Bpc0uxFn.js} +200 -200
- package/dist/{table-accessors-DBjWgN0C.js → table-accessors-CYWTzpQI.js} +71 -76
- package/dist/version.d.ts +1 -1
- package/dist/zstd-jXobGRcq.js +14 -0
- package/llms.txt +3 -3
- package/onlymapjs.html-data.json +23 -0
- package/package.json +18 -15
- package/skills/onlymapjs/SKILL.md +3 -1
- package/skills/onlymapjs/references/syntax.md +29 -2
- package/dist/index-CiuGqS0i.js +0 -605
- package/dist/index-DXoRERAy.js +0 -1457
- package/dist/index-Ztkd30f8.js +0 -3907
- package/dist/onlymapjs.umd.cjs +0 -8708
|
@@ -120,6 +120,19 @@
|
|
|
120
120
|
]
|
|
121
121
|
},
|
|
122
122
|
|
|
123
|
+
"!raster": {
|
|
124
|
+
"scope": "html",
|
|
125
|
+
"prefix": "!raster",
|
|
126
|
+
"description": "COGLayer — GeoTIFF/COG raster (src streams by Range request; set min/max for float data)",
|
|
127
|
+
"body": [
|
|
128
|
+
"<om-layer id=\"${1:dem}\" type=\"COGLayer\"",
|
|
129
|
+
" src=\"${2:../data/elevation.tif}\"",
|
|
130
|
+
" label=\"${3:Elevation}\"",
|
|
131
|
+
" min=\"${4:0}\" max=\"${5:1900}\" colormap=\"${6|viridis,gray,plasma,inferno,magma,cividis,rdylgn,rdbu,spectral,terrain,jet,turbo|}\"",
|
|
132
|
+
" opacity=\"0.85\"></om-layer>$0"
|
|
133
|
+
]
|
|
134
|
+
},
|
|
135
|
+
|
|
123
136
|
"!overlay": {
|
|
124
137
|
"scope": "html",
|
|
125
138
|
"prefix": "!overlay",
|
package/LICENSE.md
CHANGED
|
@@ -141,3 +141,7 @@ This Agreement, together with any applicable Order Form, is the entire agreement
|
|
|
141
141
|
## 20. Contact
|
|
142
142
|
|
|
143
143
|
For licensing questions or requests for permissions beyond this Agreement, contact Licensor through the official repository, npm package page, website, or other distribution channel for the Software.
|
|
144
|
+
|
|
145
|
+
## 21. Third-Party Software
|
|
146
|
+
|
|
147
|
+
The Software's distributed bundle includes open-source components that are not governed by this Agreement; each is licensed under its own permissive terms (MIT, ISC, BSD, Apache-2.0, or similar). The complete list of those components and the full text of their licenses is provided in the accompanying THIRD-PARTY-LICENSES.md file. Nothing in this Agreement limits any rights granted by those licenses to their respective components.
|
package/README.md
CHANGED
|
@@ -45,7 +45,7 @@ deck.gl is the best WebGL data-visualization engine there is — and OnlyMapJS i
|
|
|
45
45
|
|---|---|---|
|
|
46
46
|
| Setup | `new Deck({...})`, canvas + basemap sync wiring | one `<om-map>` element (or `<OmMap>` in React) |
|
|
47
47
|
| State | your reducers/stores drive `setProps` | the manifest **is** the state — edit an attribute, the map reconciles; undo/redo built in |
|
|
48
|
-
| Data loading | fetch + parse + reload yourself | `data="…"` — GeoJSON, CSV, Arrow/GeoArrow, Shapefile, KML, WebSocket streams, polled REST |
|
|
48
|
+
| Data loading | fetch + parse + reload yourself | `data="…"` — GeoJSON, CSV, Arrow/GeoArrow, Shapefile, KML, WebSocket streams, polled REST; GeoTIFF/COG rasters via `type="COGLayer"` |
|
|
49
49
|
| Accessors | JS functions + `updateTriggers` bookkeeping | `get-*` expressions; update triggers derived automatically |
|
|
50
50
|
| UI | build legends/popups/filters from scratch | built-in widgets, overlays, behaviors — declarative |
|
|
51
51
|
| Testing | mock WebGL or ship untested | `OmMap.validate`, IR snapshots, headless behavioral harness |
|
|
@@ -65,7 +65,7 @@ Or with no build step at all, straight from a CDN:
|
|
|
65
65
|
<script type="module" src="https://esm.sh/@nika-js/onlymap"></script>
|
|
66
66
|
```
|
|
67
67
|
|
|
68
|
-
Then `npx @nika-js/onlymap init` wires up VS Code IntelliSense and `!`-prefixed manifest snippets for your project. The library ships with
|
|
68
|
+
Then `npx @nika-js/onlymap init` wires up VS Code IntelliSense and `!`-prefixed manifest snippets for your project. The library ships with 451 unit/behavioral tests and 27 Playwright GPU tests.
|
|
69
69
|
|
|
70
70
|
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.
|
|
71
71
|
|
|
@@ -77,7 +77,7 @@ A handful of elements, one rule: **attributes are kebab-case versions of deck.gl
|
|
|
77
77
|
|---|---|
|
|
78
78
|
| `<om-map>` | The map. `center`, `zoom`, `pitch`, `bearing`; `basemap` takes a free preset (`positron`, `liberty`, `dark-matter`, `osm`, …), a style URL, or `"none"` (standalone canvas) — and switches **live**; `validate` for a live on-page error panel. |
|
|
79
79
|
| `<om-layer>` | Any of **33 layer types** by name — all of deck.gl's core, geo, aggregation, and mesh layers (Scatterplot, GeoJson, Arc, Path, Heatmap, Hexagon, Trips, Tile, Tile3D, Scenegraph, …) plus the built-in `PopupLayer` for WebGL badges/labels at scale. `id` required; `label`/`color` feed the legend. |
|
|
80
|
-
| `<om-widget>` | UI panels. Built-ins: `legend
|
|
80
|
+
| `<om-widget>` | UI panels. Built-ins: `legend` (symbology-aware: color scales render as gradient ramps or class ranges, categorical ternaries as discrete palettes), `layer-switcher`, `basemap-switcher`, `lighting`, `zoom-controls`, `undo-redo`, `scale-bar`, `attribution`, `filter`, `draw`, `vega-lite` (live charts). Or write your own inline with HTML + a `<script type="om/widget">`. Themeable from plain page CSS via custom properties: `om-map { --om-widget-bg: #111827; --om-widget-fg: #f9fafb; }` (also `-muted`, `-border`, `-hover-bg`, `-accent`). |
|
|
81
81
|
| `<om-overlay>` | Rich HTML anchored to a map location — a static `anchor="[lng, lat]"`, the current selection, or a feature's own geometry via `anchor-layer`/`anchor-feature-id`. `{{field}}` interpolates the picked feature, HTML-escaped by default. |
|
|
82
82
|
| `<om-behavior>` | Declarative interactions: `on="click|hover|drag|load|data-loaded"` → a named action. |
|
|
83
83
|
| `<om-story>` | A storyboard: `<om-step>` children fire actions on a timeline. Controlled by the `player` widget, behaviors, or `storyEl.play()/pause()/seek()`. |
|
|
@@ -107,6 +107,7 @@ Built-ins: `scale()` (types: `sequential`, `diverging`, `threshold`, `sqrt`, `lo
|
|
|
107
107
|
| **CSV / TSV** | `data="./quakes.csv"` | parsed to typed columns (lazy ~48 KB chunk); numbers auto-typed, quoted fields intact |
|
|
108
108
|
| **Shapefile** | `data="./countries.shp"` | geometry + `.dbf` attributes joined into GeoJSON features (sidecars fetched with your auth config) |
|
|
109
109
|
| **KML** | `data="./tour.kml"` | placemarks → GeoJSON features; other formats plug in via `OmMap.registerFormat` |
|
|
110
|
+
| **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 |
|
|
110
111
|
| **WebSocket stream** | `data="wss://feed" key="id" flush="250ms" source="myFormat"` | upsert-by-key, burst coalescing, auto-reconnect; decode any format via `OmMap.registerSource` |
|
|
111
112
|
| **Polled REST snapshot** | `data="/api/fleet.json" refresh="5s"` | full-snapshot replace per poll; outages keep the last good data |
|
|
112
113
|
| **Draw store** | `data="draw:sketch"` | live in-memory GeoJSON feature store written by `<om-widget type="draw" target="sketch">` |
|