update for travelmode change bug fixes

This commit is contained in:
Mohamed Nouffer
2022-07-10 23:50:43 +05:30
parent ce105a6754
commit 264cd828f4
9 changed files with 121 additions and 62 deletions

View File

@ -67,8 +67,12 @@ class DestinationService{
static Future<List<PointLatLng>>? getDestinationLine(List<Destination> destinations) async{
PolylinePoints polylinePoints = PolylinePoints();
if(destinations.length <= 0){
return [];
}
print("##### @@@@@ ${destinations[0].lat}");
//print("##### @@@@@ ${destinations[0].lat}");
PointLatLng origin = PointLatLng(destinations[0].lat!, destinations[0].lon!);
PointLatLng dest = PointLatLng(destinations[destinations.length -1].lat!, destinations[destinations.length -1].lon!);

View File

@ -13,6 +13,8 @@ class MatrixService{
int i = 0;
for(Destination d in destinations){
print("---- getting matrix for ${d} ------------");
if(i==0){
origin = "${d.lat}, ${d.lon}";
}