Show both "latest" and "loop" radar images
This commit is contained in:
parent
d17ab853af
commit
de9980b014
2 changed files with 16 additions and 9 deletions
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue