mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-17 00:32:21 +00:00
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:
1 parent
b6b7874b97
commit
90510bf9e6
2 files changed
+16
-5
No files matched your search
@@ -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) => {
|
||||
|
||||
Reference in new issue
Block a user