add working vaa ash-polygons map w/ volcano selection capabilities

This commit is contained in:
2026-08-27 12:36:25 -07:00
parent 6eb5e42111
commit 6304db66c2
5 changed files with 274 additions and 13 deletions
+24
View File
@@ -7,6 +7,10 @@ import { lazy } from 'react';
// w: 4 = one-third screen width
// w: 3 = one-quarter screen width
// ONE DAY DATE RANGE
const getToday = () => (new Date()).toLocaleDateString('en-CA')
// ONE WEEK DATE RANGE
const getStartDate = () => (new Date(Date.now() - 604800000)).toLocaleDateString('en-CA'); // 7 days = 604800000 = 7*24*60*60*1000
const getEndDate = () => (new Date()).toLocaleDateString('en-CA'); // 'en-CA' formats the date as YYYY-MM-DD
@@ -178,6 +182,26 @@ export const WIDGET_REGISTRY = {
allowedSizes: {
medium: { w: 3, h: 12 },
}
},
"vaa_map": {
name: "VAA Ash Polygon Map",
category: "Maps",
description: "By selecting a volcano, the map will take you to it and show a polygon of the ash in 8, 12, and 18 hours",
component: lazy(() => import('../components/Widgets/VaaMap.jsx')),
settingsComponent: lazy(() => import('../components/Widgets/settings/VaaMapSettings.jsx')),
defaultSettings: {
position: [45.61142, -122.49630],
startDate: getToday(),
endDate: getToday(),
data: [],
isLoading: false,
isError: undefined,
selected: undefined,
},
allowedSizes: {
medium: { w: 6, h: 12 }
}
}
};