This commit is contained in:
Hamza Aleghwairyeen
2024-03-30 13:28:23 +03:00
parent c853d89037
commit 6e417cbb75
7 changed files with 111 additions and 59 deletions

View File

@@ -146,29 +146,47 @@ class GoogleMapPassengerWidget extends StatelessWidget {
markers: {
if (controller.statusRide != 'Apply' ||
!controller.rideTimerBegin)
for (var carLocation in controller.carLocationsModels)
for (var i = 0;
controller
.dataCarsLocationByPassenger['message'].length;
i++)
Marker(
// anchor: const Offset(4, 4),
position: LatLng(
carLocation.latitude,
carLocation.longitude,
),
double.parse(controller
.datadriverCarsLocationToPassengerAfterApplied[
'message'][i]['latitude']),
double.parse(controller
.datadriverCarsLocationToPassengerAfterApplied[
'message'][i]['longitude'])),
icon: controller.carIcon,
markerId: MarkerId(carLocation.toString()),
rotation: carLocation.heading,
), ///////////////////
markerId: MarkerId(controller
.datadriverCarsLocationToPassengerAfterApplied[
'message'][i]['longitude']
.toString()),
rotation: double.parse(controller
.datadriverCarsLocationToPassengerAfterApplied[
'message'][i]['heading']),
),
// controller.carMarrkerAplied,
if (controller.statusRide == 'Apply')
for (var carLocation
in controller.driverCarsLocationToPassengerAfterApplied)
Marker(
// anchor: const Offset(4, 4),
position: carLocation,
icon: controller.carIcon,
rotation: double.parse(controller
.datadriverCarsLocationToPassengerAfterApplied[
'message'][0]['latitude']),
markerId: MarkerId(carLocation.toString())),
// for (var carLocation
// in controller.driverCarsLocationToPassengerAfterApplied)
Marker(
// anchor: const Offset(4, 4),
position: LatLng(
double.parse(controller.datadriverCarsLocationToPassengerAfterApplied['message']
[0]['latitude']),
double.parse(controller.datadriverCarsLocationToPassengerAfterApplied['message']
[0]['longitude'])), //carLocation,
icon: controller.carIcon,
rotation: double.parse(
controller.datadriverCarsLocationToPassengerAfterApplied['message']
[0]['heading']),
markerId: MarkerId(controller
.datadriverCarsLocationToPassengerAfterApplied['message']
[0]['longitude']
.toString())),
for (int i = 1;
i < controller.coordinatesWithoutEmpty.length - 1;
i++)