3/31/2
This commit is contained in:
@@ -143,84 +143,95 @@ class GoogleMapPassengerWidget extends StatelessWidget {
|
||||
target: controller.passengerLocation,
|
||||
zoom: 15,
|
||||
),
|
||||
markers: {
|
||||
if (controller.statusRide != 'Apply' ||
|
||||
!controller.rideTimerBegin)
|
||||
for (var carLocation in controller.carLocationsModels)
|
||||
Marker(
|
||||
// anchor: const Offset(4, 4),
|
||||
position: LatLng(
|
||||
carLocation.latitude,
|
||||
carLocation.longitude,
|
||||
),
|
||||
icon: controller.carIcon,
|
||||
markerId: MarkerId(carLocation.toString()),
|
||||
rotation: carLocation.heading,
|
||||
),
|
||||
// controller.carMarrkerAplied,
|
||||
if (controller.statusRide == 'Apply')
|
||||
for (var carLocation
|
||||
in controller.driverCarsLocationToPassengerAfterApplied)
|
||||
Marker(
|
||||
// anchor: const Offset(4, 4),
|
||||
position: LatLng(
|
||||
carLocation.latitude,
|
||||
carLocation.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++)
|
||||
Marker(
|
||||
// anchor: const Offset(4, 4),
|
||||
position: LatLng(
|
||||
double.parse(controller.coordinatesWithoutEmpty[i]
|
||||
.split(',')[0]),
|
||||
double.parse(controller.coordinatesWithoutEmpty[i]
|
||||
.split(',')[1])),
|
||||
icon: controller.tripIcon,
|
||||
markerId: MarkerId(
|
||||
controller.coordinatesWithoutEmpty[i].toString())),
|
||||
if (controller.isMarkersShown)
|
||||
Marker(
|
||||
markerId: MarkerId('MyLocation'.tr),
|
||||
position: controller.newStartPointLocation,
|
||||
draggable: true,
|
||||
icon: controller.startIcon,
|
||||
),
|
||||
if (controller.isMarkersShown)
|
||||
Marker(
|
||||
markerId: MarkerId('Destination'.tr),
|
||||
position: controller.myDestination,
|
||||
draggable: true,
|
||||
icon: controller.endIcon,
|
||||
),
|
||||
if (controller.haveSteps)
|
||||
Marker(
|
||||
markerId: MarkerId('StartSteps'.tr),
|
||||
position: LatLng(
|
||||
double.parse(
|
||||
controller.placesCoordinate[0].split(',')[0]),
|
||||
double.parse(
|
||||
controller.placesCoordinate[0].split(',')[1])),
|
||||
draggable: true,
|
||||
icon: controller.startIcon,
|
||||
),
|
||||
if (controller.haveSteps)
|
||||
Marker(
|
||||
markerId: MarkerId('EndSteps'.tr),
|
||||
position: controller.latestPosition,
|
||||
draggable: true,
|
||||
icon: controller.endIcon,
|
||||
),
|
||||
},
|
||||
markers: controller.markers.toSet(),
|
||||
// {
|
||||
// if (controller.statusRide != 'Apply' ||
|
||||
// !controller.rideTimerBegin)
|
||||
// for (var carLocation in controller.carLocationsModels)
|
||||
|
||||
// // Marker(
|
||||
// // // anchor: const Offset(4, 4),
|
||||
// // position: LatLng(
|
||||
// // carLocation.latitude,
|
||||
// // carLocation.longitude,
|
||||
// // ),
|
||||
// // icon: controller.carIcon,
|
||||
// // markerId: MarkerId(carLocation.toString()),
|
||||
// // rotation: carLocation.heading,
|
||||
// // ),
|
||||
// // controller.carMarrkerAplied,
|
||||
// if (controller.statusRide == 'Apply')
|
||||
// // 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++)
|
||||
// Marker(
|
||||
// // anchor: const Offset(4, 4),
|
||||
// position: LatLng(
|
||||
// double.parse(controller.coordinatesWithoutEmpty[i]
|
||||
// .split(',')[0]),
|
||||
// double.parse(controller.coordinatesWithoutEmpty[i]
|
||||
// .split(',')[1])),
|
||||
// icon: controller.tripIcon,
|
||||
// markerId: MarkerId(
|
||||
// controller.coordinatesWithoutEmpty[i].toString())),
|
||||
// if (controller.isMarkersShown)
|
||||
// Marker(
|
||||
// markerId: MarkerId('MyLocation'.tr),
|
||||
// position: controller.newStartPointLocation,
|
||||
// draggable: true,
|
||||
// icon: controller.startIcon,
|
||||
// ),
|
||||
// if (controller.isMarkersShown)
|
||||
// Marker(
|
||||
// markerId: MarkerId('Destination'.tr),
|
||||
// position: controller.myDestination,
|
||||
// draggable: true,
|
||||
// icon: controller.endIcon,
|
||||
// ),
|
||||
// if (controller.haveSteps)
|
||||
// Marker(
|
||||
// markerId: MarkerId('StartSteps'.tr),
|
||||
// position: LatLng(
|
||||
// double.parse(
|
||||
// controller.placesCoordinate[0].split(',')[0]),
|
||||
// double.parse(
|
||||
// controller.placesCoordinate[0].split(',')[1])),
|
||||
// draggable: true,
|
||||
// icon: controller.startIcon,
|
||||
// ),
|
||||
// if (controller.haveSteps)
|
||||
// Marker(
|
||||
// markerId: MarkerId('EndSteps'.tr),
|
||||
// position: controller.latestPosition,
|
||||
// draggable: true,
|
||||
// icon: controller.endIcon,
|
||||
// ),
|
||||
// },
|
||||
|
||||
polylines: {
|
||||
Polyline(
|
||||
zIndex: 2,
|
||||
|
||||
Reference in New Issue
Block a user