changed routingAPI to return variable speed/tolls
This commit is contained in:
parent
9a9fd30554
commit
27d69cecd5
1 changed files with 16 additions and 14 deletions
|
@ -26,23 +26,25 @@ public class HelperFunctions {
|
||||||
if (tollsFlag && hwyFlag) { //provides a result that both avoid tolls and major highways
|
if (tollsFlag && hwyFlag) { //provides a result that both avoid tolls and major highways
|
||||||
routeArray[0] = startCoords;
|
routeArray[0] = startCoords;
|
||||||
routeArray[1] = destinationCoords;
|
routeArray[1] = destinationCoords;
|
||||||
routeArray[0][2] = 45;
|
routeArray[0][2] = 45; //avg speed leg 1
|
||||||
routeArray[1][2] = 45;
|
routeArray[0][3] = 0; //tolls leg 1
|
||||||
|
routeArray[1][2] = 45; //avg speed leg 2
|
||||||
|
routeArray[1][3] = 0; //tolls leg 2
|
||||||
} else if (tollsFlag && !hwyFlag) { //provides a result that avoids tolls but not major highways
|
} else if (tollsFlag && !hwyFlag) { //provides a result that avoids tolls but not major highways
|
||||||
routeArray[0] = startCoords;
|
routeArray[0][2] = 60; //avg speed leg 1
|
||||||
routeArray[1] = destinationCoords;
|
routeArray[0][3] = 0; //tolls leg 1
|
||||||
routeArray[0][2] = 45;
|
routeArray[1][2] = 45; //avg speed leg 2
|
||||||
routeArray[1][2] = 45;
|
routeArray[1][3] = 0; //tolls leg 2
|
||||||
} else if (!tollsFlag && hwyFlag) { //provides a result that does not avoid tolls and does avoid major highways
|
} else if (!tollsFlag && hwyFlag) { //provides a result that does not avoid tolls and does avoid major highways
|
||||||
routeArray[0] = startCoords;
|
routeArray[0][2] = 45; //avg speed leg 1
|
||||||
routeArray[1] = destinationCoords;
|
routeArray[0][3] = 1.50; //tolls leg 1
|
||||||
routeArray[0][2] = 45;
|
routeArray[1][2] = 45; //avg speed leg 2
|
||||||
routeArray[1][2] = 45;
|
routeArray[1][3] = 0; //tolls leg 2
|
||||||
} else if (!tollsFlag && !hwyFlag) { //provides a result that does not avoid tolls or major highways
|
} else if (!tollsFlag && !hwyFlag) { //provides a result that does not avoid tolls or major highways
|
||||||
routeArray[0] = startCoords;
|
routeArray[0][2] = 60; //avg speed leg 1
|
||||||
routeArray[1] = destinationCoords;
|
routeArray[0][3] = 1.50; //tolls leg 1
|
||||||
routeArray[0][2] = 45;
|
routeArray[1][2] = 45; //avg speed leg 2
|
||||||
routeArray[1][2] = 45;
|
routeArray[1][3] = 0; //tolls leg 2
|
||||||
}
|
}
|
||||||
return routeArray;
|
return routeArray;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue