aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/BasePipelineFactory.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-08-14 16:31:24 +0300
committerGitHub <noreply@github.com>2016-08-14 16:31:24 +0300
commit15b5ac0768ee7236d1af025460a3bdd4f8fa6994 (patch)
tree778506714b81ffb4fece27a4e6fa2eb5bf17e824 /src/org/traccar/BasePipelineFactory.java
parentd9777620508a7b197f0e5752869eef91d83e20a0 (diff)
parent6c8609aa3151246ab171995ef08c161e5d3b8242 (diff)
downloadtrackermap-server-15b5ac0768ee7236d1af025460a3bdd4f8fa6994.tar.gz
trackermap-server-15b5ac0768ee7236d1af025460a3bdd4f8fa6994.tar.bz2
trackermap-server-15b5ac0768ee7236d1af025460a3bdd4f8fa6994.zip
Merge pull request #2211 from Abyss777/distance
Changed way of summary distance calculation
Diffstat (limited to 'src/org/traccar/BasePipelineFactory.java')
-rw-r--r--src/org/traccar/BasePipelineFactory.java11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/org/traccar/BasePipelineFactory.java b/src/org/traccar/BasePipelineFactory.java
index ed7aa0a69..615251d5f 100644
--- a/src/org/traccar/BasePipelineFactory.java
+++ b/src/org/traccar/BasePipelineFactory.java
@@ -132,9 +132,7 @@ public abstract class BasePipelineFactory implements ChannelPipelineFactory {
Context.getLocationProvider(), Context.getConfig().getBoolean("location.processInvalidPositions"));
}
- if (Context.getConfig().getBoolean("distance.enable")) {
- distanceHandler = new DistanceHandler();
- }
+ distanceHandler = new DistanceHandler();
if (Context.getConfig().hasKey("location.latitudeHemisphere")
|| Context.getConfig().hasKey("location.longitudeHemisphere")) {
@@ -181,9 +179,6 @@ public abstract class BasePipelineFactory implements ChannelPipelineFactory {
if (hemisphereHandler != null) {
pipeline.addLast("hemisphere", hemisphereHandler);
}
- if (distanceHandler != null) {
- pipeline.addLast("distance", distanceHandler);
- }
if (reverseGeocoderHandler != null) {
pipeline.addLast("geocoder", reverseGeocoderHandler);
}
@@ -202,6 +197,10 @@ public abstract class BasePipelineFactory implements ChannelPipelineFactory {
pipeline.addLast("coordinatesHandler", coordinatesHandler);
}
+ if (distanceHandler != null) {
+ pipeline.addLast("distance", distanceHandler);
+ }
+
if (Context.getDataManager() != null) {
pipeline.addLast("dataHandler", new DefaultDataHandler());
}