Draw csv data on a map

This commit is contained in:
Guntis Smaukstelis
2025-03-12 13:16:35 +02:00
parent 841b4b6ec9
commit 066f1bedc1
5 changed files with 264 additions and 9 deletions
+2 -2
View File
@@ -15,7 +15,7 @@ export const MapView: Component<{ type: MapResolution, data: () => ResultKeyVal[
const weatherIconsSingal = createSignal<{[key: string]: string;}>({});
const [getWeatherIcons] = weatherIconsSingal;
let lastCoords: CityData = [];
let lastCoords: CityData[] = [];
const props = resolutionProps[type];
const arrowImg = new Image();
@@ -57,7 +57,7 @@ export const MapView: Component<{ type: MapResolution, data: () => ResultKeyVal[
createEffect(() => {
const ctx = getCanvas()!.getContext("2d")!;
const weatherIcons = getWeatherIcons();
const coordsAndData: CityData = data()
const coordsAndData: CityData[] = data()
.map(([city, value]) => [
city,
cityCoords[city as keyof typeof cityCoords],