This commit is contained in:
Hamza Aleghwairyeen
2024-04-02 23:03:14 +03:00
parent e822f8c552
commit 682da605c5
5 changed files with 22 additions and 21 deletions

View File

@@ -104,14 +104,14 @@ class MapDriverController extends GetxController {
myLocation = myLocation;
mapController = controller;
controller.getVisibleRegion();
controller.animateCamera(
CameraUpdate.newLatLng(myLocation),
);
update();
// Set up a timer or interval to trigger the marker update every 3 seconds.
timer = Timer.periodic(const Duration(seconds: 1), (_) {
updateMarker();
controller.animateCamera(
CameraUpdate.newLatLng(myLocation),
);
update();
});
}
@@ -534,7 +534,7 @@ class MapDriverController extends GetxController {
// Get.back();
}
void cancelCheckRidefromPassenger() async {
void cancelCheckRideFromPassenger() async {
var res = await CRUD().get(link: AppLink.getOrderCancelStatus, payload: {
'order_id': rideId,
}); //.then((value) {
@@ -626,7 +626,7 @@ class MapDriverController extends GetxController {
markers.add(
Marker(
markerId: MarkerId('MyLocation'.tr),
position: locationController.myLocation,
position: myLocation,
draggable: true,
icon: carIcon,
rotation: locationController.heading,
@@ -637,7 +637,7 @@ class MapDriverController extends GetxController {
);
mapController!.animateCamera(
CameraUpdate.newLatLng(locationController.myLocation),
CameraUpdate.newLatLng(myLocation),
);
update();
}