aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/DistanceHandler.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/DistanceHandler.java')
-rw-r--r--src/org/traccar/DistanceHandler.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/org/traccar/DistanceHandler.java b/src/org/traccar/DistanceHandler.java
index 6232c555f..1586d116b 100644
--- a/src/org/traccar/DistanceHandler.java
+++ b/src/org/traccar/DistanceHandler.java
@@ -36,8 +36,8 @@ public class DistanceHandler extends BaseDataHandler {
Position last = getLastPosition(position.getDeviceId());
if (last != null) {
- if (last.getOther().containsKey(Event.KEY_DISTANCE)) {
- distance = ((Number) last.getOther().get(Event.KEY_DISTANCE)).doubleValue();
+ if (last.getAttributes().containsKey(Event.KEY_DISTANCE)) {
+ distance = ((Number) last.getAttributes().get(Event.KEY_DISTANCE)).doubleValue();
}
distance += DistanceCalculator.distance(