Fix active location car point rendering
This commit is contained in:
@@ -104,7 +104,17 @@ document.addEventListener("DOMContentLoaded", function() {
|
|||||||
clearInterval(vehicleAnimationTimer);
|
clearInterval(vehicleAnimationTimer);
|
||||||
vehicleAnimationTimer = null;
|
vehicleAnimationTimer = null;
|
||||||
}
|
}
|
||||||
if (!routePoints || routePoints.length < 2) return;
|
if (!routePoints || routePoints.length === 0) return;
|
||||||
|
|
||||||
|
// Eğer sadece tek bir nokta varsa (Canlı Anlık GPS modu), arabayı sabit bir şekilde o noktaya koy
|
||||||
|
if (routePoints.length === 1) {
|
||||||
|
var speedStr = vehicle.gps_speed ? vehicle.gps_speed + " km/s" : "0 km/s";
|
||||||
|
var staticCar = L.marker(routePoints[0], {
|
||||||
|
icon: createLiveCarIcon(vehicle.driver_tag, speedStr)
|
||||||
|
}).addTo(map);
|
||||||
|
activeMarkers.push(staticCar);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var currentIdx = 0;
|
var currentIdx = 0;
|
||||||
var progress = 0;
|
var progress = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user