From dc2ceba479c50d34a3d4c305edaf938a2df391a9 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 31 Dec 2016 12:03:47 +1300 Subject: Show accuracy in the web interface --- web/app/AttributeFormatter.js | 2 +- web/app/model/Position.js | 3 +++ web/app/view/StateController.js | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) (limited to 'web/app') diff --git a/web/app/AttributeFormatter.js b/web/app/AttributeFormatter.js index d3c2812..2142465 100644 --- a/web/app/AttributeFormatter.js +++ b/web/app/AttributeFormatter.js @@ -76,7 +76,7 @@ Ext.define('Traccar.AttributeFormatter', { return this.speedFormatter; } else if (key === 'course') { return this.courseFormatter; - } else if (key === 'distance' || key === 'odometer' || key === 'totalDistance') { + } else if (key === 'distance' || key === 'odometer' || key === 'totalDistance' || key === 'accuracy') { return this.distanceFormatter; } else if (key === 'hours') { return this.hoursFormatter; diff --git a/web/app/model/Position.js b/web/app/model/Position.js index 362ca58..3b85a1b 100644 --- a/web/app/model/Position.js +++ b/web/app/model/Position.js @@ -43,6 +43,9 @@ Ext.define('Traccar.model.Position', { }, { name: 'valid', type: 'boolean' + }, { + name: 'accuracy', + type: 'float' }, { name: 'latitude', type: 'float' diff --git a/web/app/view/StateController.js b/web/app/view/StateController.js index bef54d2..f9be113 100644 --- a/web/app/view/StateController.js +++ b/web/app/view/StateController.js @@ -61,7 +61,7 @@ Ext.define('Traccar.view.StateController', { keys: (function () { var i, list, result; result = {}; - list = ['fixTime', 'latitude', 'longitude', 'valid', 'altitude', 'speed', 'course', 'address', 'protocol']; + list = ['fixTime', 'latitude', 'longitude', 'valid', 'accuracy', 'altitude', 'speed', 'course', 'address', 'protocol']; for (i = 0; i < list.length; i++) { result[list[i]] = { priority: i, -- cgit v1.2.3