diff options
author | Anton Tananaev <anton@traccar.org> | 2024-04-17 07:47:01 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2024-04-17 07:47:01 -0700 |
commit | ef67a4c1577b2fbabb04c4de9b08b6d778c78952 (patch) | |
tree | ce0670aa9e74c52602b842546ced9649f2c73f86 /src/main/java/org/traccar/MainModule.java | |
parent | 8458c3f3cbf6a42fde3d455c9c231498ca0fa184 (diff) | |
download | trackermap-server-ef67a4c1577b2fbabb04c4de9b08b6d778c78952.tar.gz trackermap-server-ef67a4c1577b2fbabb04c4de9b08b6d778c78952.tar.bz2 trackermap-server-ef67a4c1577b2fbabb04c4de9b08b6d778c78952.zip |
Move some defaults to the code
Diffstat (limited to 'src/main/java/org/traccar/MainModule.java')
-rw-r--r-- | src/main/java/org/traccar/MainModule.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/MainModule.java b/src/main/java/org/traccar/MainModule.java index d1d3d4663..89d3d2fe0 100644 --- a/src/main/java/org/traccar/MainModule.java +++ b/src/main/java/org/traccar/MainModule.java @@ -191,7 +191,7 @@ public class MainModule extends AbstractModule { @Provides public static WebServer provideWebServer(Injector injector, Config config) { - if (config.hasKey(Keys.WEB_PORT)) { + if (config.getInteger(Keys.WEB_PORT) > 0) { return new WebServer(injector, config); } return null; @@ -201,7 +201,7 @@ public class MainModule extends AbstractModule { @Provides public static Geocoder provideGeocoder(Config config, Client client, StatisticsManager statisticsManager) { if (config.getBoolean(Keys.GEOCODER_ENABLE)) { - String type = config.getString(Keys.GEOCODER_TYPE, "google"); + String type = config.getString(Keys.GEOCODER_TYPE); String url = config.getString(Keys.GEOCODER_URL); String key = config.getString(Keys.GEOCODER_KEY); String language = config.getString(Keys.GEOCODER_LANGUAGE); |