From e836e7dd4ed5e9fa60e949d159100040b22a8f48 Mon Sep 17 00:00:00 2001
From: Arne Rief <riearn@proton.me>
Date: Mon, 22 Dec 2025 21:20:39 +0100
Subject: Movement simulator for all and single robot, project v1 ready

---
 frontend/src/components/CityMap.tsx | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

(limited to 'frontend/src/components/CityMap.tsx')

diff --git a/frontend/src/components/CityMap.tsx b/frontend/src/components/CityMap.tsx
index b61e69a..795598e 100644
--- a/frontend/src/components/CityMap.tsx
+++ b/frontend/src/components/CityMap.tsx
@@ -65,9 +65,11 @@ function CityMap({ robots }: Props) {
 
         source.clear();
 
-        robots.forEach((robot) => {
+        robots?.forEach((robot) => {
             const feature = new Feature({
-                geometry: new Point(fromLonLat([robot?.lon, robot?.lat])),
+                geometry: new Point(
+                    fromLonLat([parseFloat(robot?.lon), parseFloat(robot?.lat)])
+                ),
                 robotId: robot?.id,
             });
 
-- 
cgit v1.2.3

