Skip to content

Commit

Permalink
Merge pull request #1460 from weather-gov/mgwalker/radar-investigation
Browse files Browse the repository at this point in the history
Update our radar configuration to more correctly use CMI
  • Loading branch information
greg-does-weather authored Jul 24, 2024
2 parents d1ed83a + 5d64a91 commit 2ba3047
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 41 deletions.
48 changes: 8 additions & 40 deletions web/themes/new_weather_theme/assets/js/radar.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,59 +54,27 @@ const setupRadar = () => {

const point = [lon, lat];

// no alerts;
// different heights on different breakpoints
// explore customizing the controls
// for a11y, describe that it's a radar map and otherwise hide it
const bookmark = {
agenda: { id: "weather", zoom: 8, center: point, location: point },
opacity: {
alerts: 0,
},
};

const options = {
settings: {
menu: {
open: true,
},
map: {
base: "standard",
overlays: {
artcc: false,
county: false,
cwa: false,
rfc: false,
state: false,
},
animating: false,
zoom: 8,
center: point,
location: point,
},
agenda: null,
layers: {
alerts: {
filter: "hazards",
opacity: 0,
},
local: {
opacity: 0.6,
},
stations: {
opacity: 0.8,
},
national: {
opacity: 0.6,
},
},
bookmark: null,
bookmark: `v1_${btoa(JSON.stringify(bookmark))}`,
quickset: null,
},
urls: {
alerts: "https://alerts-v2.weather.gov",
alerts: "https://alerts.weather.gov",
api: "https://api.weather.gov",
forecast: "https://forecast.weather.gov",
gis: "https://opengeo.ncep.noaa.gov/geoserver",
},
};

window.app = window.cmiRadar.createApp("#wx_radar_container", options);
window.app.$store.dispatch("markLocation", point);

[".cmi-radar-container .menu", ".cmi-radar-menu-agendas"].forEach(
(selector) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ hourly-toggle:
assets/js/components/HourlyToggle.js: { preprocess: false }

radar:
version: 2024-04-22.2
version: 2024-06-23
css:
theme:
assets/css/radar/cmi-radar.6602f65c.css:
Expand Down

0 comments on commit 2ba3047

Please sign in to comment.