@nika-js/onlymap 0.5.1 → 0.5.3
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 +2 -2
- package/dist/{LercDecode.es-BNF7PeWz.js → LercDecode.es-S6KKhkuA.js} +1 -1
- package/dist/{basemap-7GQL0KSL.js → basemap-BSCq9hHZ.js} +1 -1
- package/dist/draw-controller.d.ts +10 -1
- package/dist/geodesy.d.ts +47 -0
- package/dist/html-data.d.ts +2 -2
- package/dist/{index-BKiYWYJz.js → index-BCgjJcZn.js} +1 -1
- package/dist/{index-9W_UXlPB.js → index-BTcRCrfX.js} +2 -2
- package/dist/{index-ppCRU8Eb.js → index-BoAq5XsU.js} +46502 -46181
- package/dist/{index-ULFXRQAo.js → index-D1swbykc.js} +1 -1
- package/dist/{index-7PZgoR0X.js → index-DfNGlG_k.js} +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/{lerc-C-D0ZLmp.js → lerc-n0GaWEmL.js} +2 -2
- package/dist/measure-controller.d.ts +41 -0
- package/dist/onlymap.standalone.js +91667 -91346
- package/dist/onlymapjs.js +82 -67
- package/dist/{raster-D43jYSib.js → raster-DO-Ex2Lb.js} +2 -2
- package/dist/units.d.ts +40 -0
- package/dist/validation.d.ts +10 -0
- package/dist/version.d.ts +1 -1
- package/llms.txt +3 -1
- package/onlymapjs.html-data.json +46 -1
- package/package.json +1 -1
- package/skills/onlymapjs/SKILL.md +3 -1
- package/skills/onlymapjs/references/patterns.md +38 -0
- package/skills/onlymapjs/references/syntax.md +4 -3
|
@@ -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-BoAq5XsU.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";
|
package/dist/index.d.ts
CHANGED
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* renderer against an empty registry and never picks up the built-in.
|
|
14
14
|
*/
|
|
15
15
|
import "./widgets/built-in";
|
|
16
|
+
import "./measure-controller";
|
|
16
17
|
import "./elements/om-map";
|
|
17
18
|
import "./elements/om-layer";
|
|
18
19
|
import "./elements/om-widget";
|
|
@@ -69,6 +70,9 @@ export type { Selection } from "./selection";
|
|
|
69
70
|
export type { CameraOptions } from "./runtime-core";
|
|
70
71
|
export type { MapViewport } from "./basemap";
|
|
71
72
|
export { registerAction } from "./actions";
|
|
73
|
+
export { distanceMeters, pathLengthMeters, ringAreaMeters2, ringPerimeterMeters, ringEnclosesPole, midpoint, getMeasureRadiusMeters, setMeasureRadiusMeters, WGS84_MEAN_RADIUS_M, type LngLat, } from "./geodesy";
|
|
74
|
+
export { formatLength, formatArea, niceNumber, scaleBarStep, parseUnitSystem, UNIT_SYSTEMS, type UnitSystem } from "./units";
|
|
75
|
+
export type { MeasureMode, MeasureReadout } from "./measure-controller";
|
|
72
76
|
export type { ActionHandler } from "./actions";
|
|
73
77
|
export { validateManifestString, validateManifest } from "./validation";
|
|
74
78
|
export type { ValidationResult, ValidationEntry } from "./validation";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as a, D as s } from "./raster-
|
|
1
|
+
import { C as a, D as s } from "./raster-DO-Ex2Lb.js";
|
|
2
2
|
const D = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3
3
|
__proto__: null
|
|
4
4
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -8,7 +8,7 @@ var t;
|
|
|
8
8
|
})(t || (t = {}));
|
|
9
9
|
let l = !1;
|
|
10
10
|
async function d() {
|
|
11
|
-
const e = await import("./LercDecode.es-
|
|
11
|
+
const e = await import("./LercDecode.es-S6KKhkuA.js");
|
|
12
12
|
return l || (await e.load(), l = !0), e;
|
|
13
13
|
}
|
|
14
14
|
async function i(e, r) {
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { type UnitSystem } from "./units";
|
|
2
|
+
import type { RuntimeCore } from "./runtime-core";
|
|
3
|
+
export type MeasureMode = "distance" | "area";
|
|
4
|
+
/** Live readout dispatched as the `om-measure` event `detail` and consumed by the widget. */
|
|
5
|
+
export interface MeasureReadout {
|
|
6
|
+
mode: MeasureMode | null;
|
|
7
|
+
units: UnitSystem;
|
|
8
|
+
/** distance: total path length (m) + fixed-segment count. */
|
|
9
|
+
totalMeters: number;
|
|
10
|
+
segments: number;
|
|
11
|
+
/** area: |area| (m²) — null when < 3 vertices or the ring encloses a pole. */
|
|
12
|
+
areaMeters2: number | null;
|
|
13
|
+
perimeterMeters: number;
|
|
14
|
+
/** area readout is unavailable because the ring winds around a pole (documented limitation). */
|
|
15
|
+
poleWarning: boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare class MeasureController {
|
|
18
|
+
private readonly mapEl;
|
|
19
|
+
private readonly core;
|
|
20
|
+
private mode;
|
|
21
|
+
private units;
|
|
22
|
+
constructor(mapEl: Element, core: RuntimeCore);
|
|
23
|
+
isActive(): boolean;
|
|
24
|
+
/** measure-mode action. `distance`→line capture, `area`→polygon capture, `null`→off. */
|
|
25
|
+
setMode(mode: MeasureMode | null): void;
|
|
26
|
+
/** measure-units action. Re-render labels + readout in the new system (from the committed shape). */
|
|
27
|
+
setUnits(units: UnitSystem): void;
|
|
28
|
+
/** measure-clear action. Drop the geometry and reset the readout; tool stays selected. */
|
|
29
|
+
clear(): void;
|
|
30
|
+
private recompute;
|
|
31
|
+
/** The path/ring currently being measured: the in-progress preview (+ live cursor), else the last committed shape. */
|
|
32
|
+
private activeCoords;
|
|
33
|
+
private recomputeDistance;
|
|
34
|
+
private recomputeArea;
|
|
35
|
+
private emptyReadout;
|
|
36
|
+
private dispatch;
|
|
37
|
+
private ensureLayers;
|
|
38
|
+
private removeLayers;
|
|
39
|
+
}
|
|
40
|
+
export declare function getMeasureController(mapEl: Element, core: RuntimeCore): MeasureController;
|
|
41
|
+
export declare function peekMeasureController(mapEl: Element): MeasureController | undefined;
|