4/3/8
This commit is contained in:
@@ -105,13 +105,14 @@ class MapDriverController extends GetxController {
|
|||||||
myLocation = myLocation;
|
myLocation = myLocation;
|
||||||
mapController = controller;
|
mapController = controller;
|
||||||
controller.getVisibleRegion();
|
controller.getVisibleRegion();
|
||||||
// controller.animateCamera(
|
controller.animateCamera(
|
||||||
// CameraUpdate.newLatLng(Get.find<LocationController>().myLocation),
|
CameraUpdate.newLatLng(Get.find<LocationController>().myLocation),
|
||||||
// );
|
);
|
||||||
|
update();
|
||||||
// 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();
|
||||||
// });
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void changeStatusDriver() {
|
void changeStatusDriver() {
|
||||||
|
|||||||
@@ -31,7 +31,8 @@ class GoogleDriverMap extends StatelessWidget {
|
|||||||
onCameraMoveStarted: () {},
|
onCameraMoveStarted: () {},
|
||||||
onCameraMove: (position) {
|
onCameraMove: (position) {
|
||||||
locationController.myLocation = position.target;
|
locationController.myLocation = position.target;
|
||||||
print(position);
|
controller.mapController!
|
||||||
|
.animateCamera(CameraUpdate.newCameraPosition(position));
|
||||||
},
|
},
|
||||||
minMaxZoomPreference: const MinMaxZoomPreference(6, 18),
|
minMaxZoomPreference: const MinMaxZoomPreference(6, 18),
|
||||||
myLocationEnabled: true,
|
myLocationEnabled: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user