@nika-js/onlymap 0.11.11 → 0.12.0

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.
Files changed (55) hide show
  1. package/README.md +9 -3
  2. package/dist/attribute-resolution.d.ts +2 -0
  3. package/dist/{basemap-QT4ua-dL.js → basemap-CtDse0mW.js} +1514 -1462
  4. package/dist/basemap.d.ts +41 -1
  5. package/dist/cartograph.js +362 -321
  6. package/dist/cartograph.standalone.js +1995 -1914
  7. package/dist/{cityjson-k-z1r6c0.js → cityjson-DMc_dwu1.js} +1 -1
  8. package/dist/{crs-BzE_KP4M.js → crs-D5FyQfEu.js} +74 -7
  9. package/dist/{crs-ChglCB3O.js → crs-ZdDBJ2EY.js} +39 -36
  10. package/dist/data-layer.d.ts +36 -3
  11. package/dist/elements/om-map.d.ts +2 -1
  12. package/dist/geoparquet-BTHYX1ET.js +30 -0
  13. package/dist/geoparquet.d.ts +6 -7
  14. package/dist/{globe-view-BSGTUqWc.js → globe-view-KrKNOmVs.js} +11 -11
  15. package/dist/hillshade-CijRdYyU.js +209 -0
  16. package/dist/html-data.d.ts +1 -1
  17. package/dist/{ifc-DXwePQRv.js → ifc-sisRo7I7.js} +1 -1
  18. package/dist/{index-Bxue4Psc.js → index-21KGElDr.js} +9 -9
  19. package/dist/{index-DjYxw-8H.js → index-A45DtXly.js} +18 -18
  20. package/dist/{index-Dwc4s3mc.js → index-BPa2CC8T.js} +20 -20
  21. package/dist/{index-DudIuhJa.js → index-B_Vhebf7.js} +1 -1
  22. package/dist/{index-DBt_2x-w.js → index-Bfocr1_A.js} +106 -106
  23. package/dist/{index-CevWTqBO.js → index-DMc81n9B.js} +14362 -13782
  24. package/dist/{index-D1ZjhP2H.js → index-DS6VUGi6.js} +11 -11
  25. package/dist/{index-BO7MtTkn.js → index-DoGY-Vgi.js} +3 -3
  26. package/dist/{index-Bzypgr1v.js → index-eHYe06mM.js} +1 -1
  27. package/dist/index.d.ts +3 -2
  28. package/dist/ir.d.ts +6 -0
  29. package/dist/layer-registry.d.ts +21 -0
  30. package/dist/layers/warped-bitmap-layer.d.ts +27 -0
  31. package/dist/{lerc-DQuf93SN.js → lerc-DjrPALEj.js} +1 -1
  32. package/dist/onlymap.standalone.js +53019 -52455
  33. package/dist/onlymapjs.js +86 -84
  34. package/dist/parse-manifest.d.ts +12 -9
  35. package/dist/{post-process-effect-B3j_nBzy.js → post-process-effect-Be1qa2DD.js} +5 -5
  36. package/dist/programmatic.d.ts +12 -0
  37. package/dist/projection.d.ts +44 -1
  38. package/dist/{raster-pipeline-CusoihQ3.js → raster-pipeline-DspBYxwc.js} +1 -1
  39. package/dist/{raster-CvAJ-h_g.js → raster-zC3qXBrs.js} +3 -3
  40. package/dist/react/om-layer.d.ts +4 -0
  41. package/dist/react/om-map.d.ts +2 -0
  42. package/dist/react.js +225 -218
  43. package/dist/runtime-core.d.ts +24 -0
  44. package/dist/source-crs.d.ts +99 -0
  45. package/dist/{text-on-path-D9u5SYCo.js → text-on-path-D0_URrD2.js} +1 -1
  46. package/dist/{zarr-DWb_nikR.js → zarr-DopOhzfY.js} +2 -2
  47. package/docs/cartography.md +106 -1
  48. package/llms.txt +2 -1
  49. package/onlymapjs.attributes.json +2 -0
  50. package/onlymapjs.html-data.json +26 -4
  51. package/package.json +1 -1
  52. package/skills/onlymapjs/SKILL.md +4 -2
  53. package/skills/onlymapjs/references/syntax.md +16 -1
  54. package/dist/geoparquet-hOsdfZJa.js +0 -35
  55. package/dist/hillshade-D2Ps3Nim.js +0 -298
