mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-04 10:24:02 +00:00
fix(traffic): the traffic layer reads STALE, not LIVE, on cached flow tiles
Once the TomTom tile budget is spent, or TomTom fails, the proxy serves cached tiles marked STALE-BUDGET / STALE-ERROR. flowSource works out `stale`, but the layer fetched flow through fetchFlowForBounds, which returns only the segments, so getStats() and the sync chip still read "LIVE · Roads: …". #1239 fixed the get_traffic_flow tool the same way; the layer now uses fetchFlowDetail too, reports stale and oldestTileAt in its stats, and the chip reads "STALE · Roads: <source> · Flow: cached TomTom tiles". A source without fetchFlowDetail keeps the previous behaviour. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
2006c035d9
commit
7981a179ea
11 files changed
+120
-3
No files matched your search
@@ -5651,7 +5651,10 @@ easier to meet (detection is now on more often), but does not create it.
|
||||
coverage number. `stats.loading` covers outstanding flow work as well as the
|
||||
road fetch, so a flow failure landing after the first paint still ends the
|
||||
shared loading batch as LOAD FAILED. Harnesses must gate on `!stats.error`,
|
||||
never on `mode === 'live'` alone.
|
||||
never on `mode === 'live'` alone. When the drawn flow came from the proxy's
|
||||
cached STALE-BUDGET / STALE-ERROR tiles, `getStats()` reports `stale: true`
|
||||
and `oldestTileAt`, the row reads STALE, and the sync chip reads
|
||||
`STALE · Roads: <source> · Flow: cached TomTom tiles` instead of LIVE.
|
||||
- Traffic runs in `sim` mode (white dots, hardcoded speeds) unless `TOMTOM_API_KEY`
|
||||
is configured (env or Keychain `tomtom-api`/`api-key`), which enables `live` mode:
|
||||
TomTom flow vector tiles via the budget-governed `/api/tomtom` proxy
|
||||
|
||||
Reference in new issue
Block a user