Add code to infer conditions from wind + gusts when Open-Meteo over simplifies weather
This commit is contained in:
parent
69cfdd2f1e
commit
84ae94e052
6 changed files with 94 additions and 14 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import { safePromiseAll } from './fetch.mjs';
|
||||
import { loadData } from './data-loader.mjs';
|
||||
import { getSmallIconFromWmoCode } from '../icons.mjs';
|
||||
import { getSmallIconFromWmoCodeWithWind } from '../icons.mjs';
|
||||
import { getOpenMeteoObservationSnapshot } from './weather.mjs';
|
||||
import { temperature } from './units.mjs';
|
||||
import { withBasePath } from './base-path.mjs';
|
||||
|
|
@ -107,7 +107,12 @@ const selectNearbyCities = (map, sourceLocation, cities, options = {}) => {
|
|||
|
||||
const buildNearbyWeatherMarker = (city, observation) => {
|
||||
const temperatureConverter = temperature();
|
||||
const icon = getSmallIconFromWmoCode(observation.weatherCode, observation.isDay);
|
||||
const icon = getSmallIconFromWmoCodeWithWind(
|
||||
observation.weatherCode,
|
||||
observation.isDay,
|
||||
observation.windSpeed,
|
||||
observation.windGusts
|
||||
);
|
||||
const markerHtml = `
|
||||
<div class="nearby-weather-marker-inner">
|
||||
<div class="city">${city.name}</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue