@nika-js/onlymap 0.13.3 → 0.13.5
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/CHANGELOG.md +32 -0
- package/README.md +9 -5
- package/dist/actions.d.ts +12 -6
- package/dist/attribute-resolution.d.ts +32 -4
- package/dist/{basemap-5NHR6Gio.js → basemap-CErNEhX6.js} +3 -7
- package/dist/basemap.d.ts +1 -5
- package/dist/bbox-tokens.d.ts +70 -0
- package/dist/{build-DJjheWZ2.js → build-ByNIb4VX.js} +1 -1
- package/dist/{client-0mQmDog8.js → client-xe2E4jg4.js} +2 -2
- package/dist/clip-box-controller.d.ts +0 -17
- package/dist/ctx.d.ts +17 -0
- package/dist/data-layer.d.ts +15 -8
- package/dist/dom-tile-layer.d.ts +30 -0
- package/dist/draw-controller.d.ts +1 -1
- package/dist/elements/om-map.d.ts +12 -1
- package/dist/feature-service.d.ts +42 -0
- package/dist/geodesy.d.ts +6 -5
- package/dist/{geoparquet-B_nO2OyP.js → geoparquet-DOhMQl-X.js} +1 -1
- package/dist/{globe-view-BFUa9ksE.js → globe-view-84s_uNZX.js} +1 -1
- package/dist/grid-tiles.d.ts +117 -0
- package/dist/{hillshade-B_CxPhtA.js → hillshade-D8h8CRQq.js} +2 -2
- package/dist/{hillshade-shader-r7GxxjXj.js → hillshade-shader-Bm1O0P76.js} +1 -1
- package/dist/{index-YMu_yLXO.js → index-4Y4Q7RP4.js} +3 -3
- package/dist/{index-DWijIMti.js → index-BG_49YHy.js} +33543 -32098
- package/dist/index-BahtHUrg.js +8458 -0
- package/dist/{index-ChmxbIdj.js → index-DTN2CcOQ.js} +43 -43
- package/dist/{index-BvNxS6dM.js → index-DXxQu9Xi.js} +1 -1
- package/dist/{index-A1FYw2dy.js → index-D_EiGesl.js} +1 -1
- package/dist/{index-CObPGkze.js → index-DrSCLk9i.js} +22 -22
- package/dist/{index-CU7RnKnO.js → index-J_Sj6T0S.js} +32 -32
- package/dist/index-bpdGuZR6.js +478 -0
- package/dist/{index-CgIuV5Oh.js → index-phbljJTZ.js} +3 -3
- package/dist/index.d.ts +1 -1
- package/dist/ir-snapshot.d.ts +2 -0
- package/dist/ir.d.ts +18 -0
- package/dist/layer-registry.d.ts +1 -0
- package/dist/layers/warped-bitmap-layer.d.ts +14 -1
- package/dist/{lerc-Bl4vym9y.js → lerc-DLWS3sYw.js} +1 -1
- package/dist/onlymap.standalone.js +69300 -58870
- package/dist/onlymapjs.js +25 -25
- package/dist/parse-manifest.d.ts +4 -1
- package/dist/plane-gpu/plane-basemap.d.ts +237 -237
- package/dist/plane-vector/plane-mvt-layer.d.ts +237 -237
- package/dist/plane-warp.d.ts +14 -1
- package/dist/pmtiles.d.ts +76 -0
- package/dist/{post-process-effect-gFGVlC77.js → post-process-effect-CHsD0-oP.js} +1 -1
- package/dist/programmatic.d.ts +21 -1
- package/dist/{raster-1ShXyF12.js → raster-B7ILGg0X.js} +4 -4
- package/dist/{raster-pipeline-BMS54TX2.js → raster-pipeline-avMAbONM.js} +11 -11
- package/dist/react/om-layer.d.ts +4 -0
- package/dist/react.js +67 -65
- package/dist/runtime-core.d.ts +106 -4
- package/dist/serialize/emit.d.ts +2 -0
- package/dist/serialize/index.d.ts +2 -0
- package/dist/{terrain-inspect-Cndlmxig.js → terrain-inspect-FKTVm7nv.js} +1 -1
- package/dist/{text-on-path-QInco4aP.js → text-on-path-CpHM02Fs.js} +19 -18
- package/dist/tile-url.d.ts +84 -16
- package/dist/time-dimension.d.ts +25 -0
- package/dist/vector-style-CPvUSy2F.js +518 -0
- package/dist/vector-style.d.ts +59 -0
- package/dist/version.d.ts +1 -1
- package/dist/{zarr-CYD8fyBe.js → zarr-DpbT4eyF.js} +2 -2
- package/dist/zoom-gates.d.ts +60 -0
- package/docs/cartograph.md +2 -2
- package/llms.txt +4 -3
- package/onlymapjs.attributes.json +17 -0
- package/onlymapjs.html-data.json +56 -0
- package/package.json +5 -2
- package/skills/onlymapjs/SKILL.md +10 -3
- package/skills/onlymapjs/references/syntax.md +64 -7
- package/dist/index-DT5d7kFO.js +0 -459
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,38 @@ Note: npm collapsed a few closely-spaced releases — the GPX/FlatGeobuf (0.5.4)
|
|
|
8
8
|
and GeoParquet (0.5.5) work shipped to npm together as **0.5.6**, so npm's
|
|
9
9
|
version list jumps 0.5.3 → 0.5.6. Each logical version is listed here regardless.
|
|
10
10
|
|
|
11
|
+
## 0.13.5 — 2026-12-03
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
- **Show features only from a zoom level of their own.** `min-zoom-field="minzoom"` hides each row until the map is zoomed in to that row's value — big cities from the start, villages only up close. It runs on the GPU, so zooming never touches the document, undo history or `ctx.stats`. Rows with no value always show.
|
|
15
|
+
- **Keep helper layers out of the legend.** `listed="false"` leaves a layer out of the legend and layer-switcher widgets.
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
- Labels that follow a line (`TextOnPathLayer`) now honour `filter-*`.
|
|
19
|
+
- `populate` animates the right filter when an earlier `filter-fields` entry has no range.
|
|
20
|
+
- A `MapController` layer that brings its own `DataFilterExtension` now gets one sized to its filters, instead of drawing wrongly.
|
|
21
|
+
- SVG snapshots leave out layers outside their visible zoom range, as the map does.
|
|
22
|
+
|
|
23
|
+
## 0.13.4 — 2026-11-03
|
|
24
|
+
|
|
25
|
+
### Added
|
|
26
|
+
- **WMS layers in any coordinate system.** A WMS that offers no Web Mercator works with `{bbox-epsg-XXXX}` in its own CRS (`CRS=EPSG:25832&BBOX={bbox-epsg-25832}`): each tile asks for the area it covers there, with the axis order the request version expects, and the picture is warped into place.
|
|
27
|
+
- **WMTS on national grids.** Tiles published only on a national grid (swisstopo, PDOK, MML, AdV) draw with `{TileMatrix}/{TileRow}/{TileCol}` and a `tile-matrix-set` — the TileMatrixSet JSON from the service's capabilities works as is — on Web Mercator and projected maps.
|
|
28
|
+
- **Live features from WFS, OGC API Features and ArcGIS FeatureServer.** Put `{bbox-crs84}` (or `{bbox-epsg-4326}`) in a GeoJSON layer's `data` and it loads the features in view, again when the map moves elsewhere, following each service's paging up to `max-features`.
|
|
29
|
+
- **PMTiles.** `data="./tiles.pmtiles"` reads a single-file tile archive, vector or raster.
|
|
30
|
+
- **Vector tiles in their publisher's style.** `vector-style="…/style.json"` on an MVTLayer draws it with the style's colours, line widths, filters, zoom rules and labels.
|
|
31
|
+
- **Leaflet `{s}` subdomains and time-enabled WMS.** `{s}` spreads tiles across `subdomains`; `{time}` is filled from the layer's `time`, which the `time-slider` widget's new `times` mode steps through, play and scrub included.
|
|
32
|
+
- **Tile servers without cross-origin permission still show.** When a server refuses cross-origin reads but its tiles load as plain images, they are drawn that way under the map (`cors-fallback="off"` opts out).
|
|
33
|
+
- **A layer error event.** `om-layer-error` fires whenever a layer's tiles or features fail — validating or not — so a page can tell its readers a layer is missing; `MapController` has the `onLayerError` twin.
|
|
34
|
+
|
|
35
|
+
### Fixed
|
|
36
|
+
- Tile services whose addresses carry no file extension (ArcGIS caches, Google-style URLs) now draw; they used to load and show nothing.
|
|
37
|
+
- `{-y}` (TMS) tile addresses now load.
|
|
38
|
+
- The scale bar showed distances twice too long; it now measures the map's own projection, on projected maps too.
|
|
39
|
+
- `whenSettled()` now waits for tiles to finish drawing, so captures, prints and thumbnails no longer miss them.
|
|
40
|
+
- Clicking a cluster bubble now zooms exactly to where it splits, and the `expand-cluster` action works again.
|
|
41
|
+
- A layer's old tile errors are withdrawn once its `data` is fixed.
|
|
42
|
+
|
|
11
43
|
## 0.13.3 — 2026-11-02
|
|
12
44
|
|
|
13
45
|
### Added
|
package/README.md
CHANGED
|
@@ -83,7 +83,7 @@ A handful of elements, one rule: **attributes are kebab-case versions of deck.gl
|
|
|
83
83
|
| Element | Role |
|
|
84
84
|
|---|---|
|
|
85
85
|
| `<om-map>` | The map. `center`, `zoom`, `pitch`, `bearing`; `basemap` takes a free preset (`positron`, `liberty`, `dark-matter`, `osm`, `satellite`, …), a style URL, or `"none"` (standalone canvas) — and switches **live**; `validate` for a live on-page error panel. Give it a height: a custom element is `display:inline` by default, so the library injects a `display:block` default (fills a sized parent, else a 400px floor) to keep a bare map visible, but set an explicit height (`om-map { height: 100vh }`) for real layout — any height you set wins outright, including one below the floor. A map that still collapses warns in the console; `hidden` and `display:none` maps stay hidden and stay quiet. |
|
|
86
|
-
| `<om-layer>` | Any of **41 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, the native `COGLayer` for GeoTIFF rasters, `ZarrLayer` for chunked Zarr/GeoZarr rasters, `ImageOverlay` for georeferenced drone JPEGs, `BIMLayer` for BIM source files (`.ifc` today) loaded straight in the browser with no pre-conversion step, `HillshadeLayer` for shaded relief, `TextOnPathLayer` for a label that follows the line it names, and `Route`/`Tracking` for styled routes and live position tracking. `id` required; `label`/`color` feed the legend. `visible-zoom-range="[8, 14]"` gives any layer scale-dependent visibility (hidden outside min ≤ zoom < max, the standard minzoom/maxzoom convention) — the everyday GIS pattern for keeping a dense layer from swamping a zoomed-out view. |
|
|
86
|
+
| `<om-layer>` | Any of **41 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, the native `COGLayer` for GeoTIFF rasters, `ZarrLayer` for chunked Zarr/GeoZarr rasters, `ImageOverlay` for georeferenced drone JPEGs, `BIMLayer` for BIM source files (`.ifc` today) loaded straight in the browser with no pre-conversion step, `HillshadeLayer` for shaded relief, `TextOnPathLayer` for a label that follows the line it names, and `Route`/`Tracking` for styled routes and live position tracking. `id` required; `label`/`color` feed the legend. `visible-zoom-range="[8, 14]"` gives any layer scale-dependent visibility (hidden outside min ≤ zoom < max, the standard minzoom/maxzoom convention) — the everyday GIS pattern for keeping a dense layer from swamping a zoomed-out view. `min-zoom-field="minzoom"` does the same per FEATURE — each draws from the zoom in its own property, smoothly during a zoom (label staging); `listed="false"` keeps a helper layer out of the legend and layer switcher. |
|
|
87
87
|
| `<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`, `clip-box`, `zoom-controls`, `undo-redo`, `scale-bar` (metric/imperial/nautical `units`), `attribution`, `filter`, `draw` (point/line/polygon sketch capture, GeoJSON save/autosave; lines/polygons complete via double-click, touch double-tap — detected by the library itself, since iOS WebViews never synthesize `dblclick` from taps — Enter, or the toolbar's Finish button; `export-3d` adds an "Export 3D" button that clips loaded `Tile3DLayer`/`BIMLayer` content to the drawn footprint and downloads it as a portable GLB — re-framed to a local coordinate frame at the footprint's own centroid, each triangle carrying its own source color as vertex colors, no textures — or, with `export-3d="b3dm"`, the same mesh wrapped for Cesium/3D-Tiles pipelines; only currently-visible 3D Tiles/BIM layers are included — a layer hidden via `visible="false"` or the `toggle-layer` action is skipped, with a distinct console warning for "nothing loaded" vs. "everything hidden"), `measure` (geodesic distance + area + cut/fill volume — live labels, `units` toggle, an `om-measure` readout event; `modes="distance area volume"` adds a footprint-then-extrude tool: outline a polygon, double-click (double-tap on touch) to close it — it turns solid teal, ready — then drag the double-headed arrow gizmo that appears at its centroid up to fill or down to cut, reading out Cut/Fill/Net (signed, fill−cut)/Total (unsigned, cut+fill) volume plus Area/Perimeter, each labelled with its own sign convention. The math is a REAL per-cell grid integration: closing a footprint bulk-loads its covering DEM tiles, lays a metric grid in a local tangent frame at the ring centroid (cell size = the DEM's ground-sample distance; scanline point-in-polygon; bilinear, tile-seam-correct sampling; worker-offloaded), and integrates terrain-vs-base per cell — mixed cut AND fill within one footprint on undulating ground, with a published ±error (per-cell cellArea × 1.5 × GSD, summed per side), the cell size used, and a no-data warning all carried on the `om-measure` readout (`cellSizeM`/`gsdM`/`cutErrorM3`/`fillErrorM3`/`nodataFraction`). A `base-surface` attribute picks the reference surface: `custom` (default — the gizmo's draggable target plane), or boundary-derived stockpile strategies with no gizmo (`triangulated` boundary TIN, `plane` least-squares fit, `lowest`/`highest`/`average`). On `custom`, the extruded prism's own boundary hugs each corner's real ground elevation by default (so it doesn't visibly float above or sink below sloped terrain) — a "Flat target plane" toggle button appears above the readout once a footprint closes, switching that rendering to a single level plane instead (a rendering choice only; the underlying cut/fill numbers were already computed against one flat target elevation either way). Requires `terrain` on `<om-map>` — validation warns if `volume` is in `modes` with none (without terrain a flat-plane fallback runs, with no error figures — nothing honest to quote). A `profile` attribute alongside `modes` — not a mode of its own — samples elevation around a volume footprint's own perimeter as it's drawn and closed, live, and dispatches it on `om-measure`'s `profileSeries` field for a `dynamic-chart` widget to plot. Each sample is `{x: distance-from-start-m, y: elevation-m}`, and samples that ARE one of the drawn footprint's own corners additionally carry `vertexIndex` (0-based, in draw order) — so a chart can mark the real corners instead of every interpolated sample, and the widget's built-in profile chart marks each corner, labelling the first `1 · Start`. The map badges the first two vertices in draw order (`1 · Start`, `2`), which states the ring's direction outright — a start marker alone leaves clockwise vs counter-clockwise ambiguous, and the two wind to mirror-image profiles. Two badges is the minimum that fixes a direction and a constant cost regardless of how many corners the footprint has. Also volume-only: `deadband` (m³) zeroes out a Cut/Fill figure below the threshold, filtering drag noise near zero height (Cut/Fill/Net/Total are always RAW geometric volumes — deliberately unaffected by `swell`/`shrink`, so they keep answering "does this reach target elevation" regardless of what material's configured); `density` (t/m³ metric, lb/yd³ imperial) and `swell`/`shrink` (multipliers, default 1×) instead populate a separate Material section, standard Bank/Loose/Compacted earthworks convention — Adjusted Cut = raw × swell (loose/haul volume, bigger — excavating adds air voids), Adjusted Fill = raw ÷ shrink (loose/borrow volume needed, also bigger — the raw fill is already the compacted target void), plus Cut/Fill tonnage computed from the raw (not adjusted) volume, since swell/shrink change volume, not mass; the section only appears once at least one of `density`/`swell`/`shrink` is actually configured, no separate toggle. A `stale` field on the `om-measure` readout flags the brief window between a footprint committing and its elevation sample resolving, so a consumer doesn't read numbers left over from a prior footprint as current), `vega-lite` (live charts bound to a layer's data), `dynamic-chart` (the same Vega-Lite rendering, but data-driven by a live DOM event instead of a layer — `on="<event-name>"` + `series-field="<name>"` reads `event.detail[seriesField]` as the chart's `values` on every matching event, redrawing at a fixed `width`; a feature "freezes" it for free by simply omitting that field the next time it fires, no separate pause API needed), and the BIM set `ifc-browser` / `feature-inspector` / `ifc-loader` / `ifc-clash`. Or write your own inline with HTML + a `<script type="om/widget">`. Adjacent compact button widgets (`zoom-controls`, `undo-redo`, `widgets-toggle`) **auto-cluster** into one control group (opt out per widget with `cluster="false"`), and `<om-map widgets-hidden>` / the `set-widgets-visible` action / `<om-widget type="widgets-toggle">` hide all authored chrome without destroying it — provider attribution and the license badge never hide. **Placement is managed**: `position` takes one of 8 logical, RTL-aware slots (`top-start`, `top-center`, `top-end`, `center-start`, `center-end`, `bottom-start`, `bottom-center`, `bottom-end`; legacy corner names alias) — same-slot widgets stack with flush edges and a shared gap, `order` sets in-slot ordering, and `position="manual"` opts out entirely (a plain block you style yourself, even outside the map). At narrow map widths, managed widgets automatically move into accessible top/end/bottom/start drawers — at ≤640px when a row has widgets on more than one of its slots, at ≤416px when every occupied row is one-sided; `fold="never"` keeps an essential control out, `widgets-fold="off"` disables folding, and `--om-widget-fold-breakpoint` changes the map-width threshold. Provider attribution is an in-flow member of `bottom-end` and the license badge of `bottom-start`, so neither covers a widget. A slot dims automatically while an open popup covers it (`widgets-dim="off"` to disable), except slots containing required chrome. Themeable from plain page CSS via custom properties: `om-map { --om-widget-bg: #111827; --om-widget-fg: #f9fafb; }` (also `-muted`, `-border`, `-hover-bg`, `-accent`), plus layout tokens (`--om-widget-inset-x/-y`, `--om-widget-gap-x/-y`, `--om-widget-opacity`, `--om-widget-radius`) or the no-CSS sugar `<om-map widget-style="gap:10 opacity:0.9">`. |
|
|
88
88
|
| `<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`. Selection-anchored overlays scope with `layer` (one layer's picks) and `selection-type="click"`/`"hover"` (one pick type; since 0.11.8 a popup a click behavior opens already behaves as `"click"` — it stays put while the pointer moves on, until another click moves or closes it). `{{field}}` interpolates the picked feature, HTML-escaped by default; `{{z}}` is a real depth-picked elevation when some layer under the cursor set `pickable="3d"` (terrain does this itself, so hovering the ground always has one) — empty otherwise, never a misleading 0. `clip-to-map` (opt-in) hides the overlay when its own box would spill past the map viewport, not just when its anchor leaves — for small transient tips that track the cursor, where an overhanging box would otherwise inflate the page's scroll overflow and cause visible view jitter. |
|
|
89
89
|
| `<om-behavior>` | Declarative interactions: `on="click|hover|drag|load|data-loaded"` → a named action. |
|
|
@@ -133,7 +133,11 @@ Numeric timestamps are always epoch **milliseconds**, never guessed as seconds.
|
|
|
133
133
|
| **WebSocket stream** | `data="wss://feed" key="id" flush="250ms" source="myFormat"` | upsert-by-key, burst coalescing, auto-reconnect; shared while active and closed after the final descriptor owner releases it |
|
|
134
134
|
| **Polled REST snapshot** | `data="/api/fleet.json" refresh="5s"` | full-snapshot replace per poll; outages keep the last good data; removal/disposal stops polling |
|
|
135
135
|
| **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) |
|
|
136
|
-
| **WMS / quadkey tiles** | `<om-layer type="TileLayer" tile-size="512" data="…/wms?…&FORMAT=image/png&CRS=EPSG:3857&WIDTH={width}&HEIGHT={height}&BBOX={bbox-epsg-3857}">` | a raster `TileLayer` also fills `{bbox-epsg-3857}` (each tile's Web Mercator extent in metres, `minx,miny,maxx,maxy`), `{width}`/`{height}` (its `tile-size`) and `{quadkey}`, so a WMS GetMap or a Bing-style service works as tiles, on Mercator and projected maps alike
|
|
136
|
+
| **WMS / quadkey tiles** | `<om-layer type="TileLayer" tile-size="512" data="…/wms?…&FORMAT=image/png&CRS=EPSG:3857&WIDTH={width}&HEIGHT={height}&BBOX={bbox-epsg-3857}">` | a raster `TileLayer` also fills `{bbox-epsg-3857}` (each tile's Web Mercator extent in metres, `minx,miny,maxx,maxy`), `{width}`/`{height}` (its `tile-size`) and `{quadkey}`, so a WMS GetMap or a Bing-style service works as tiles, on Mercator and projected maps alike. A WMS with no Web Mercator takes `{bbox-epsg-XXXX}` in its own CRS (`CRS=EPSG:25832&BBOX={bbox-epsg-25832}`): each tile asks for the box enclosing it there, in that CRS's axis order (latitude first for EPSG:4326 under WMS 1.3.0), and the image is warped onto the tile. `{s}` spreads tiles across `subdomains` (default a, b, c); `{time}` is filled from the layer's `time`, which `<om-widget type="time-slider" layer="…" times="2024-01-01/2024-03-01/P1D">` steps (a WMS-T). Any template that does not ask for a vector format (`.pbf`, `.json`, `f=json`) is read as imagery, so addresses with no extension work too (an ArcGIS cache's `…/MapServer/tile/{z}/{y}/{x}`), as does a TMS `{-y}` row. A server that sends no `Access-Control-Allow-Origin` (or an `http://` one in an `https://` page) cannot be drawn by WebGL; when its tiles load as plain images they are shown that way, under the map (beneath every other layer, hidden while tilted or rotated, left out of exports — `cors-fallback="off"` leaves them empty instead). A failed tile is left empty and the rest draws; each cause (CORS, an HTTP status, a WMS ServiceException) is reported once per layer as an `om-layer-error` event (`detail = {layerId, severity, cause, status?, host, message, fix}`, always on) and through the validation channel (`om-validation-error`) |
|
|
137
|
+
| **WMTS on a national grid** | `<om-layer type="TileLayer" data="…/{TileMatrix}/{TileRow}/{TileCol}.png" tile-matrix-set='{"crs":"EPSG:2056", …}'>` | tiles published only on a national grid (swisstopo 2056, PDOK 28992, MML 3067, AdV 25832) — `tile-matrix-set` takes the OGC tile matrix set, the WMTS `TileMatrixSet` as GetCapabilities states it, or `{crs, origin, resolutions, tileSize}`; the level nearest the view's resolution is chosen and each tile is warped onto the map, Web Mercator or projected |
|
|
138
|
+
| **PMTiles archive** | `<om-layer type="MVTLayer" data="./tiles.pmtiles">` (or `type="TileLayer"` for raster) | one-file tile pyramids read with HTTP Range requests (`pmtiles://https://…` works too); the archive's zoom range is applied, so deep zooms overzoom; gzip-compressed archives are read, brotli and zstd are not (no browser decoder) |
|
|
139
|
+
| **Live WFS / OGC API Features / ArcGIS FeatureServer** | `<om-layer type="GeoJsonLayer" data="…/collections/roads/items?bbox={bbox-crs84}&f=json">` | an extent token in a non-tiled layer's `data` asks the service for the area in view, again when the view settles somewhere new (`{bbox-crs84}` is lon,lat — OGC API, ArcGIS `geometry=` with `inSR=4326`; `{bbox-epsg-4326}` is latitude first, as WFS 2.0 wants); WFS `STARTINDEX`, OGC API `next` links and ArcGIS `resultOffset` paging are followed up to `max-features` (default 10000; more is reported, not drawn); responses must be GeoJSON; `whenSettled()` waits for them |
|
|
140
|
+
| **Vector tiles in their publisher's style** | `<om-layer type="MVTLayer" data="…/{z}/{x}/{y}.pbf" vector-style="…/style.json">` | the style's fill, line, circle, fill-extrusion and symbol layers for its vector source (`vector-style-source` picks one), evaluated by MapLibre's own expression engine — filters, zoom functions, data expressions; labels are placed one per feature, avoiding each other by priority, in the browser's fonts. Background, raster, hillshade and heatmap layers are not drawn (reported). Web Mercator maps; for the publisher's whole map as they draw it, `basemap="…/style.json"` |
|
|
137
141
|
| **Draw store** | `data="draw:sketch"` | live in-memory GeoJSON feature store written by `<om-widget type="draw" target="sketch">` |
|
|
138
142
|
|
|
139
143
|
**Data in a local grid** — eastings/northings in British National Grid, SVY21, State Plane or any UTM zone — is converted to longitude/latitude when it loads. A file that names its CRS (a shapefile `.prj`, a FlatGeobuf or GeoParquet header, a legacy GeoJSON `crs` member) needs nothing; otherwise declare it on the layer, which also overrides the file: `<om-layer type="ScatterplotLayer" data="./sites.csv" crs="EPSG:3414" get-position="[$easting, $northing]">`. Coordinates that cannot be degrees with no CRS anywhere are a diagnostic naming the fix, never a silent layer in the ocean. The UTM zones and common national grids are bundled; any other EPSG code is fetched once from `https://epsg.io/<code>.proj4` by the reader's browser — the GeoTIFF/Zarr layers make the same lookup for their own CRS — and `OmMap.configureCrs({ online: false })` turns that off.
|
|
@@ -411,8 +415,8 @@ Two things it gets right that hand-rolled hillshades usually don't. **Tile edges
|
|
|
411
415
|
|
|
412
416
|
- **`OmMap.*`** — `validate`, `snapshotIR`, `snapshotDescriptorIR`, `resolveImageOverlay`, `registerLayer`, `registerWidget`, `registerAction`, `registerSource`, `registerFormat`, `registerBasemap`, `configureBasemap`, `configureData`, `configureTelemetry`, `configureLicense`, `getLayerSchema`
|
|
413
417
|
- **`@nika-js/onlymap/deck`** — the bundled deck.gl classes (`CompositeLayer`, `TileLayer`, …) for building custom layer types: shims must extend the same class hierarchy the core renders with, not a second installed deck.gl copy. Recipe: [docs/custom-layers.md](docs/custom-layers.md)
|
|
414
|
-
- **On a `<om-map>` element** — `ready` (promise), `flyTo(coords, zoom?)`, `getCamera()` (the camera plus where its eye is: `altitude` against sea level, `targetElevation` — the ground under the view centre — and `clearance` above the ground beneath the eye, true metres, cheap enough for every animation frame; also on `MapController`, and in the `om-view-changed` detail, which reads only DEM tiles already held — null there until a `getCamera()` call has fetched them), `setLayerVisible(id, bool)`, `getLayers()`, `emit(action, payload)`, `snapshot(opts?)` (canvas-only PNG of basemap + layers at device pixels — DOM widgets/overlays and provider attribution are NOT captured, so exports must render credits themselves; `{as: "blob"}` for files, default dataURL); `attributions()` (the basemap's providers as plain text — what an export must credit; the bubbling `om-attributions-changed` event fires when a style loads); the `om-view-changed` event fires once the camera settles (debounced; `detail` = `{longitude, latitude, zoom, pitch, bearing, origin}`, where `origin` is `"user"` for gesture-driven bursts vs `"programmatic"` for API/story moves — the echo-suppression signal for state sync) — the camera-persistence hook; the `om-map-point` event (`detail = {coordinate: [lng,lat]|null, kind: "click"|"hover"}`) fires on every click/hover with the map coordinate, including empty-map clicks picks discard — the hook for custom capture tools the built-in draw widget doesn't cover; the `om-tileset-load` event (`detail = {layerId, tileset}`) surfaces a `Tile3DLayer`'s live deck `Tileset3D` for tools that need the real tileset (e.g. region export), not the IR; `pickAt([x, y])` / `pickRect({x, y, width, height})` ask what is under a pixel or inside a screen rectangle and `unproject([x, y])` / `project([lng, lat])` convert between pixels and coordinates — queries that leave the selection, `om-map-point` and behaviors alone, with a `pickMode` property (`"authored"` | `"all"`) that lets a picker tool reach layers the author did not make `pickable` without editing the document; a `diagnostics` property that makes the map report its validation problems as `om-validation-error` events (and `getDiagnostics()` for the latest) without a `validate` attribute or panel, `data-layer` on legend and layer-switcher rows, and an overlay's `templateSource` (its template with `{{fields}}` intact) — what a host's picker reads without editing the document (0.11.7+); `document.querySelector("om-map")` is fully typed
|
|
415
|
-
- **`MapController`** — the framework-grade programmatic front-end (typed `LayerDescriptor`s → the same reconcile core, no DOM manifest): `setLayers`, `watch`, `emit`, camera methods, `injectPick`, `ready`, `snapshot`, `setEffects` (deck `Effect` instances, 1:1 — takes precedence over the document's `<om-effect>` chain while set; `null` hands the chain back), `suspend`/`resume`, an `onViewChange(view, origin)` option (the `om-view-changed` twin), plus `onMapPoint` / `onTilesetLoad` options (the `om-map-point` / `om-tileset-load` twins). Active descriptors own reference-counted fetch/poll/socket handles: layer removal, transport-option change, suspend, and destroy release them. Accessor props normally take functions; schema-declared accessors also accept restricted expression strings such as `getPosition: "[$lon, $lat]"`, which makes the descriptor JSON-safe for native/cross-process bridges. `snapshotDescriptorIR(descriptors)` resolves that lane without fetching URL data. The same `pickAt`/`pickRect`/`unproject`/`pickMode` the element has are on the controller. The React adapter rides the function form; vanilla/native hosts may use either
|
|
418
|
+
- **On a `<om-map>` element** — `ready` (promise), `flyTo(coords, zoom?)`, `getCamera()` (the camera plus where its eye is: `altitude` against sea level, `targetElevation` — the ground under the view centre — and `clearance` above the ground beneath the eye, true metres, cheap enough for every animation frame; also on `MapController`, and in the `om-view-changed` detail, which reads only DEM tiles already held — null there until a `getCamera()` call has fetched them), `setLayerVisible(id, bool)`, `getLayers()`, `emit(action, payload)`, `snapshot(opts?)` (canvas-only PNG of basemap + layers at device pixels — DOM widgets/overlays and provider attribution are NOT captured, so exports must render credits themselves; `{as: "blob"}` for files, default dataURL); `attributions()` (the basemap's providers as plain text — what an export must credit; the bubbling `om-attributions-changed` event fires when a style loads); the `om-view-changed` event fires once the camera settles (debounced; `detail` = `{longitude, latitude, zoom, pitch, bearing, origin}`, where `origin` is `"user"` for gesture-driven bursts vs `"programmatic"` for API/story moves — the echo-suppression signal for state sync) — the camera-persistence hook; the `om-map-point` event (`detail = {coordinate: [lng,lat]|null, kind: "click"|"hover"}`) fires on every click/hover with the map coordinate, including empty-map clicks picks discard — the hook for custom capture tools the built-in draw widget doesn't cover; the `om-tileset-load` event (`detail = {layerId, tileset}`) surfaces a `Tile3DLayer`'s live deck `Tileset3D` for tools that need the real tileset (e.g. region export), not the IR; the `om-layer-error` event (`detail = {layerId, severity, cause, status?, host, message, fix}`) fires once per cause when a layer's tiles fail, validating or not, so a page can tell its readers a layer is missing; `pickAt([x, y])` / `pickRect({x, y, width, height})` ask what is under a pixel or inside a screen rectangle and `unproject([x, y])` / `project([lng, lat])` convert between pixels and coordinates — queries that leave the selection, `om-map-point` and behaviors alone, with a `pickMode` property (`"authored"` | `"all"`) that lets a picker tool reach layers the author did not make `pickable` without editing the document; a `diagnostics` property that makes the map report its validation problems as `om-validation-error` events (and `getDiagnostics()` for the latest) without a `validate` attribute or panel, `data-layer` on legend and layer-switcher rows, and an overlay's `templateSource` (its template with `{{fields}}` intact) — what a host's picker reads without editing the document (0.11.7+); `document.querySelector("om-map")` is fully typed
|
|
419
|
+
- **`MapController`** — the framework-grade programmatic front-end (typed `LayerDescriptor`s → the same reconcile core, no DOM manifest): `setLayers`, `watch`, `emit`, camera methods, `injectPick`, `ready`, `snapshot`, `setEffects` (deck `Effect` instances, 1:1 — takes precedence over the document's `<om-effect>` chain while set; `null` hands the chain back), `suspend`/`resume`, an `onViewChange(view, origin)` option (the `om-view-changed` twin), plus `onMapPoint` / `onTilesetLoad` / `onLayerError` options (the `om-map-point` / `om-tileset-load` / `om-layer-error` twins). Active descriptors own reference-counted fetch/poll/socket handles: layer removal, transport-option change, suspend, and destroy release them. Accessor props normally take functions; schema-declared accessors also accept restricted expression strings such as `getPosition: "[$lon, $lat]"`, which makes the descriptor JSON-safe for native/cross-process bridges. `snapshotDescriptorIR(descriptors)` resolves that lane without fetching URL data. The same `pickAt`/`pickRect`/`unproject`/`pickMode` the element has are on the controller. The React adapter rides the function form; vanilla/native hosts may use either Layer descriptors carry the universal attributes as camelCase fields — `visibleZoomRange`, `minZoomField`, `listed: false`, `filterField`, … — and `<OmLayer>` takes the same names as props.
|
|
416
420
|
- **`getStore(token)`** — the external-store contract: per-token `{subscribe, getSnapshot}` stores (`viewport`/`selection`/`layers`/`data:<id>`) with cached immutable plain-data snapshots and `origin` tagging — directly consumable by `useSyncExternalStore` (the React adapter's own hooks ride it), MobX autoruns, Redux listeners, Zustand mirrors. ~20-line integration-tested recipes for Redux Toolkit, MobX/mobx-keystone, Zustand, and Jotai: [docs/external-stores.md](docs/external-stores.md)
|
|
417
421
|
- **Testing** — `mountForTest`, and imports are SSR-safe (importing in Node/jsdom never touches browser globals)
|
|
418
422
|
|
|
@@ -451,7 +455,7 @@ The library reports one **deployment-scoped** usage snapshot per map per page lo
|
|
|
451
455
|
|
|
452
456
|
## Not implemented yet (honestly)
|
|
453
457
|
|
|
454
|
-
Mapbox GL basemaps, depth-interleaved 3D compositing, a globe without a basemap (and text, icon and arc layers on a globe), SSE transport, `dblclick` behaviors, the typed fluent builder, and stories/draw as React components (both work via the HTML manifest). On clustering: lines and polygons are not clustered by centroid (Point data only), tiled sources (`MVTLayer`/`TileLayer`) do not cluster, and a projected (`crs=`) sheet renders a clustered layer unclustered with a warning. On cartography: relief cannot be masked to land (clipping one layer to another's geometry is layer-extension work), `contour` marches in the DEM's Mercator grid even on a projected sheet (the polylines project exactly; the sampling is what is Mercator)
|
|
458
|
+
Mapbox GL basemaps, depth-interleaved 3D compositing, a globe without a basemap (and text, icon and arc layers on a globe), SSE transport, `dblclick` behaviors, the typed fluent builder, and stories/draw as React components (both work via the HTML manifest). On clustering: lines and polygons are not clustered by centroid (Point data only), tiled sources (`MVTLayer`/`TileLayer`) do not cluster, and a projected (`crs=`) sheet renders a clustered layer unclustered with a warning. On cartography: relief cannot be masked to land (clipping one layer to another's geometry is layer-extension work), `contour` marches in the DEM's Mercator grid even on a projected sheet (the polylines project exactly; the sampling is what is Mercator). On data in a local grid: datum shifts are the standard seven-parameter ones, good to a few metres — correction grids (OSTN15, NTv2) are not shipped — and `configureCrs({ online: false })` does not yet govern the GeoTIFF/Zarr layers' own EPSG lookup. On React Native (`@nika-js/onlymap-native`): stories, draw, widgets, and overlays as native components (build native UI beside the map instead), and bare (non-Expo) React Native until its `0.2.0`. On `pick-features`: instanced (i3dm) tiles keep tile-granularity picking, and `feature-styles`' `opacity` below 1 is still being validated. On BIM: clash detection is bounding-box only (no mesh-level test, and it cannot tell a resolved penetration from a collision), there is no BCF export, no equivalent of Navisworks' Auto Reveal, and prepared tilesets converted before the `bbox*` columns existed cannot take part in a clash pass — `strength` tinting and `opacity: 0` (hide, a shader discard) work. On the measure widget's `volume` mode: the per-cell grid integration measures against the map's active terrain DEM only — measuring against an imported design surface or a previous survey (period-over-period reconciliation) and a cut/fill heat-map overlay are not implemented yet, and a snapped footprint vertex takes the matched feature's horizontal position only — its exact elevation is not threaded through (see **XY snapping** above).
|
|
455
459
|
|
|
456
460
|
## Going deeper
|
|
457
461
|
|
package/dist/actions.d.ts
CHANGED
|
@@ -94,17 +94,23 @@ export interface PopulateSweep {
|
|
|
94
94
|
lo: number;
|
|
95
95
|
hi: number;
|
|
96
96
|
accessorPatch?: Record<string, unknown>;
|
|
97
|
-
/**
|
|
98
|
-
|
|
97
|
+
/**
|
|
98
|
+
* A packed filter (more than one GPU slot): every slot's range as the layer
|
|
99
|
+
* built it, and which slot the sweep moves. The others hold still each
|
|
100
|
+
* frame — authored dimensions at their ranges, rangeless ones open, the
|
|
101
|
+
* min-zoom slot at whatever the camera gate sets.
|
|
102
|
+
*/
|
|
103
|
+
packed?: {
|
|
104
|
+
ranges: [number, number][];
|
|
105
|
+
slot: number;
|
|
106
|
+
};
|
|
99
107
|
}
|
|
100
108
|
export declare function preparePopulateSweep(payload: Record<string, unknown>, ir: LayerIR): PopulateSweep | null;
|
|
101
109
|
/**
|
|
102
110
|
* The populate sweep's per-frame patch: the accessor patch (same references
|
|
103
111
|
* every frame — the buffer computes once, keyed by its trigger) plus the
|
|
104
|
-
* swept upper bound.
|
|
105
|
-
*
|
|
106
|
-
* swept dimension's range first, matching `ir.filter[0]`'s position, then
|
|
107
|
-
* the rest fixed at their authored ranges.
|
|
112
|
+
* swept upper bound. On a packed filter `filterRange` must be the FULL packed
|
|
113
|
+
* array (deck.gl's own multi-dimension shape), with only the swept slot moving.
|
|
108
114
|
*/
|
|
109
115
|
export declare function populateSweepFrame(sweep: PopulateSweep, t01: number): Record<string, unknown>;
|
|
110
116
|
/** Timestamp range of a TripsLayer's data via its own compiled getTimestamps accessor — the trace sweep's domain (shared by both trace clocks). */
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import type { LayerMeta, LayerFilter, LayerCategoryFilter, LayerData } from "./ir";
|
|
1
|
+
import type { LayerMeta, LayerFilter, LayerCategoryFilter, LayerData, MinZoomGate } from "./ir";
|
|
2
|
+
export type { MinZoomGate } from "./ir";
|
|
3
|
+
export { gateMinZoomProps, minZoomValue, MIN_ZOOM_FLOOR, zoomInVisibleRange } from "./zoom-gates";
|
|
2
4
|
import type { LayerSchema, PropDescriptor } from "./layer-registry";
|
|
3
5
|
import type { Shape } from "./expr";
|
|
4
6
|
/** Sweeps the shared caches down to exactly the keys still referenced by the current manifest (Q4). */
|
|
@@ -51,11 +53,32 @@ export declare const CLASSIFY_ATTRS: Set<string>;
|
|
|
51
53
|
* The gate composes with (never overrides) authored `visible`.
|
|
52
54
|
*/
|
|
53
55
|
export declare const ZOOM_VISIBILITY_ATTR = "visible-zoom-range";
|
|
56
|
+
/**
|
|
57
|
+
* Per-FEATURE minimum zoom (public issue #25) — a universal layer attribute:
|
|
58
|
+
* `min-zoom-field="minzoom"` draws a row only while the camera zoom is at or
|
|
59
|
+
* above that row's value (inclusive, like the min end of
|
|
60
|
+
* `visible-zoom-range`, and against the exact fractional zoom). Rows whose
|
|
61
|
+
* value is missing, null or not a number are always drawn.
|
|
62
|
+
*
|
|
63
|
+
* It is a PRESENTATION gate, not a data filter: it rides one extra numeric
|
|
64
|
+
* slot of the always-mounted DataFilterExtension (appended after the
|
|
65
|
+
* authored `filter-*` dimensions, so it shares their 4-slot ceiling), but it
|
|
66
|
+
* never appears in `ir.filter` — `ctx.layers[].filter`, the filter widget and
|
|
67
|
+
* `ctx.stats` see only what the author filtered. The slot's range is set from
|
|
68
|
+
* the live camera in `buildLayers` (see `gateMinZoomProps`), never written to
|
|
69
|
+
* the document.
|
|
70
|
+
*/
|
|
71
|
+
export declare const MIN_ZOOM_FIELD_ATTR = "min-zoom-field";
|
|
72
|
+
/**
|
|
73
|
+
* The authored min-zoom field once the layer type and the cluster toggle have
|
|
74
|
+
* had their say — undefined (with one console warning) where it cannot apply.
|
|
75
|
+
* Both front-ends call it before `applyFilterWiring`, with the resolved props
|
|
76
|
+
* (the `cluster` toggle is still in them at that point).
|
|
77
|
+
*/
|
|
78
|
+
export declare function effectiveMinZoomField(raw: string | undefined, type: string, props: Record<string, unknown>, clusters: boolean | undefined, warnLabel: string): string | undefined;
|
|
54
79
|
/** Pure coercion (no console) — validation.ts shares it so validate() reports the same malformed shapes structurally. */
|
|
55
80
|
export declare function coerceVisibleZoomRange(raw: unknown): [number, number] | undefined;
|
|
56
81
|
export declare function parseVisibleZoomRange(raw: unknown, warnLabel: string): [number, number] | undefined;
|
|
57
|
-
/** The gate itself — min inclusive, max exclusive (minzoom/maxzoom convention). */
|
|
58
|
-
export declare function zoomInVisibleRange(range: [number, number], zoom: number): boolean;
|
|
59
82
|
/** Layer types whose deck class strokes a path, so PathStyleExtension's dash takes effect (GeoJsonLayer/PolygonLayer dash their line/stroke sublayers). */
|
|
60
83
|
export declare const DASH_CAPABLE_LAYERS: Set<string>;
|
|
61
84
|
/** A ValidationEntry-compatible shape, structural to avoid the validation.ts import cycle. */
|
|
@@ -125,6 +148,8 @@ export interface LayerFilterSpec {
|
|
|
125
148
|
filterCategoryField?: string;
|
|
126
149
|
filterCategories?: unknown[];
|
|
127
150
|
filterCategoryFields?: LayerCategoryFilterFieldSpec[];
|
|
151
|
+
/** `min-zoom-field` (public issue #25) — not a filter dimension of `ir.filter`, but it takes a slot of the same extension. */
|
|
152
|
+
minZoomField?: string;
|
|
128
153
|
}
|
|
129
154
|
/** One categorical filter dimension, already-coerced. `categories` absent = declared but not yet ranged, mirroring the numeric case — dropped from the active filter with a warning, since deck.gl's category mechanism has no "wide open" value to fall back to (unlike a numeric [-Infinity, Infinity] range). */
|
|
130
155
|
export interface LayerCategoryFilterFieldSpec {
|
|
@@ -211,6 +236,8 @@ export declare function parseFilterCategoryFieldsAttr(raw: string, warnLabel: st
|
|
|
211
236
|
export interface LayerFilterResult {
|
|
212
237
|
filter?: LayerFilter;
|
|
213
238
|
categoryFilter?: LayerCategoryFilter;
|
|
239
|
+
/** Present when `min-zoom-field` got its slot. */
|
|
240
|
+
minZoom?: MinZoomGate;
|
|
214
241
|
}
|
|
215
242
|
export declare function applyFilterWiring(props: Record<string, unknown>, updateTriggers: Record<string, string>, shape: Shape, spec: LayerFilterSpec, warnLabel: string): LayerFilterResult;
|
|
216
243
|
/**
|
|
@@ -272,6 +299,7 @@ export interface ResolvedAttributes {
|
|
|
272
299
|
filter?: LayerFilter;
|
|
273
300
|
/** The layer's active categorical filter, if `filter-category`/`filter-category-fields` are present. */
|
|
274
301
|
categoryFilter?: LayerCategoryFilter;
|
|
302
|
+
/** `min-zoom-field`'s slot, when authored and there was room for it. */
|
|
303
|
+
minZoom?: MinZoomGate;
|
|
275
304
|
}
|
|
276
305
|
export declare function resolveLayerAttributes(el: Element, schema: LayerSchema, shape: Shape): ResolvedAttributes;
|
|
277
|
-
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as iy } from "./globe-view-
|
|
1
|
+
import { b6 as Y_, N as Ou, H as Id, k as K_, b7 as J_, b8 as Q_, D as Yf, Z as ey, b9 as ty } from "./index-BG_49YHy.js";
|
|
2
|
+
import { a as iy } from "./globe-view-84s_uNZX.js";
|
|
3
3
|
const ry = /* @__PURE__ */ new Set(["tile.openstreetmap.org", "a.tile.openstreetmap.org", "b.tile.openstreetmap.org", "c.tile.openstreetmap.org"]);
|
|
4
4
|
function ny(Me) {
|
|
5
5
|
let Q;
|
|
@@ -25095,7 +25095,7 @@ class by {
|
|
|
25095
25095
|
markBusy() {
|
|
25096
25096
|
this.idleLatch = !1;
|
|
25097
25097
|
}
|
|
25098
|
-
/** The overlay's internal Deck instance — the hover-pick gate wraps its pointermove handler (issue #31)
|
|
25098
|
+
/** The overlay's internal Deck instance — the hover-pick gate wraps its pointermove handler (issue #31), and RuntimeCore reads its live layers off it. */
|
|
25099
25099
|
getOverlayDeckInternal() {
|
|
25100
25100
|
return this.overlay._deck;
|
|
25101
25101
|
}
|
|
@@ -25111,10 +25111,6 @@ class by {
|
|
|
25111
25111
|
getCanvasElement() {
|
|
25112
25112
|
return this.map.getCanvas();
|
|
25113
25113
|
}
|
|
25114
|
-
/** The overlay deck's live layers — whenSettled's readiness gate (issue #37). */
|
|
25115
|
-
getDeckLayers() {
|
|
25116
|
-
return this.overlay._deck?.getLayers?.();
|
|
25117
|
-
}
|
|
25118
25114
|
/** One forced draw of both canvases (no capture) — whenSettled's "at least one completed render" guarantee (issue #37). */
|
|
25119
25115
|
forceRepaint() {
|
|
25120
25116
|
this.overlay._deck?.redraw("onlymapjs-settle"), this.map.triggerRepaint();
|
package/dist/basemap.d.ts
CHANGED
|
@@ -80,7 +80,7 @@ export declare class MapLibreBasemapAdapter {
|
|
|
80
80
|
isIdle(): boolean;
|
|
81
81
|
/** Camera writes from OUR side must clear the latch immediately — the map's own movestart fires a tick later, and a settle read in that gap would see stale idle. */
|
|
82
82
|
private markBusy;
|
|
83
|
-
/** The overlay's internal Deck instance — the hover-pick gate wraps its pointermove handler (issue #31)
|
|
83
|
+
/** The overlay's internal Deck instance — the hover-pick gate wraps its pointermove handler (issue #31), and RuntimeCore reads its live layers off it. */
|
|
84
84
|
getOverlayDeckInternal(): unknown;
|
|
85
85
|
/**
|
|
86
86
|
* Programmatic picking (docs/design/pick-api.md) — the overlay forwards
|
|
@@ -90,10 +90,6 @@ export declare class MapLibreBasemapAdapter {
|
|
|
90
90
|
getPickerInternal(): Pick<MapboxOverlay, "pickObject" | "pickMultipleObjects" | "pickObjects"> | undefined;
|
|
91
91
|
/** The MapLibre canvas — the pick-cursor affordance writes its cursor style (issue #33). */
|
|
92
92
|
getCanvasElement(): HTMLElement;
|
|
93
|
-
/** The overlay deck's live layers — whenSettled's readiness gate (issue #37). */
|
|
94
|
-
getDeckLayers(): {
|
|
95
|
-
isLoaded: boolean;
|
|
96
|
-
}[] | undefined;
|
|
97
93
|
/** One forced draw of both canvases (no capture) — whenSettled's "at least one completed render" guarantee (issue #37). */
|
|
98
94
|
forceRepaint(): void;
|
|
99
95
|
/** Snapshot capture queue for the overlay's deck canvas — see captureComposite. */
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Extent tokens in a URL template: `{bbox-epsg-XXXX}` (any EPSG code) and
|
|
3
|
+
* `{bbox-crs84}`, filled with an extent given in longitude/latitude.
|
|
4
|
+
*
|
|
5
|
+
* A box in another CRS is the ENCLOSING box of the extent's boundary,
|
|
6
|
+
* densified and projected: a Mercator tile's edges are curves in a national
|
|
7
|
+
* grid, so its four corners alone would cut the image short.
|
|
8
|
+
*
|
|
9
|
+
* Axis order follows the request's own rules, which are the reason this is
|
|
10
|
+
* more than a projection:
|
|
11
|
+
* - `{bbox-epsg-XXXX}` is written in the CRS's EPSG axis order, as WMS 1.3.0
|
|
12
|
+
* and WFS 1.1/2.0 require: latitude first for a geographic CRS
|
|
13
|
+
* (EPSG:4326 → minLat,minLon,maxLat,maxLon), easting first for a
|
|
14
|
+
* projected one. Except in a WMS 1.1.1 or WFS 1.0.0 request, which is
|
|
15
|
+
* always x,y (`SRS=` gives 1.1.1 away).
|
|
16
|
+
* - `{bbox-crs84}` is always longitude first — what OGC API Features `bbox=`
|
|
17
|
+
* and an ArcGIS `geometry=` with `inSR=4326` read.
|
|
18
|
+
* (`{bbox-epsg-3857}` for a tile is filled exactly from the tile index in
|
|
19
|
+
* tile-url.ts; here it is the view's extent in Web Mercator metres.)
|
|
20
|
+
*/
|
|
21
|
+
import { type LngLatPair } from "./projection";
|
|
22
|
+
/**
|
|
23
|
+
* A fresh extent-token pattern per use. A shared `/g` RegExp carries
|
|
24
|
+
* `lastIndex` between calls — `.test()` leaves it past a match and
|
|
25
|
+
* `matchAll` starts from it — so one caller's test made the next caller miss
|
|
26
|
+
* the token.
|
|
27
|
+
*/
|
|
28
|
+
export declare const bboxTokenPattern: () => RegExp;
|
|
29
|
+
/** A lng/lat extent: west, south, east, north. */
|
|
30
|
+
export type LngLatExtent = [number, number, number, number];
|
|
31
|
+
/** A box in some CRS's own units, x then y: minx, miny, maxx, maxy. */
|
|
32
|
+
export type CrsBox = [number, number, number, number];
|
|
33
|
+
/** The CRS codes a template's extent tokens name, e.g. ["EPSG:2056", "CRS:84"]. */
|
|
34
|
+
export declare function bboxTokenCodes(template: string): string[];
|
|
35
|
+
/** Does the template carry an extent token other than the tile-exact `{bbox-epsg-3857}`? */
|
|
36
|
+
export declare function hasCrsBboxTokens(template: string | string[] | null | undefined): boolean;
|
|
37
|
+
/** A WMS 1.1.1 or WFS 1.0.0 request, whose boxes are x,y whatever the CRS. */
|
|
38
|
+
export declare function legacyAxisOrder(template: string): boolean;
|
|
39
|
+
export interface BboxProjector {
|
|
40
|
+
code: string;
|
|
41
|
+
/** Degrees on both axes: written latitude first in EPSG order. */
|
|
42
|
+
geographic: boolean;
|
|
43
|
+
forward(lngLat: LngLatPair): [number, number];
|
|
44
|
+
inverse(xy: [number, number]): LngLatPair;
|
|
45
|
+
}
|
|
46
|
+
/** The projector for a code (EPSG:XXXX or CRS:84), resolved once per page — proj4 definitions may be fetched. */
|
|
47
|
+
export declare function bboxProjector(code: string): Promise<BboxProjector | null>;
|
|
48
|
+
/** Every projector a template needs, or the codes that could not be resolved. */
|
|
49
|
+
export declare function bboxProjectorsFor(template: string): Promise<{
|
|
50
|
+
projectors: Map<string, BboxProjector>;
|
|
51
|
+
missing: string[];
|
|
52
|
+
}>;
|
|
53
|
+
/**
|
|
54
|
+
* The enclosing box, in the projector's CRS, of a lng/lat extent: its
|
|
55
|
+
* boundary densified (`samples` points per edge) and projected. Points the
|
|
56
|
+
* projection cannot place are skipped; null when none can be.
|
|
57
|
+
*/
|
|
58
|
+
export declare function enclosingBox(projector: BboxProjector, extent: LngLatExtent, samples?: number): CrsBox | null;
|
|
59
|
+
/** A box written for a request: EPSG axis order (latitude first for geographic) unless the request is x,y. */
|
|
60
|
+
export declare function formatBox(box: CrsBox, projector: BboxProjector, xyOrder: boolean): string;
|
|
61
|
+
/**
|
|
62
|
+
* Fill every extent token in a template from a lng/lat extent. Tokens whose
|
|
63
|
+
* projector is missing are left as they are (the caller reports why).
|
|
64
|
+
* Returns the filled URL and, per code, the box it used — what a warp needs
|
|
65
|
+
* to place the image the service returns.
|
|
66
|
+
*/
|
|
67
|
+
export declare function fillBboxTokens(template: string, extent: LngLatExtent, projectors: ReadonlyMap<string, BboxProjector>): {
|
|
68
|
+
url: string;
|
|
69
|
+
boxes: Map<string, CrsBox>;
|
|
70
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { aq as q, ar as T, as as B, at as E, au as j } from "./index-
|
|
1
|
+
import { aq as q, ar as T, as as B, at as E, au as j } from "./index-BG_49YHy.js";
|
|
2
2
|
const N = (l) => Number.isFinite(l[0]) && Number.isFinite(l[1]);
|
|
3
3
|
function O(l, t, s) {
|
|
4
4
|
const o = T(s.x, s.y, s.z), i = 8, n = [];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { aB as _ } from "./index-
|
|
1
|
+
import { aB as _ } from "./index-BG_49YHy.js";
|
|
2
2
|
const c = `function Ie(t) {
|
|
3
3
|
t("EPSG:4326", "+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"), t("EPSG:4269", "+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"), t("EPSG:3857", "+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs");
|
|
4
4
|
for (var i = 1; i <= 60; ++i)
|
|
@@ -6869,7 +6869,7 @@ async function E(e, t, n, i) {
|
|
|
6869
6869
|
});
|
|
6870
6870
|
}
|
|
6871
6871
|
async function f(e, t, n, i) {
|
|
6872
|
-
const { buildPlaneTile: s } = await import("./build-
|
|
6872
|
+
const { buildPlaneTile: s } = await import("./build-ByNIb4VX.js");
|
|
6873
6873
|
return s(e, t, n, (a, r) => i.toPlane([a, r]), (a, r) => i.fromPlane([a, r]));
|
|
6874
6874
|
}
|
|
6875
6875
|
export {
|
|
@@ -1,20 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Clip box controller (spec: issue #34 §"Cutting / Clipping" — visible,
|
|
3
|
-
* draggable box). `clip-box.ts` owns the pure shader/patch math; this file
|
|
4
|
-
* owns the DOM-touching half: a wireframe box + 6 face-handle gizmos so the
|
|
5
|
-
* box is something you can SEE and GRAB, not just type numbers into. Same
|
|
6
|
-
* architecture as `measure-controller.ts`'s volume-mode height gizmo (real
|
|
7
|
-
* `<om-layer>` elements driven by `core.patchAnimatedProps` on the per-frame
|
|
8
|
-
* channel) — generalized from that gizmo's one hardcoded vertical axis to 6
|
|
9
|
-
* axis-constrained handles (one per box face), since a face can move along
|
|
10
|
-
* lng, lat, OR elevation depending on which one it is.
|
|
11
|
-
*
|
|
12
|
-
* Owned per `<om-map>` (the draw/measure precedent) and kept alive for as
|
|
13
|
-
* long as a clip box is configured, independent of whether the `clip-box`
|
|
14
|
-
* widget is even mounted — set clip-box-min/max programmatically and the
|
|
15
|
-
* wireframe still shows up, the same way the box itself still clips content
|
|
16
|
-
* with no widget present.
|
|
17
|
-
*/
|
|
18
1
|
import type { PickingInfo } from "@deck.gl/core";
|
|
19
2
|
import type { RuntimeCore, GizmoDragEvent } from "./runtime-core";
|
|
20
3
|
export declare class ClipBoxController {
|
package/dist/ctx.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ import type { LayerIR, LayerFilter, LayerCategoryFilter } from "./ir";
|
|
|
9
9
|
import type { RuntimeCore } from "./runtime-core";
|
|
10
10
|
import type { Selection } from "./selection";
|
|
11
11
|
import { type Stats } from "./stats";
|
|
12
|
+
import type { MapViewport } from "./basemap";
|
|
12
13
|
import type { LegendSpec } from "./legend-spec";
|
|
13
14
|
export interface LayerMetaSnapshot {
|
|
14
15
|
id: string;
|
|
@@ -23,8 +24,12 @@ export interface LayerMetaSnapshot {
|
|
|
23
24
|
filter?: LayerFilter;
|
|
24
25
|
/** The layer's active categorical filter, if any — independent of `filter`, read by the built-in `filter` widget's categorical mode. */
|
|
25
26
|
categoryFilter?: LayerCategoryFilter;
|
|
27
|
+
/** The layer's `time` — what its `{time}` tile token is filled with — read by the `time-slider` widget's `times` mode. */
|
|
28
|
+
time?: string;
|
|
26
29
|
/** `cluster="true"` is on (docs/design/clustering.md) — the legend adds a bubble row so the count circles are explained. */
|
|
27
30
|
cluster?: boolean;
|
|
31
|
+
/** `listed="false"`: a helper layer the legend and layer-switcher skip. It is still a scene member — here, toggleable, filterable. Absent = listed. */
|
|
32
|
+
listed?: false;
|
|
28
33
|
}
|
|
29
34
|
export interface DataOpts {
|
|
30
35
|
/** Set `false` to bypass the layer's active declarative filter (spec: "Filter-aware stats & data (the coherence rule)"). Default `true`. */
|
|
@@ -36,6 +41,8 @@ export interface RuntimeContext {
|
|
|
36
41
|
bounds: [[number, number], [number, number]];
|
|
37
42
|
zoom: number;
|
|
38
43
|
center: [number, number];
|
|
44
|
+
/** Ground metres per CSS pixel across the view centre, measured through the map's own projection (any crs, any latitude) — what a scale bar draws. */
|
|
45
|
+
metersPerPixel: number;
|
|
39
46
|
project(lngLat: [number, number]): [number, number];
|
|
40
47
|
};
|
|
41
48
|
selection: Selection | null;
|
|
@@ -70,6 +77,16 @@ export interface BuildCtxDeps {
|
|
|
70
77
|
}
|
|
71
78
|
/** `ctx.viewport.bounds` / the `viewport` external-store snapshot — one bounds derivation (incl. the world-extent fallback) for both (spec: "External-Store Contract"). */
|
|
72
79
|
export declare function viewportBounds(viewport: ReturnType<RuntimeCore["getViewport"]>): [[number, number], [number, number]];
|
|
80
|
+
/**
|
|
81
|
+
* Ground metres per CSS pixel across the view centre: the geodesic distance
|
|
82
|
+
* between two screen points either side of it, so it holds on a projected
|
|
83
|
+
* sheet, a globe and at any latitude. Falls back to Web Mercator's formula
|
|
84
|
+
* before there is a viewport, or when the centre row leaves the ground.
|
|
85
|
+
*/
|
|
86
|
+
export declare function centreMetersPerPixel(viewport: MapViewport | undefined, viewState: {
|
|
87
|
+
latitude: number;
|
|
88
|
+
zoom: number;
|
|
89
|
+
}): number;
|
|
73
90
|
/** `ctx.layers` / the `layers` external store — one builder for both (spec: "External-Store Contract"). */
|
|
74
91
|
export declare function buildLayerMetas(layerIRs: ReadonlyMap<string, LayerIR>): LayerMetaSnapshot[];
|
|
75
92
|
/** Built fresh on every widget-render invocation — never mutated, never reused. */
|
package/dist/data-layer.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { LngLatExtent } from "./bbox-tokens";
|
|
1
2
|
import type { Shape, ColumnarData, LayerData } from "./ir";
|
|
2
3
|
export declare function isColumnar(data: LayerData): data is ColumnarData;
|
|
3
4
|
/** `Array` as-is, or a FeatureCollection's `.features`, or a lone object wrapped in an array. */
|
|
@@ -140,6 +141,8 @@ export interface StreamOptions {
|
|
|
140
141
|
refresh?: string;
|
|
141
142
|
/** The layer's declared `crs`, handed to a format's `parse` (docs/design/crs.md §3.4). */
|
|
142
143
|
crs?: string;
|
|
144
|
+
/** A view-filled feature request's cap (`max-features`; feature-service.ts). */
|
|
145
|
+
maxFeatures?: number;
|
|
143
146
|
}
|
|
144
147
|
/**
|
|
145
148
|
* Request configuration for every `data` URL the Data Layer fetches
|
|
@@ -185,15 +188,19 @@ export declare function setDrawData(url: string, features: readonly unknown[]):
|
|
|
185
188
|
/** Current snapshot for a draw store (autosave / save-to-file read the source of truth here). */
|
|
186
189
|
export declare function getDrawData(url: string): LayerData;
|
|
187
190
|
/**
|
|
188
|
-
*
|
|
189
|
-
*
|
|
190
|
-
*
|
|
191
|
-
* Data"), or binds a `draw:` sketch store (spec: "Manual Drawing") — on first
|
|
192
|
-
* call for a given URL, and invokes `onLoaded` on every resolution/flush (the
|
|
193
|
-
* caller re-reconciles from there).
|
|
191
|
+
* The map's settled view, in lng/lat — every view-filled source the map owns
|
|
192
|
+
* re-requests if the view has left what it fetched. Called by the map when
|
|
193
|
+
* its camera settles (and once it has a viewport).
|
|
194
194
|
*/
|
|
195
|
-
|
|
196
|
-
|
|
195
|
+
export declare function setDataView(owner: DataTransportOwner, extent: LngLatExtent): void;
|
|
196
|
+
/** Resolves once every view-filled request the map has in flight has landed (whenSettled waits on it). */
|
|
197
|
+
export declare function viewDataIdle(owner: DataTransportOwner): Promise<void>;
|
|
198
|
+
/** A view-filled source's state for diagnostics: its last failure, and whether the view held more than its cap. */
|
|
199
|
+
export declare function viewDataState(url: string, opts: StreamOptions, owner?: DataTransportOwner): {
|
|
200
|
+
error?: unknown;
|
|
201
|
+
capped: boolean;
|
|
202
|
+
maxFeatures: number;
|
|
203
|
+
} | null;
|
|
197
204
|
export declare function dataLoadError(url: string, opts?: StreamOptions): string | null;
|
|
198
205
|
export declare function getData(url: string, onLoaded: () => void, opts?: StreamOptions, owner?: DataTransportOwner): LayerData;
|
|
199
206
|
/**
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export interface DomTileOptions {
|
|
2
|
+
template: string | string[];
|
|
3
|
+
tileSize: number;
|
|
4
|
+
minZoom: number;
|
|
5
|
+
maxZoom: number;
|
|
6
|
+
opacity: number;
|
|
7
|
+
visible: boolean;
|
|
8
|
+
}
|
|
9
|
+
interface ViewportLike {
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
12
|
+
project(lngLat: number[]): number[];
|
|
13
|
+
getBounds(): number[];
|
|
14
|
+
}
|
|
15
|
+
export declare class DomTileLayer {
|
|
16
|
+
readonly root: HTMLDivElement;
|
|
17
|
+
private readonly images;
|
|
18
|
+
/**
|
|
19
|
+
* No z-index: the canvas has none either, so painting follows document
|
|
20
|
+
* order, and the runtime inserts these roots before the canvas, in layer
|
|
21
|
+
* order. Any positive z-index would lift a layer above every deck layer.
|
|
22
|
+
*/
|
|
23
|
+
constructor();
|
|
24
|
+
/** Lay out the tiles for a view; `hidden` hides the layer (tilted, rotated, or switched off). */
|
|
25
|
+
update(viewport: ViewportLike, zoom: number, opts: DomTileOptions, hidden: boolean): void;
|
|
26
|
+
destroy(): void;
|
|
27
|
+
}
|
|
28
|
+
/** Does an `<img>` with no crossOrigin load this URL? What decides whether a CORS-refused tile service can be shown at all. */
|
|
29
|
+
export declare function loadsAsPlainImage(url: string, timeoutMs?: number): Promise<boolean>;
|
|
30
|
+
export {};
|
|
@@ -115,7 +115,7 @@ export declare class DrawController {
|
|
|
115
115
|
point(coord: [number, number] | null, kind: "click" | "hover", pointerType?: string): void;
|
|
116
116
|
/** Drop a queued hover-coalesced render (a following immediate render already supersedes it). */
|
|
117
117
|
private cancelHoverRaf;
|
|
118
|
-
/** `CLOSE_GUARD_PIXELS` converted to real meters at the current zoom/latitude (
|
|
118
|
+
/** `CLOSE_GUARD_PIXELS` converted to real meters at the current zoom/latitude (geodesy.ts's Web Mercator meters-per-pixel). */
|
|
119
119
|
private closeGuardMeters;
|
|
120
120
|
/** Close the in-progress line/polygon — from the double-click DOM event or Enter. */
|
|
121
121
|
commit(): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HTMLElementBase } from "../env";
|
|
2
|
-
import { RuntimeCore, type Camera } from "../runtime-core";
|
|
2
|
+
import { RuntimeCore, type Camera, type LayerErrorDetail } from "../runtime-core";
|
|
3
3
|
import { type RuntimeContext } from "../ctx";
|
|
4
4
|
import { type LightingIR } from "../scene-lighting";
|
|
5
5
|
import { type ClipBoxIR } from "../clip-box";
|
|
@@ -85,6 +85,10 @@ export declare class OmMapElement extends HTMLElementBase {
|
|
|
85
85
|
private resolveReady;
|
|
86
86
|
readonly ready: Promise<void>;
|
|
87
87
|
private readonly viewSettle;
|
|
88
|
+
/** Hand the settled view to this map's view-filled feature layers (feature-service.ts): those whose rows no longer cover it re-request. */
|
|
89
|
+
private pushDataView;
|
|
90
|
+
/** View-data failures already announced as om-layer-error, so each is announced once while it stands. */
|
|
91
|
+
private viewDataErrorsAnnounced;
|
|
88
92
|
private firstReconcileDone;
|
|
89
93
|
private rendererLoadPending;
|
|
90
94
|
private loadDispatched;
|
|
@@ -605,6 +609,13 @@ declare global {
|
|
|
605
609
|
layerId: string;
|
|
606
610
|
tileset: unknown;
|
|
607
611
|
}>;
|
|
612
|
+
/** A layer's tiles failed — once per cause (no response / CORS, an HTTP
|
|
613
|
+
* status, a service error page) per layer and template, whether or not
|
|
614
|
+
* the map is validating. The failed tiles are left empty; the rest of
|
|
615
|
+
* the layer draws. */
|
|
616
|
+
"om-layer-error": CustomEvent<{
|
|
617
|
+
layerId: string;
|
|
618
|
+
} & LayerErrorDetail>;
|
|
608
619
|
/** A Route layer finished resolving its route (direct geometry or a
|
|
609
620
|
* RoutingProvider round-trip) — detail carries the authored layer id and
|
|
610
621
|
* the normalized route (geometry/distanceMeters/durationSec/legs/bounds),
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Live features from a service, for the area in view: a WFS GetFeature, an
|
|
3
|
+
* OGC API Features `items` request or an ArcGIS FeatureServer/MapServer
|
|
4
|
+
* `query`, addressed by an extent token (`{bbox-crs84}`, `{bbox-epsg-XXXX}`
|
|
5
|
+
* — bbox-tokens.ts) and re-requested when the view settles somewhere new.
|
|
6
|
+
*
|
|
7
|
+
* Each service pages its own way, and this follows it to `maxFeatures`:
|
|
8
|
+
* - WFS 2.0: `STARTINDEX` in steps of the request's `COUNT`.
|
|
9
|
+
* - OGC API Features: the response's `rel="next"` link.
|
|
10
|
+
* - ArcGIS: `resultOffset` in steps of `resultRecordCount` while the
|
|
11
|
+
* response says `exceededTransferLimit`.
|
|
12
|
+
* Anything else is one request. Responses must be GeoJSON (ask the service:
|
|
13
|
+
* `outputFormat=application/json`, `f=geojson`, `f=json` on OGC API).
|
|
14
|
+
*/
|
|
15
|
+
import { type LngLatExtent } from "./bbox-tokens";
|
|
16
|
+
export type FeatureServiceKind = "wfs" | "ogcapi" | "arcgis" | "plain";
|
|
17
|
+
/** Is this a feature request addressed by the view's extent (not a tile template)? */
|
|
18
|
+
export declare function isViewTemplateUrl(url: string | null | undefined): boolean;
|
|
19
|
+
export declare function featureServiceKind(url: string): FeatureServiceKind;
|
|
20
|
+
/** The default most features a view keeps — enough for a dense city view, few enough to stay smooth. */
|
|
21
|
+
export declare const DEFAULT_MAX_FEATURES = 10000;
|
|
22
|
+
export interface FeatureFetch {
|
|
23
|
+
features: unknown[];
|
|
24
|
+
/** True when the service had more than `maxFeatures` for this view. */
|
|
25
|
+
capped: boolean;
|
|
26
|
+
url: string;
|
|
27
|
+
}
|
|
28
|
+
/** One view's features: the template filled for `extent`, paged per its service, up to `maxFeatures`. */
|
|
29
|
+
export declare function fetchViewFeatures(template: string, extent: LngLatExtent, opts?: {
|
|
30
|
+
maxFeatures?: number;
|
|
31
|
+
init?: RequestInit;
|
|
32
|
+
signal?: AbortSignal;
|
|
33
|
+
}): Promise<FeatureFetch>;
|
|
34
|
+
/** A failed feature request as a diagnostic — the same causes, and the same event detail, as a failed tile. */
|
|
35
|
+
export declare function describeFeatureError(error: unknown): {
|
|
36
|
+
severity: "error";
|
|
37
|
+
cause: "network" | "http" | "service-exception";
|
|
38
|
+
status?: number;
|
|
39
|
+
host: string;
|
|
40
|
+
message: string;
|
|
41
|
+
fix: string;
|
|
42
|
+
};
|