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