4/2/7
This commit is contained in:
@@ -108,10 +108,6 @@ class MapDriverController extends GetxController {
|
|||||||
// Set up a timer or interval to trigger the marker update every 3 seconds.
|
// Set up a timer or interval to trigger the marker update every 3 seconds.
|
||||||
timer = Timer.periodic(const Duration(seconds: 1), (_) {
|
timer = Timer.periodic(const Duration(seconds: 1), (_) {
|
||||||
updateMarker();
|
updateMarker();
|
||||||
controller.animateCamera(
|
|
||||||
CameraUpdate.newLatLng(myLocation),
|
|
||||||
);
|
|
||||||
update();
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -636,6 +632,7 @@ class MapDriverController extends GetxController {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Animate camera only once after updating the marker
|
||||||
mapController!.animateCamera(
|
mapController!.animateCamera(
|
||||||
CameraUpdate.newLatLng(myLocation),
|
CameraUpdate.newLatLng(myLocation),
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user