Show both "latest" and "loop" radar images

This commit is contained in:
Lance Edgar 2024-06-08 19:02:41 -05:00
parent d17ab853af
commit de9980b014
2 changed files with 16 additions and 9 deletions

View file

@ -11,6 +11,8 @@ const getDefaults = () => {
cityState,
weather: null,
forecast: null,
radarLatestURL: null,
radarLoopURL: null,
}
}
@ -28,6 +30,8 @@ export const useWeatherStore = defineStore('weather', {
this.setCityState(null)
this.setWeather(null)
this.setForecast(null)
this.radarLatestURL = null
this.radarLoopURL = null
},
async getWeather() {
@ -48,6 +52,10 @@ export const useWeatherStore = defineStore('weather', {
this.setCityState(cityState)
}
const station = weather.properties.radarStation
this.radarLatestURL = `https://radar.weather.gov/ridge/standard/${station}_0.gif`
this.radarLoopURL = `https://radar.weather.gov/ridge/standard/${station}_loop.gif`
this.setWeather(weather)
}