Fixed build.

Google map does not work

tags: #issue[34]
This commit is contained in:
William Muir
2017-08-03 11:26:44 +12:00
parent 87ef37a689
commit 8e24c204fd
2 changed files with 4 additions and 3 deletions
@@ -44,7 +44,7 @@ public class GeoUtility {
* and end up on a heading of 120° * and end up on a heading of 120°
*/ */
public static Double getBearing(GeoPoint p1, GeoPoint p2) { public static Double getBearing(GeoPoint p1, GeoPoint p2) {
return (getBearingRad(p1, p2) + 360.0) % 360.0; return (Math.toDegrees(getBearingRad(p1, p2)) + 360.0) % 360.0;
} }
/** /**
@@ -13,6 +13,7 @@ import javafx.geometry.Point2D;
import javafx.scene.Group; import javafx.scene.Group;
import javafx.scene.Node; import javafx.scene.Node;
import javafx.scene.image.ImageView; import javafx.scene.image.ImageView;
import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.Pane; import javafx.scene.layout.Pane;
import javafx.scene.paint.Color; import javafx.scene.paint.Color;
import javafx.scene.paint.Paint; import javafx.scene.paint.Paint;
@@ -88,8 +89,6 @@ public class GameView extends Pane {
public GameView () { public GameView () {
gameObjects = this.getChildren(); gameObjects = this.getChildren();
// create image view for map, bind panel size to image // create image view for map, bind panel size to image
// mapImage.fitWidthProperty().bind(this.widthProperty());
// mapImage.fitHeightProperty().bind(this.heightProperty());
gameObjects.add(mapImage); gameObjects.add(mapImage);
fpsDisplay.setLayoutX(5); fpsDisplay.setLayoutX(5);
fpsDisplay.setLayoutY(20); fpsDisplay.setLayoutY(20);
@@ -175,6 +174,8 @@ public class GameView extends Pane {
bottomRightPos.getLat(), originPos.getLng()); bottomRightPos.getLat(), originPos.getLng());
CanvasMap canvasMap = new CanvasMap(boundary); CanvasMap canvasMap = new CanvasMap(boundary);
mapImage.setImage(canvasMap.getMapImage()); mapImage.setImage(canvasMap.getMapImage());
mapImage.fitWidthProperty().bind(((AnchorPane) this.getParent()).heightProperty());
mapImage.fitHeightProperty().bind(((AnchorPane) this.getParent()).heightProperty());
} }
/** /**