diff --git a/web/src/App.tsx b/web/src/App.tsx
index 9e06b58..7c40c95 100644
--- a/web/src/App.tsx
+++ b/web/src/App.tsx
@@ -6,6 +6,7 @@ import { Cities } from './cities/Cities';
import { Database } from './database/Database';
import { Station } from './station/Station';
import { apiHost } from './consts';
+import { WeatherIconStub } from './components/weatherIcons/WeatherIconStub';
console.log("env:", import.meta.env.MODE);
console.log("api host:", apiHost);
@@ -30,16 +31,21 @@ const App: Component = () => {
return (
);
diff --git a/web/src/assets/ltv_meteo.otf b/web/src/assets/ltv_meteo.otf
new file mode 100644
index 0000000..4da2337
Binary files /dev/null and b/web/src/assets/ltv_meteo.otf differ
diff --git a/web/src/cities/map/MapView.tsx b/web/src/cities/map/MapView.tsx
index 8557823..b2cb0ff 100644
--- a/web/src/cities/map/MapView.tsx
+++ b/web/src/cities/map/MapView.tsx
@@ -5,13 +5,17 @@ import { WindInputs, WindSignals } from "./WindInputs";
import arrowUrl from "../../assets/arrow.webp";
import { cityCoords } from "../../components/cityCoords";
-import { MapResolution, resolutionProps, ResolutionPropsValue, windProps, WindProps } from "./mapConsts";
-import { drawOnMap } from "./canvasDraw";
+import { MapResolution, resolutionProps, windProps, WindProps } from "./mapConsts";
+import { CityData, drawOnMap } from "./canvasDraw";
+import { IconInputs } from "../../components/weatherIcons/IconInputs";
export const MapView: Component<{ type: MapResolution, data: () => ResultKeyVal[] }> = ({ type, data }) => {
const [getCanvas, setCanvas] = createSignal();
const [getImg, setImg] = createSignal(new Image());
- let lastCoords: [string, {x: number, y: number }, number][] = [];
+ const weatherIconsSingal = createSignal<{[key: string]: string;}>({});
+ const [getWeatherIcons] = weatherIconsSingal;
+
+ let lastCoords: CityData = [];
const props = resolutionProps[type];
const arrowImg = new Image();
@@ -52,16 +56,18 @@ export const MapView: Component<{ type: MapResolution, data: () => ResultKeyVal[
createEffect(() => {
const ctx = getCanvas()!.getContext("2d")!;
- const coordsAndData: [string, {x: number, y: number }, number][] = data()
+ const weatherIcons = getWeatherIcons();
+ const coordsAndData: CityData = data()
.map(([city, value]) => [
city,
cityCoords[city as keyof typeof cityCoords],
typeof value === "number" ? value : -99,
+ weatherIcons[city],
]);
lastCoords = coordsAndData;
drawOnMap(
ctx,
- [getImg(),arrowImg],
+ [getImg(), arrowImg],
coordsAndData,
getWindData(),
props,
@@ -76,7 +82,12 @@ export const MapView: Component<{ type: MapResolution, data: () => ResultKeyVal[
return (
<>
- { props.showWind && }
+
+
+ { props.showWind && }
+
+
+