Skip to content

Commit 15d647c

Browse files
author
Tomáš Marek
committed
Remove Google Maps Api
1 parent 828b275 commit 15d647c

File tree

5 files changed

+39
-0
lines changed

5 files changed

+39
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/src/app/application.properties

.idea/artifacts/geoquiz2.xml

+25
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

META-INF/MANIFEST.MF

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Manifest-Version: 1.0
2+
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
GoogleMapsAPI.license.key="<ENTER-GOOGLE-MAPS-APIKEY>"

src/app/controllers/GameController.java

+10
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@
1212
import com.dlsc.gmapsfx.javascript.object.MapTypeIdEnum;
1313

1414
import java.io.IOException;
15+
import java.io.InputStream;
1516
import java.net.URL;
1617
import java.text.DecimalFormat;
18+
import java.util.Properties;
1719
import java.util.ResourceBundle;
1820

1921
import javafx.concurrent.Task;
@@ -63,6 +65,7 @@ public class GameController implements Initializable {
6365
private boolean multiplayer = false;
6466

6567
private String actualplayer;
68+
private String googleMapsApiKey;
6669

6770
private int playerOneScore = 0;
6871

@@ -92,6 +95,13 @@ private void confirmSelect(ActionEvent e) throws IOException {
9295

9396
@Override
9497
public void initialize(URL url, ResourceBundle rb) {
98+
Properties properties = new Properties();
99+
try (InputStream is = getClass().getResourceAsStream("../application.properties")) {
100+
properties.load(is);
101+
googleMapsApiKey = properties.getProperty("GoogleMapsAPI.license.key");
102+
} catch (IOException e) {
103+
throw new RuntimeException(e);
104+
}
95105
roundsCount = 10;
96106
try {
97107
nextGame(false);

0 commit comments

Comments
 (0)