4/1/1
This commit is contained in:
@@ -471,7 +471,7 @@ class MapPassengerController extends GetxController {
|
||||
|
||||
// Format the message.
|
||||
String message =
|
||||
'${'${'Hi! This is'.tr} ${box.read(BoxName.name)}.\n${' I am using'.tr}'} ${box.read(AppInformation.appName)}${' to ride with'.tr} $firstName${' as the driver.'.tr} $firstName \n${'is driving a '.tr}$model\n${' with license plate '.tr}$licensePlate.\n${' I am currently located at '.tr}$passengerLocation.\n${' If you need to reach me, please contact the driver directly at'.tr}\n\n $driverPhone.';
|
||||
'${'${'Hi! This is'.tr} ${box.read(BoxName.name)}.\n${' I am using'.tr}'} ${AppInformation.appName}${' to ride with'.tr} $firstName${' as the driver.'.tr} $firstName \n${'is driving a '.tr}$model\n${' with license plate '.tr}$licensePlate.\n${' I am currently located at '.tr} https://www.google.com/maps/place/${passengerLocation.latitude},${passengerLocation.longitude}.\n${' If you need to reach me, please contact the driver directly at'.tr}\n\n $driverPhone.';
|
||||
|
||||
// Launch the URL to send the SMS.
|
||||
launchCommunication('whatsapp', to, message);
|
||||
@@ -1199,18 +1199,16 @@ class MapPassengerController extends GetxController {
|
||||
}
|
||||
|
||||
void reloadMarkerDriverCarsLocationToPassengerAfterApplied() {
|
||||
// Clear existing markers
|
||||
// markers.clear();
|
||||
// update();
|
||||
clearMarkersExceptStartEnd();
|
||||
// for (var i = 0; i < driverCarsLocationToPassengerAfterApplied.length; i++) {
|
||||
LatLng driverPosition = LatLng(
|
||||
double.parse(
|
||||
datadriverCarsLocationToPassengerAfterApplied[0]['latitude']),
|
||||
double.parse(
|
||||
datadriverCarsLocationToPassengerAfterApplied[0]['longitude']));
|
||||
final driverAcceptedMarker = Marker(
|
||||
markerId: const MarkerId('driverToPassengers'),
|
||||
position: LatLng(
|
||||
double.parse(
|
||||
datadriverCarsLocationToPassengerAfterApplied[0]['latitude']),
|
||||
double.parse(
|
||||
datadriverCarsLocationToPassengerAfterApplied[0]['longitude'])),
|
||||
position: driverPosition,
|
||||
rotation: double.parse(
|
||||
datadriverCarsLocationToPassengerAfterApplied['message'][0]
|
||||
['heading']),
|
||||
@@ -1218,9 +1216,7 @@ class MapPassengerController extends GetxController {
|
||||
);
|
||||
markers.add(driverAcceptedMarker);
|
||||
// update();
|
||||
mapController?.animateCamera(CameraUpdate.newLatLng(LatLng(
|
||||
driverCarsLocationToPassengerAfterApplied[0].latitude,
|
||||
driverCarsLocationToPassengerAfterApplied[0].longitude)));
|
||||
mapController?.animateCamera(CameraUpdate.newLatLng(driverPosition));
|
||||
update();
|
||||
// } // Update the map with the new markers
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user