diff --git a/lib/controller/home/map_passenger_controller.dart b/lib/controller/home/map_passenger_controller.dart index 851876c..caef74d 100644 --- a/lib/controller/home/map_passenger_controller.dart +++ b/lib/controller/home/map_passenger_controller.dart @@ -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 =