finalized destination class, first commit for route class
This commit is contained in:
parent
3ad2b6aae4
commit
83d8742229
2 changed files with 25 additions and 0 deletions
|
@ -29,4 +29,7 @@ public class Destination {
|
||||||
//prompt error message
|
//prompt error message
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public double[] getDestinationCoordinates() {return coordinates;}
|
||||||
|
public String getDestinationAddress() {return destinationAddress;}
|
||||||
}
|
}
|
22
Route.java
Normal file
22
Route.java
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
public class Route {
|
||||||
|
private double[] currentLocation; //Lat-Long coordinates for current location
|
||||||
|
private double[][] routeSequence; //2D array of lat-long pairs that form a route sequence
|
||||||
|
private boolean tollsFlag; //stores user setting for whether to avoid tolls
|
||||||
|
private boolean hwyFlag; //stores user preference for whether to avoid major highways
|
||||||
|
public long timeEstimate; //time estimate in seconds
|
||||||
|
public float tollsAmount; //stores toll amount if toll roads are used
|
||||||
|
public Destination currentDestination; //uses user-created class Destination
|
||||||
|
|
||||||
|
private void updateCurrentLocation() {
|
||||||
|
//execute api call out to GPS service to obtain current location
|
||||||
|
//current location will be hardcoded for testing
|
||||||
|
double[] tmpLoc = {28.1700863880887, -80.67088403224037};
|
||||||
|
currentLocation = tmpLoc;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void calculateRoute() {
|
||||||
|
//execute api call out to routing service to get route info
|
||||||
|
updateCurrentLocation();
|
||||||
|
//double[][] tmpSeq = apiCallToRouting(currentLocation, tmpLocation)
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue