This commit is contained in:
Hamza Aleghwairyeen
2024-03-30 13:49:27 +03:00
parent 6e417cbb75
commit fd9a2a518c
3 changed files with 21 additions and 9 deletions

View File

@@ -1664,7 +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++) {
// if (previousLocationOfDrivers != null) { // if (previousLocationOfDrivers != null) {
// angleDegrees = calculateAngleBetweenLocations( // angleDegrees = calculateAngleBetweenLocations(
// previousLocationOfDrivers, currentLocationOfDrivers); // previousLocationOfDrivers, currentLocationOfDrivers);
@@ -1674,10 +1675,21 @@ class MapPassengerController extends GetxController {
// print('currentLocationOfDrivers $currentLocationOfDrivers'); // print('currentLocationOfDrivers $currentLocationOfDrivers');
// } // }
final marker = Marker( final marker = Marker(
infoWindow: InfoWindow(title: '${item.latitude} minutes'), position: LatLng(
markerId: MarkerId(durationToPassenger.toString()), double.parse(
position: LatLng(item.latitude, item.longitude), datadriverCarsLocationToPassengerAfterApplied['message'][i]
rotation: item.headingList ['latitude']),
double.parse(
datadriverCarsLocationToPassengerAfterApplied['message'][i]
['longitude'])),
icon: carIcon,
markerId: MarkerId(
datadriverCarsLocationToPassengerAfterApplied['message'][i]
['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);

View File

@@ -116,7 +116,7 @@ GetBuilder<MapPassengerController> leftMainMenuIcons() {
// .showNotification('Order', 'hi this is', 'tone1'); // .showNotification('Order', 'hi this is', 'tone1');
// Get.to(() => DriverCallPage()); // Get.to(() => DriverCallPage());
// print(controller.carLocationsModels); // print(controller.carLocationsModels);
controller.getKazanPercent(); // controller.getKazanPercent();
// PassengerCallPage( // PassengerCallPage(
// channelName: '', // channelName: '',
// token: '', // token: '',