Linear: https://linear.app/tinyland/issue/TIN-1730/prototype-viewport-pm25-kde-grid-behind-coverage-and-performance
Problem
The current smog overlay is a MapLibre heatmap over station points. A true viewport KDE/grid could make PM2.5 support more legible, but it can also be CPU-heavy, misleading over sparse data, and expensive if implemented as tile infrastructure too early.
Scope
- Prototype a viewport-scoped PM2.5 KDE/grid behind a feature flag or development-only switch.
- Reuse the same PM2.5 field-sample semantics and null-exclusion rules as the point estimator.
- Cache by normalized bbox/zoom band and debounce recompute on map movement.
- Measure CPU/render impact on mobile-sized viewport before making it default.
- Do not add server-side tile infrastructure unless browser performance and API-amplification data justify it.
Acceptance
- Prototype produces a visibly useful density field only when numeric station coverage is sufficient.
- Sparse coverage renders a clear insufficient-support state instead of a fabricated smooth blanket.
- Benchmarks document mobile recompute/render cost.
- Product decision recorded: keep MapLibre heatmap, ship client KDE, or plan server-side tiles.
Related: #275, #249, #270.
Linear: https://linear.app/tinyland/issue/TIN-1730/prototype-viewport-pm25-kde-grid-behind-coverage-and-performance
Problem
The current smog overlay is a MapLibre heatmap over station points. A true viewport KDE/grid could make PM2.5 support more legible, but it can also be CPU-heavy, misleading over sparse data, and expensive if implemented as tile infrastructure too early.
Scope
Acceptance
Related: #275, #249, #270.