Read satellite fire hits in Context only while the FIRMS layer is on

FIRMS needs a key the browser cannot see. Without one the proxy answers
503, so Context no longer asks for fire hits unless the FIRMS layer is on.

Co-authored-by: Manjunath Paparaju <[email protected]>
This commit is contained in:
Sameh KhamisandManjunath Paparaju committed 2026-11-16 14:59:17 -08:00
1 parent b6b7874b97
commit 90510bf9e6
2 files changed
+16 -5

No files matched your search

+10 -3
View File
@@ -101,15 +101,22 @@ function stormTitle(storm) {
/**
* Hazards within a radius of a spot, nearest first within each kind:
* `[{kind, icon, title, detail, distanceKm, at}]`. Every kind uses the same
* radius, the one Context's radius control sets.
* radius, the one Context's radius control sets. Satellite fire hits need a
* FIRMS key the browser cannot see, so they are read only with `fires`: while
* the FIRMS layer is on, which has found the key works.
*/
export async function hazardsNear(lat, lon, radiusKm = 250) {
export async function hazardsNear(
lat,
lon,
radiusKm = 250,
{ fires: withFires = false } = {},
) {
const here = { lat, lon };
const [quakeRows, stormSnap, perimeterRows, fireSnap] = await Promise.all([
quakes(),
storms(),
perimeters(),
fires(),
withFires ? fires() : null,
]);
const found = [];
const add = (row) => {