Members
AC
Generic AC (current type unspecified beyond AC).
AC_SINGLE_PHASE
Single-phase AC (Type 1, Schuko, etc.).
AC_THREE_PHASES
Three-phase AC (Type 2 Mennekes wired three-phase).
bemap
BeNomad BeMap JavaScript API
DC
Direct current (CHAdeMO, CCS, Tesla DC, …).
NA
Not specified.
Methods
_bemapAbortError()
BeNomad BeMap JavaScript API — PMTiles 200-slice Source + RangeGate (v2.0)
Two independent, opt-in tile-fetch robustness/perf features, adapted from the
proven bemaputnik / mp-tiles-demo reference implementations (validated on the
beta Worker by mp-tiles-bench):
1. `bemap.PMTilesSliceSource` — a custom pmtiles `Source` that reads the
archive as **200-slice** requests (`?r=-`, inclusive
offsets, NO `Range` header) instead of HTTP Range (206). The Worker returns
a plain **HTTP 200** with `Cache-Control: immutable`, which the **browser's
native HTTP cache stores** — so repeat tiles/visits are free with ZERO
Service Worker. (206 partials are not reliably cached by browsers, which is
why the SW exists on the Range path.) Requires a Worker that serves the
`?r=` slice route — BeNomad Tiles does on all envs.
2. `bemap.RangeGate` — an optional per-request resilience wrapper: a
concurrency cap (off by default), a per-attempt TTFB (pre-header) timeout
with SMART-ABORT semantics, and retries with backoff on a transient
failure — NEVER retrying a caller cancel (pan/zoom). SMART ABORT: every
attempt runs on a PRIVATE `AbortController`; the caller's (pan/zoom)
cancel and the TTFB timer may kill the socket ONLY BEFORE the response
headers arrive (nothing transferred yet — cheap). Once headers are in the
socket is never physically aborted — killing a streaming tile body
poisons the browser's shared H2/H3 connection and stalls 15–25 % of
follow-up requests (see GREY-TILES-ROOT-CAUSE.md in the Worker repo) —
the body drains to completion (warming the browser cache), a caller
cancel is honoured LOGICALLY afterwards (reject `AbortError`, discard
the bytes), and a generous body safety cap (`bodyTimeoutMs`) replaces
any body-spanning kill, guarding only a truly dead socket.
Live-toggleable. Policy proven in mp-tiles-demo: 0 permanent grey tiles,
+15 % bandwidth, worst tile ≤ 4 s.
Both are wired by `bemap.MapLibreMap` per `opts.tilesSliceMode` (default
`'200'`) and the `tilesSlice*` knobs. Auth composes for free: `getBytes` uses
`window.fetch`, so `bemap.TilesAuth` injects credentials; and a 200-slice has
no `Range` header, so `bemap.RangeFetchPolicy`'s `no-store` correctly does NOT
apply — the 200 stays browser-cacheable.
- Since:
- 2.0.0
- Source: