@nika-js/onlymap 0.3.1 → 0.3.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/README.md +7 -3
- package/dist/{LercDecode.es-CVmNpXBp.js → LercDecode.es-BMi87Jez.js} +1 -1
- package/dist/{basemap-BSb-g03Z.js → basemap-D_BgGpIa.js} +1 -1
- package/dist/{index-WeMwLoaQ.js → index-CDvm17M5.js} +1 -1
- package/dist/{index-CIEkseeV.js → index-C_zLohC_.js} +1 -1
- package/dist/{index-QSkZjzIL.js → index-CaLhpYyz.js} +1 -1
- package/dist/{index-lV5eG2Xt.js → index-DYtODPDb.js} +9900 -9971
- package/dist/{index-D67FynN5.js → index-idvzm9MK.js} +2 -2
- package/dist/{lerc-DJzRIT6z.js → lerc-DgHmuuRe.js} +2 -2
- package/dist/onlymap.standalone.js +133480 -0
- package/dist/onlymapjs.js +1 -1
- package/dist/{raster-BKf1dx54.js → raster-D-MVtlA7.js} +2 -2
- package/dist/style.css +1 -0
- package/dist/version.d.ts +1 -1
- package/llms.txt +8 -1
- package/package.json +11 -2
- package/skills/onlymapjs/SKILL.md +1 -1
- package/skills/onlymapjs/references/syntax.md +3 -2
package/README.md
CHANGED
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
**Interactive WebGL maps from plain HTML.** OnlyMapJS is a declarative mapping library built on [deck.gl](https://deck.gl), written in TypeScript, with first-class HTML and React APIs. Write a manifest — layers, widgets, popups, behaviors as custom elements — and it drives deck.gl underneath: rendering, GeoJSON/CSV/Arrow data loading, live updates, GPU picking, MapLibre basemaps, and UI, with no build step and no imperative glue code. If you've wanted a declarative deck.gl wrapper — for a geospatial dashboard, a React mapping component, or a single-file HTML map — that's the entire premise.
|
|
13
13
|
|
|
14
14
|
```html
|
|
15
|
-
<
|
|
15
|
+
<link rel="stylesheet" href="https://unpkg.com/@nika-js/onlymap/dist/onlymapjs.css">
|
|
16
|
+
<script type="module" src="https://unpkg.com/@nika-js/onlymap"></script>
|
|
16
17
|
|
|
17
18
|
<om-map center="[-122.42, 37.77]" zoom="11" basemap="maplibre">
|
|
18
19
|
<om-layer id="quakes" type="ScatterplotLayer" data="./quakes.json"
|
|
@@ -62,9 +63,12 @@ npm install @nika-js/onlymap
|
|
|
62
63
|
Or with no build step at all, straight from a CDN:
|
|
63
64
|
|
|
64
65
|
```html
|
|
65
|
-
<
|
|
66
|
+
<link rel="stylesheet" href="https://unpkg.com/@nika-js/onlymap/dist/onlymapjs.css">
|
|
67
|
+
<script type="module" src="https://unpkg.com/@nika-js/onlymap"></script>
|
|
66
68
|
```
|
|
67
69
|
|
|
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
|
+
|
|
68
72
|
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
73
|
|
|
70
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.
|
|
@@ -76,7 +80,7 @@ A handful of elements, one rule: **attributes are kebab-case versions of deck.gl
|
|
|
76
80
|
| Element | Role |
|
|
77
81
|
|---|---|
|
|
78
82
|
| `<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
|
-
| `<om-layer>` | Any of **
|
|
83
|
+
| `<om-layer>` | Any of **34 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 and the native `COGLayer` for GeoTIFF rasters. `id` required; `label`/`color` feed the legend. |
|
|
80
84
|
| `<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
85
|
| `<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
86
|
| `<om-behavior>` | Declarative interactions: `on="click|hover|drag|load|data-loaded"` → a named action. |
|
|
@@ -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-DYtODPDb.js";
|
|
2
2
|
const Cd = Math.PI / 180, gy = 180 / Math.PI;
|
|
3
3
|
function em(Pe, Q = 0) {
|
|
4
4
|
const ge = Math.min(180, Pe) * Cd;
|
|
@@ -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-DYtODPDb.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";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ai as Bt, ak as Xt, al as Yt, am as Us } from "./index-
|
|
1
|
+
import { ai as Bt, ak as Xt, al as Yt, am as Us } from "./index-DYtODPDb.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";
|