This commit is contained in:
Hamza Aleghwairyeen
2024-03-31 14:28:21 +03:00
parent 5df659ecd5
commit 768f4d3adc

View File

@@ -1912,6 +1912,23 @@ class MapPassengerController extends GetxController {
startNameAddress = data[0]['start_address'];
endNameAddress = data[0]['end_address'];
isLoading = false;
newStartPointLocation = LatLng(
data[0]["start_location"]['lat'], data[0]["start_location"]['lng']);
markers.add(
Marker(
markerId: MarkerId(startNameAddress),
position: newStartPointLocation,
icon: startIcon,
),
);
markers.add(
Marker(
markerId: MarkerId(endNameAddress),
position: LatLng(
data[0]["end_location"]['lat'], data[0]["end_location"]['lng']),
icon: endIcon,
),
);
update();
durationToRide = data[0]['duration']['value'];
final points =
@@ -1922,8 +1939,7 @@ class MapPassengerController extends GetxController {
polylineCoordinates.add(LatLng(lat, lng));
}
// Define the northeast and southwest coordinates
newStartPointLocation = LatLng(
data[0]["start_location"]['lat'], data[0]["start_location"]['lng']);
// Define the northeast and southwest coordinates
final bounds = response["routes"][0]["bounds"];
LatLng northeast =