Auto zoom map to live car location

This commit is contained in:
cerenX9
2026-07-24 14:27:07 +03:00
parent 4d9a7f4800
commit 086fe90c9b

View File

@@ -113,6 +113,10 @@ document.addEventListener("DOMContentLoaded", function() {
icon: createLiveCarIcon(vehicle.driver_tag, speedStr)
}).addTo(map);
activeMarkers.push(staticCar);
// Haritayı doğrudan bu tek noktaya odakla (Zoom)
map.setView(routePoints[0], 16);
return;
}