aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/MainModule.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2019-02-24 12:12:19 -0800
committerAnton Tananaev <anton.tananaev@gmail.com>2019-02-24 12:12:19 -0800
commita8566c997d27bf22ee0debad7b9b8c2db9325a43 (patch)
treeb6c272d45342781c72fa5c3b4fd6434c482c6f42 /src/org/traccar/MainModule.java
parent6d98e878f9ccd5b49a97ce7c04bbc4178e482fff (diff)
downloadtrackermap-server-a8566c997d27bf22ee0debad7b9b8c2db9325a43.tar.gz
trackermap-server-a8566c997d27bf22ee0debad7b9b8c2db9325a43.tar.bz2
trackermap-server-a8566c997d27bf22ee0debad7b9b8c2db9325a43.zip
Refactor hemisphere handler
Diffstat (limited to 'src/org/traccar/MainModule.java')
-rw-r--r--src/org/traccar/MainModule.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/org/traccar/MainModule.java b/src/org/traccar/MainModule.java
index 3b9bbe4b6..0e5c7d858 100644
--- a/src/org/traccar/MainModule.java
+++ b/src/org/traccar/MainModule.java
@@ -32,6 +32,7 @@ import org.traccar.geolocation.UnwiredGeolocationProvider;
import org.traccar.handler.DistanceHandler;
import org.traccar.handler.FilterHandler;
import org.traccar.handler.GeolocationHandler;
+import org.traccar.handler.HemisphereHandler;
import org.traccar.handler.RemoteAddressHandler;
import javax.annotation.Nullable;
@@ -108,6 +109,15 @@ public class MainModule extends AbstractModule {
@Singleton
@Provides
+ public static HemisphereHandler provideHemisphereHandler(Config config) {
+ if (config.hasKey(Keys.LOCATION_LATITUDE_HEMISPHERE) || config.hasKey(Keys.LOCATION_LONGITUDE_HEMISPHERE)) {
+ return new HemisphereHandler(config);
+ }
+ return null;
+ }
+
+ @Singleton
+ @Provides
public static RemoteAddressHandler provideRemoteAddressHandler(Config config) {
if (config.getBoolean(Keys.PROCESSING_REMOTE_ADDRESS_ENABLE)) {
return new RemoteAddressHandler();