package/dist/onlymapjs.js CHANGED
@@ -1,4 +1,4 @@
1
- import { bP as e, bQ as r, bR as t, as as c, C as o, bS as i, c as n, bT as d, bU as l, bV as S, bW as E, ah as g, bX as L, bY as T, bZ as _, b_ as A, b$ as p, c0 as m, c1 as I, c2 as D, L as M, g as u, c3 as b, c4 as y, c5 as f, c6 as O, c7 as P, bE as R, c8 as C, ap as N, c9 as F, aB as h, ca as B, W as v, cb as x, aA as G, cc as U, cd as W, ce as w, cf as Y, cg as k, ch as X, ci as H, cj as K, ck as V, cl as j, cm as z, cn as J, co as q, cp as Q, cq as Z, cr as $, ak as aa, cs as sa, ct as ea, cu as ra, cv as ta, cw as ca, cx as oa, cy as ia, cz as na, cA as da, cB as la, cC as Sa, cD as Ea, aq as ga, cE as La, cF as Ta, ae as _a, cG as Aa, cH as pa, cI as ma, cJ as Ia, cK as Da, cL as Ma, cM as ua, cN as ba, cO as ya, cP as fa, cQ as Oa, cR as Pa, cS as Ra, cT as Ca, cU as Na, cV as Fa, cW as ha, cX as Ba, cY as va, cZ as xa, c_ as Ga, c$ as Ua, d0 as Wa, d1 as wa, d2 as Ya, d3 as ka, d4 as Xa, d5 as Ha, d6 as Ka, aC as Va, d7 as ja, d8 as za, d9 as Ja, da as qa, db as Qa, dc as Za, dd as $a, de as as, df as ss, dg as es, dh as rs, di as ts, dj as cs, dk as os, dl as is, dm as ns, dn as ds } from "./index-CevWTqBO.js";
1
+ import { bS as e, bT as r, bU as t, aa as c, C as o, bV as i, c as d, bW as n, bX as l, bY as S, bZ as g, as as E, b_ as L, b$ as T, c0 as _, c1 as p, c2 as A, c3 as m, c4 as I, c5 as D, L as u, g as M, c6 as y, c7 as f, c8 as b, c9 as O, ca as P, bG as C, cb as R, a3 as N, cc as F, aC as h, cd as v, W as B, ce as x, aB as G, cf as U, cg as W, ch as w, ci as Y, cj as X, ck as k, cl as H, cm as K, cn as V, co as j, cp as z, cq as J, cr as q, cs as Z, ct as $, cu as Q, cv as aa, av as sa, cw as ea, cx as ra, cy as ta, cz as ca, cA as oa, cB as ia, cC as da, cD as na, cE as la, cF as Sa, cG as ga, cH as Ea, a7 as La, cI as Ta, cJ as _a, ap as pa, cK as Aa, cL as ma, cM as Ia, cN as Da, cO as ua, cP as Ma, cQ as ya, cR as fa, cS as ba, cT as Oa, cU as Pa, cV as Ca, cW as Ra, cX as Na, cY as Fa, cZ as ha, c_ as va, c$ as Ba, d0 as xa, d1 as Ga, d2 as Ua, d3 as Wa, d4 as wa, d5 as Ya, d6 as Xa, d7 as ka, d8 as Ha, d9 as Ka, da as Va, db as ja, aD as za, dc as Ja, dd as qa, de as Za, df as $a, dg as Qa, dh as as, di as ss, dj as es, dk as rs, dl as ts, dm as cs, dn as os, dp as is, dq as ds, dr as ns, ds as ls, dt as Ss } from "./index-DMc81n9B.js";
2
2
  export {
3
3
  e as ALL_POSITION_VALUES,
4
4
  r as AUDIT_EXEMPTIONS,
@@ -6,114 +6,116 @@ export {
6
6
  c as BitmapLayer,
7
7
  o as COORDINATE_SYSTEM,
8
8
  i as CompileError,
9
- n as CompositeLayer,
10
- d as DEFAULT_AUDIT_WIDTHS,
9
+ d as CompositeLayer,
10
+ n as DEFAULT_AUDIT_WIDTHS,
11
11
  l as DEFAULT_FOLD_BREAKPOINT_PX,
12
12
  S as DRONE_SENSOR_DATABASE,
13
- E as EDGE_TOLERANCE_PX,
14
- g as EFFECT_PRESET_NAMES,
13
+ g as EDGE_TOLERANCE_PX,
14
+ E as EFFECT_PRESET_NAMES,
15
15
  L as FOLD_BOTTOM_CLEARANCE_PX,
16
16
  T as FOLD_HYSTERESIS_PX,
17
17
  _ as FOLD_SIDES,
18
- A as FOLD_SINGLE_SIDED_RATIO,
19
- p as GeoJsonLayer,
18
+ p as FOLD_SINGLE_SIDED_RATIO,
19
+ A as GeoJsonLayer,
20
20
  m as IconLayer,
21
21
  I as LEGACY_POSITION_ALIASES,
22
22
  D as LIGHTING_PRESET_NAMES,
23
- M as Layer,
24
- u as LayerExtension,
25
- b as MANAGED_SLOTS,
26
- y as MapController,
27
- f as OmMap,
23
+ u as Layer,
24
+ M as LayerExtension,
25
+ y as MANAGED_SLOTS,
26
+ f as MapController,
27
+ b as OmMap,
28
28
  O as ScatterplotLayer,
29
29
  P as ScenegraphLayer,
30
- R as SimpleMeshLayer,
31
- C as Tile3DLayer,
30
+ C as SimpleMeshLayer,
31
+ R as Tile3DLayer,
32
32
  N as TileLayer,
33
33
  F as UNIT_SYSTEMS,
34
34
  h as WGS84_MEAN_RADIUS_M,
35
- B as WIDGET_STYLE_KEY_NAMES,
36
- v as WebMercatorViewport,
35
+ v as WIDGET_STYLE_KEY_NAMES,
36
+ B as WebMercatorViewport,
37
37
  x as arrowTableToColumnar,
38
38
  G as asRows,
39
39
  U as auditLayout,
40
40
  W as badgeMode,
41
41
  w as bottomEndLiftPx,
42
42
  Y as compileExpression,
43
- k as compileFullJsAccessorBlockInSandbox,
44
- X as computeTimeline,
43
+ X as compileFullJsAccessorBlockInSandbox,
44
+ k as computeTimeline,
45
45
  H as configureBasemap,
46
- K as configureData,
47
- V as configureIfc,
48
- j as configureLicense,
49
- z as configureTelemetry,
50
- J as descriptorToIR,
51
- q as destroySandbox,
52
- Q as distanceMeters,
53
- Z as effectiveFoldBreakpointPx,
54
- $ as evaluateInSandbox,
55
- aa as expandPreset,
56
- sa as foldDrawerStyle,
57
- ea as foldPanelStyle,
58
- ra as foldSideForSlot,
59
- ta as foldToggleSlot,
60
- ca as foldToggleStyle,
61
- oa as formatArea,
62
- ia as formatLength,
46
+ K as configureCrs,
47
+ V as configureData,
48
+ j as configureIfc,
49
+ z as configureLicense,
50
+ J as configureTelemetry,
51
+ q as descriptorToIR,
52
+ Z as destroySandbox,
53
+ $ as distanceMeters,
54
+ Q as effectiveFoldBreakpointPx,
55
+ aa as evaluateInSandbox,
56
+ sa as expandPreset,
57
+ ea as foldDrawerStyle,
58
+ ra as foldPanelStyle,
59
+ ta as foldSideForSlot,
60
+ ca as foldToggleSlot,
61
+ oa as foldToggleStyle,
62
+ ia as formatArea,
63
+ da as formatLength,
63
64
  na as getBasemap,
64
- da as getEntitlements,
65
- la as getLayerSchema,
66
- Sa as getMeasureRadiusMeters,
65
+ la as getEntitlements,
66
+ Sa as getLayerSchema,
67
+ ga as getMeasureRadiusMeters,
67
68
  Ea as getRoutingProvider,
68
- ga as getTerrain,
69
- La as isBrowser,
70
- Ta as isColumnar,
71
- _a as isEffectPreset,
69
+ La as getTerrain,
70
+ Ta as isBrowser,
71
+ _a as isColumnar,
72
+ pa as isEffectPreset,
72
73
  Aa as isStoreToken,
73
- pa as lineStringLengthMeters,
74
- ma as loadIfc,
75
- Ia as loadRasterModule,
76
- Da as midpoint,
74
+ ma as lineStringLengthMeters,
75
+ Ia as loadIfc,
76
+ Da as loadRasterModule,
77
+ ua as midpoint,
77
78
  Ma as mountForTest,
78
- ua as niceNumber,
79
- ba as normalizeData,
80
- ya as parseDurationMs,
81
- fa as parseTerrainAttrs,
82
- Oa as parseUnitSystem,
83
- Pa as parseWidgetStyle,
79
+ ya as niceNumber,
80
+ fa as normalizeData,
81
+ ba as parseDurationMs,
82
+ Oa as parseTerrainAttrs,
83
+ Pa as parseUnitSystem,
84
+ Ca as parseWidgetStyle,
84
85
  Ra as pathLengthMeters,
85
- Ca as registerAction,
86
- Na as registerBasemap,
87
- Fa as registerCrs,
88
- ha as registerFormat,
86
+ Na as registerAction,
87
+ Fa as registerBasemap,
88
+ ha as registerCrs,
89
+ va as registerFormat,
89
90
  Ba as registerLayer,
90
- va as registerRoutingProvider,
91
- xa as registerSource,
92
- Ga as registerTerrain,
93
- Ua as registerWidget,
94
- Wa as registeredCrsCodes,
95
- wa as releaseDataOwner,
96
- Ya as resolveFoldBreakpointPx,
97
- ka as resolveImageOverlay,
98
- Xa as resolveLighting,
99
- Ha as resolveProjection,
100
- Ka as resolveSlot,
101
- Va as ringAreaMeters2,
102
- ja as ringEnclosesPole,
103
- za as ringPerimeterMeters,
104
- Ja as rowAt,
105
- qa as sandboxHtml,
91
+ xa as registerRoutingProvider,
92
+ Ga as registerSource,
93
+ Ua as registerTerrain,
94
+ Wa as registerWidget,
95
+ wa as registeredCrsCodes,
96
+ Ya as releaseDataOwner,
97
+ Xa as resolveCrs,
98
+ ka as resolveFoldBreakpointPx,
99
+ Ha as resolveImageOverlay,
100
+ Ka as resolveLighting,
101
+ Va as resolveProjection,
102
+ ja as resolveSlot,
103
+ za as ringAreaMeters2,
104
+ Ja as ringEnclosesPole,
105
+ qa as ringPerimeterMeters,
106
+ Za as rowAt,
107
+ $a as sandboxHtml,
106
108
  Qa as scaleBarStep,
107
- Za as setKeepBadge,
108
- $a as setMeasureRadiusMeters,
109
- as as settleLayout,
110
- ss as shouldFoldAtWidth,
111
- es as slotContainerStyle,
112
- rs as slotLayout,
113
- ts as snapshotDescriptorIR,
114
- cs as snapshotIR,
115
- os as solarAzElDegrees,
116
- is as subscribeLicense,
117
- ns as validateManifest,
118
- ds as validateManifestString
109
+ as as setKeepBadge,
110
+ ss as setMeasureRadiusMeters,
111
+ es as settleLayout,
112
+ rs as shouldFoldAtWidth,
113
+ ts as slotContainerStyle,
114
+ cs as slotLayout,
115
+ os as snapshotDescriptorIR,
116
+ is as snapshotIR,
117
+ ds as solarAzElDegrees,
118
+ ns as subscribeLicense,
119
+ ls as validateManifest,
120
+ Ss as validateManifestString
119
121
  };
@@ -7,6 +7,14 @@
7
7
  */
8
8
  import type { LayerIR } from "./ir";
9
9
  import { type DataTransportOwner } from "./data-layer";
10
+ /** One per-parse data finding: a failed `data` load, or a CRS problem. */
11
+ export interface DataDiagnostic {
12
+ severity: "error" | "warning";
13
+ element: string;
14
+ attribute: "data" | "crs";
15
+ message: string;
16
+ fix: string;
17
+ }
10
18
  export interface ParseManifestOptions {
11
19
  /**
12
20
  * IR-snapshot mode (see ir-snapshot.ts): resolve the manifest without side
@@ -27,17 +35,12 @@ export interface ParseManifestOptions {
27
35
  /** Controller/element identity for descriptor-owned transport lifetime. */
28
36
  dataOwner?: DataTransportOwner;
29
37
  /**
30
- * Receives each layer whose `data` URL failed to load, on EVERY parse — so
38
+ * Receives each layer's data diagnostics on EVERY parse — a `data` URL that
39
+ * failed to load, and the CRS stage's findings (docs/design/crs.md) — so,
31
40
  * unlike `report` (deduped once per process), the caller replaces its list
32
- * each reconcile and a fixed URL stops reporting.
41
+ * each reconcile and a fixed problem stops reporting.
33
42
  */
34
- dataLoadFailure?: (entry: {
35
- severity: "error";
36
- element: string;
37
- attribute: "data";
38
- message: string;
39
- fix: string;
40
- }) => void;
43
+ dataDiagnostic?: (entry: DataDiagnostic) => void;
41
44
  /**
42
45
  * Ground metres per millimetre of paper, overriding the map's own
43
46
  * `reference-scale`. A cartograph frame passes its georef's value, so a
@@ -1,4 +1,4 @@
1
- import { av as m, aw as h, ax as P, ay as S, az as C } from "./index-CevWTqBO.js";
1
+ import { aw as m, ax as h, ay as P, az as S, aA as C } from "./index-DMc81n9B.js";
2
2
  const x = (
3
3
  /* wgsl */
4
4
  `struct VertexInputs {
@@ -67,14 +67,14 @@ ${t.source}` }), super(e, {
67
67
  const _ = `layout(std140) uniform screenUniforms {
68
68
  vec2 texSize;
69
69
  } screen;
70
- `, F = {
70
+ `, A = {
71
71
  name: "screen",
72
72
  fs: _,
73
73
  uniformTypes: {
74
74
  texSize: "vec2<f32>"
75
75
  }
76
76
  };
77
- class A extends S {
77
+ class F extends S {
78
78
  constructor(e, t) {
79
79
  super(e, t);
80
80
  const { module: r, fs: s, id: i } = t, o = {
@@ -89,7 +89,7 @@ class A extends S {
89
89
  blendColorOperation: "add",
90
90
  blendAlphaOperation: "add"
91
91
  };
92
- this.model = new E(e, { id: i, fs: s, modules: [r, F], parameters: o });
92
+ this.model = new E(e, { id: i, fs: s, modules: [r, A], parameters: o });
93
93
  }
94
94
  render(e) {
95
95
  this._renderPass(this.device, e);
@@ -160,7 +160,7 @@ class R {
160
160
  function T(n, e, t) {
161
161
  return e.passes.map((r, s) => {
162
162
  const i = b(e, r), o = `${t}-${s}`;
163
- return new A(n, { id: o, module: e, fs: i });
163
+ return new F(n, { id: o, module: e, fs: i });
164
164
  });
165
165
  }
166
166
  const d = `#version 300 es
@@ -81,6 +81,14 @@ export interface LayerDescriptor {
81
81
  * resolve against `MapControllerOptions.referenceScale`.
82
82
  */
83
83
  transforms?: readonly TransformSpec[];
84
+ /**
85
+ * The source data's CRS (docs/design/crs.md) — the `crs` attribute's twin:
86
+ * what the coordinates ARE (`"EPSG:27700"`). Overrides the file's own
87
+ * metadata; absent, the file's metadata (a shapefile `.prj`, …) decides.
88
+ */
89
+ crs?: string;
90
+ /** A `+proj=` definition for a CRS nothing registers — the `crs-def` attribute's twin. */
91
+ crsDef?: string;
84
92
  }
85
93
  /** Camera state, both an input (options/setView) and an output (getViewState). */
86
94
  export interface CameraState {
@@ -99,6 +107,8 @@ export interface MapControllerOptions {
99
107
  basemap?: string;
100
108
  /** Publishable provider key for keyed presets (`maptiler-*`) — the `basemap-key` attribute's programmatic twin (configureBasemap covers the global case). */
101
109
  basemapKey?: string;
110
+ /** `"globe"` draws the Earth as a sphere (preview; needs a `basemap`) — the `projection` attribute's twin. Live via `setProjection`. */
111
+ projection?: "globe" | "mercator";
102
112
  /** Set false to opt out of the compact attribution control (render your own credits). */
103
113
  attribution?: boolean;
104
114
  /** Headless mode (spec: "Consumer Testing Surface") — no renderer, real projection math; for jsdom/happy-dom tests. */
@@ -322,6 +332,8 @@ export declare class MapController {
322
332
  * (none ↔ maplibre) remount seeded with the current camera.
323
333
  */
324
334
  setBasemap(basemap: string | null): void;
335
+ /** Live globe switch (docs/design/globe.md) — `"globe"` or `"mercator"`; camera and layers carry over. */
336
+ setProjection(projection: "globe" | "mercator" | null): void;
325
337
  /** Scene lighting (spec: "Scene Lighting") — swap the LightingEffect live; null restores deck's default lights. */
326
338
  setLighting(options: LightingOptions | null): void;
327
339
  /** Resolved scene-lighting IR (test inspection) — null = deck default lights. */
@@ -60,7 +60,16 @@ export interface Projection {
60
60
  export declare const METRES_PER_EQUATORIAL_DEGREE: number;
61
61
  export declare function mercatorForward([lng, lat]: LngLatPair): PlaneXY;
62
62
  export declare function mercatorInverse([x, y]: PlaneXY): LngLatPair;
63
- /** Normalize `3857` / `epsg:3857` / `EPSG::3857` to `EPSG:3857`; null when unparseable. */
63
+ /**
64
+ * Normalize the ways files and authors name a CRS to one code.
65
+ *
66
+ * `3857` / `epsg:3857` / `EPSG::3857` → `EPSG:3857`; the OGC URNs files carry
67
+ * (`urn:ogc:def:crs:EPSG::27700`, with or without a version, which is what
68
+ * a pre-RFC-7946 GeoJSON `crs` member and GML say) → `EPSG:27700`; and the
69
+ * CRS84 spellings → `EPSG:4326`, because CRS84 IS longitude/latitude and the
70
+ * data treats them alike (axis order is always longitude first in a file).
71
+ * Null when empty; anything else is returned upper-cased for the registry.
72
+ */
64
73
  export declare function normalizeCrs(raw: string | null | undefined): string | null;
65
74
  /** The CRSs served with no proj4 load at all. */
66
75
  export declare function builtinProjection(crs: string | null | undefined): Projection | null;
@@ -77,6 +86,23 @@ export declare function registerCrs(code: string, def: string | Projection): voi
77
86
  export declare function registeredCrsCodes(): string[];
78
87
  /** Formulaic UTM — the zones no table can enumerate. */
79
88
  export declare function utmDef(zone: number, hemisphere: "N" | "S"): string | null;
89
+ export declare function generatedUtmDef(num: number): string | null;
90
+ export interface CrsConfig {
91
+ /**
92
+ * Look an EPSG code up at epsg.io when it is neither bundled nor registered.
93
+ * On by default. The request goes from the reader's browser to
94
+ * `https://epsg.io/<code>.proj4`, once per code per session.
95
+ */
96
+ online?: boolean;
97
+ /** Replaces `fetch` for the lookup (tests, proxies). */
98
+ fetch?: (url: string) => Promise<Response>;
99
+ }
100
+ /** `OmMap.configureCrs({ online: false })` for air-gapped or privacy-strict hosts. */
101
+ export declare function configureCrs(config: CrsConfig): void;
102
+ /** Whether a resolution failure could have been an online miss — what the error message has to say. */
103
+ export declare function crsOnlineEnabled(): boolean;
104
+ /** Test seam: forget online results and restore the default config. */
105
+ export declare function resetCrsForTest(): void;
80
106
  /**
81
107
  * Resolve any CRS to a projection, loading proj4 only for codes without a
82
108
  * closed form. `def` is an authored `+proj=…` string for a CRS the library
@@ -87,6 +113,23 @@ export declare function utmDef(zone: number, hemisphere: "N" | "S"): string | nu
87
113
  * measures it.
88
114
  */
89
115
  export declare function resolveProjection(crs: string | null | undefined, def?: string | null): Promise<Projection | null>;
116
+ /** An EPSG code a WKT or PROJJSON definition names for itself, if any. */
117
+ export declare function authorityCode(def: string | object): string | null;
118
+ /** Whether a string is WKT rather than a code. */
119
+ export declare function isWkt(raw: string): boolean;
120
+ /**
121
+ * Resolve a CRS as a FILE states it — an EPSG code or URN, WKT (a `.prj`, a
122
+ * FlatGeobuf header) or PROJJSON (GeoParquet) — or as an author declares it,
123
+ * with an optional `+proj=` definition beside it.
124
+ *
125
+ * A definition that names its own EPSG code resolves BY that code first, so
126
+ * the same CRS reached from a `.prj` and from `crs="EPSG:27700"` is one
127
+ * projection, one cache entry and one name in messages; only a definition
128
+ * with no code, or a code nothing knows, is handed to proj4 as written.
129
+ *
130
+ * Null when nothing resolves it. Never a guess (see `resolveProjection`).
131
+ */
132
+ export declare function resolveCrs(input: string | object | null | undefined, def?: string | null): Promise<Projection | null>;
90
133
  /**
91
134
  * A projection plus the local origin everything downstream works relative to.
92
135
  *
@@ -1,5 +1,5 @@
1
1
  import { w as he } from "./mgrs-BY9bIvp4.js";
2
- import { a3 as de, bD as fe, bE as re, c as oe, bF as me, G as pe, bG as ge, aK as Z, bH as ve, N as be, bI as xe, bJ as Pe, al as Te, ap as ie } from "./index-CevWTqBO.js";
2
+ import { ad as de, bF as fe, bG as re, c as oe, bH as me, G as pe, bI as ge, aL as Z, bJ as ve, N as be, bK as xe, bL as Pe, bM as Te, a3 as ie } from "./index-DMc81n9B.js";
3
3
  import { p as ye, a as Le, h as we } from "./hillshade-shader-DI2uLSNU.js";
4
4
  function Oe(n, e, t) {
5
5
  const { projectedCorners: s } = e, { topLeft: r, topRight: o, bottomRight: i, bottomLeft: a } = s, c = t(r[0], r[1]), u = t(o[0], o[1]), l = t(i[0], i[1]), d = t(a[0], a[1]), f = [
@@ -1,7 +1,7 @@
1
- import { c as se, t as $e, i as Ct, a as ke, s as Lt, C as It, b as Gt, F as vt, A as Et, d as Ft, R as ye, e as At, p as jt, m as Rt, f as Mt, g as We, h as Ut, r as le, j as Ot, k as xt, l as Kt, n as Dt } from "./raster-pipeline-CusoihQ3.js";
1
+ import { c as se, t as $e, i as Ct, a as ke, s as Lt, C as It, b as Gt, F as vt, A as Et, d as Ft, R as ye, e as At, p as jt, m as Rt, f as Mt, g as We, h as Ut, r as le, j as Ot, k as xt, l as Kt, n as Dt } from "./raster-pipeline-DspBYxwc.js";
2
2
  import { N as Nt, c as zt } from "./hillshade-apron-Bem3DWyJ.js";
3
3
  import { r as Bt } from "./hillshade-shader-DI2uLSNU.js";
4
- import { bK as _t, bL as $t } from "./index-CevWTqBO.js";
4
+ import { bN as _t, bO as $t } from "./index-DMc81n9B.js";
5
5
  import we from "./index-CW1n5LdO.js";
6
6
  function kt(e, t) {
7
7
  const n = e.length / 3, r = new Uint8ClampedArray(n * 4), o = 0, i = n, a = n * 2;
@@ -1072,7 +1072,7 @@ j.set(f.Zstd, () => import("./zstd-jXobGRcq.js").then((e) => e.decode));
1072
1072
  j.set(f.Jpeg, () => Promise.resolve(ce));
1073
1073
  j.set(f.Jpeg6, () => Promise.resolve(ce));
1074
1074
  j.set(f.Webp, () => Promise.resolve(ce));
1075
- j.set(f.Lerc, () => import("./lerc-DQuf93SN.js").then((e) => e.decode));
1075
+ j.set(f.Lerc, () => import("./lerc-DjrPALEj.js").then((e) => e.decode));
1076
1076
  async function ue(e, t, n) {
1077
1077
  const r = j.get(t);
1078
1078
  if (!r)
@@ -35,6 +35,10 @@ export interface OmLayerProps {
35
35
  refresh?: string;
36
36
  /** Behavior under active map terrain; absent uses the layer type's default. */
37
37
  terrain?: "drape" | "offset" | "off";
38
+ /** What the data's coordinates are in (`"EPSG:27700"`), converted to longitude/latitude at load — the `crs` attribute's twin. Overrides the file's own CRS. */
39
+ crs?: string;
40
+ /** A `+proj=` definition for a CRS nothing registers — the `crs-def` attribute's twin. */
41
+ crsDef?: string;
38
42
  /** deck.gl updateTriggers — supply a changing value when an accessor's OUTPUT changes (deck ignores function identity). */
39
43
  updateTriggers?: Record<string, unknown>;
40
44
  /** Click pick on this layer (object flattened/materialized, same as ctx.selection). */
@@ -9,6 +9,8 @@ export interface OmMapProps {
9
9
  bearing?: number;
10
10
  /** Same contract as the `basemap` attribute — a preset name ("positron", "dark-matter", …), "maplibre", a style URL, or omit for standalone deck.gl. Changing it switches live (style-only changes keep camera + layers; none ↔ maplibre remounts the renderer inside the controller). */
11
11
  basemap?: string;
12
+ /** `"globe"` draws the Earth as a sphere (preview; needs a `basemap`). Changing it switches live. */
13
+ projection?: "globe" | "mercator";
12
14
  /** Publishable provider key for keyed presets (maptiler-*) — or call configureBasemap once instead. */
13
15
  basemapKey?: string;
14
16
  /** Set false to opt out of the compact attribution control. */