Finished Google Maps API

This commit is contained in:
YaFedImYaEatIm
2016-09-17 18:01:35 +12:00
parent ae3fbefd0d
commit a9edea7690
7 changed files with 49 additions and 16 deletions
@@ -7,7 +7,7 @@ public class FlightPath {
private ArrayList<FlightPoint> flightPoints;
private String departureAirport;
private String arrivalAirport;
private RoutePath routePath;
final private RoutePath routePath = new RoutePath();
/**
*
@@ -91,8 +91,7 @@ public class FlightPath {
}
public RoutePath getRoutePath(){
if (routePath == null){
routePath = new RoutePath();
if (routePath.getRoute().size() == 0){
for (FlightPoint point: flightPoints){
routePath.addPosition(new Position(point.getLatitude(), point.getLongitude()));
}
@@ -22,6 +22,10 @@ public class RoutePath {
route.add(position);
}
public ArrayList<Position> getRoute() {
return route;
}
public String toJSONArray() {
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append("[");
@@ -32,4 +36,5 @@ public class RoutePath {
stringBuilder.append("]");
return stringBuilder.toString();
}
}