3/30/4
This commit is contained in:
@@ -1664,8 +1664,8 @@ class MapPassengerController extends GetxController {
|
||||
// }
|
||||
// Add new markers
|
||||
// Example: Add a marker for each item in a list
|
||||
// for (var item in carsLocationByPassenger) {
|
||||
for (var i = 0; dataCarsLocationByPassenger['message'].length; i++) {
|
||||
for (var item in carsLocationByPassenger) {
|
||||
// for (var i = 0; i <dataCarsLocationByPassenger['message'].length; i++) {
|
||||
// if (previousLocationOfDrivers != null) {
|
||||
// angleDegrees = calculateAngleBetweenLocations(
|
||||
// previousLocationOfDrivers, currentLocationOfDrivers);
|
||||
@@ -1676,20 +1676,18 @@ class MapPassengerController extends GetxController {
|
||||
// }
|
||||
final marker = Marker(
|
||||
position: LatLng(
|
||||
double.parse(
|
||||
datadriverCarsLocationToPassengerAfterApplied['message'][i]
|
||||
['latitude']),
|
||||
double.parse(
|
||||
datadriverCarsLocationToPassengerAfterApplied['message'][i]
|
||||
['longitude'])),
|
||||
// double.parse(
|
||||
// datadriverCarsLocationToPassengerAfterApplied['message'][i]
|
||||
// ['latitude']),
|
||||
// double.parse(
|
||||
// datadriverCarsLocationToPassengerAfterApplied['message'][i]
|
||||
// ['longitude'])),
|
||||
item.latitude,
|
||||
item.longitude,
|
||||
),
|
||||
icon: carIcon,
|
||||
markerId: MarkerId(
|
||||
datadriverCarsLocationToPassengerAfterApplied['message'][i]
|
||||
['longitude']
|
||||
.toString()),
|
||||
rotation: double.parse(
|
||||
datadriverCarsLocationToPassengerAfterApplied['message'][i]
|
||||
['heading']),
|
||||
markerId: MarkerId(item.toString()),
|
||||
rotation: item.heading,
|
||||
// Other properties for the marker, such as icon, info window, etc.
|
||||
);
|
||||
markers.add(marker);
|
||||
|
||||
@@ -146,27 +146,16 @@ class GoogleMapPassengerWidget extends StatelessWidget {
|
||||
markers: {
|
||||
if (controller.statusRide != 'Apply' ||
|
||||
!controller.rideTimerBegin)
|
||||
for (var i = 0;
|
||||
controller
|
||||
.dataCarsLocationByPassenger['message'].length;
|
||||
i++)
|
||||
for (var carLocation in controller.carLocationsModels)
|
||||
Marker(
|
||||
// anchor: const Offset(4, 4),
|
||||
position: LatLng(
|
||||
double.parse(controller
|
||||
.datadriverCarsLocationToPassengerAfterApplied[
|
||||
'message'][i]['latitude']),
|
||||
double.parse(controller
|
||||
.datadriverCarsLocationToPassengerAfterApplied[
|
||||
'message'][i]['longitude'])),
|
||||
carLocation.latitude,
|
||||
carLocation.longitude,
|
||||
),
|
||||
icon: controller.carIcon,
|
||||
markerId: MarkerId(controller
|
||||
.datadriverCarsLocationToPassengerAfterApplied[
|
||||
'message'][i]['longitude']
|
||||
.toString()),
|
||||
rotation: double.parse(controller
|
||||
.datadriverCarsLocationToPassengerAfterApplied[
|
||||
'message'][i]['heading']),
|
||||
markerId: MarkerId(carLocation.toString()),
|
||||
rotation: carLocation.heading,
|
||||
),
|
||||
// controller.carMarrkerAplied,
|
||||
if (controller.statusRide == 'Apply')
|
||||
|
||||
Reference in New Issue
Block a user