Auto zoom map to live car location
This commit is contained in:
@@ -113,6 +113,10 @@ document.addEventListener("DOMContentLoaded", function() {
|
|||||||
icon: createLiveCarIcon(vehicle.driver_tag, speedStr)
|
icon: createLiveCarIcon(vehicle.driver_tag, speedStr)
|
||||||
}).addTo(map);
|
}).addTo(map);
|
||||||
activeMarkers.push(staticCar);
|
activeMarkers.push(staticCar);
|
||||||
|
|
||||||
|
// Haritayı doğrudan bu tek noktaya odakla (Zoom)
|
||||||
|
map.setView(routePoints[0], 16);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user