diff options
Diffstat (limited to 'src/org/traccar/DistanceHandler.java')
-rw-r--r-- | src/org/traccar/DistanceHandler.java | 4 |
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( |