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
// 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) {
// angleDegrees = calculateAngleBetweenLocations(
// previousLocationOfDrivers, currentLocationOfDrivers);
@@ -1674,12 +1675,23 @@ class MapPassengerController extends GetxController {
// print('currentLocationOfDrivers $currentLocationOfDrivers');
// }
final marker = Marker(
infoWindow: InfoWindow(title: '${item.latitude} minutes'),
markerId: MarkerId(durationToPassenger.toString()),
position: LatLng(item.latitude, item.longitude),
rotation: item.headingList
// Other properties for the marker, such as icon, info window, etc.
);
position: LatLng(
double.parse(
datadriverCarsLocationToPassengerAfterApplied['message'][i]
['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.
);
markers.add(marker);
update();
}

View File

@@ -27,7 +27,7 @@ class PassengerLocationMapPage extends StatelessWidget {
const PassengerInfoWindow(),
driverEndRideBar(),
const SosConnect(),
speedCircle(),
speedCircle(),
const GoogleMapApp(),
PricesWindow(),
],

View File

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