diff options
Diffstat (limited to 'web/app/view/state')
-rw-r--r-- | web/app/view/state/StateController.js | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/web/app/view/state/StateController.js b/web/app/view/state/StateController.js index 58b63120b..685805418 100644 --- a/web/app/view/state/StateController.js +++ b/web/app/view/state/StateController.js @@ -59,9 +59,13 @@ Ext.define('Traccar.view.state.StateController', { priority: 6, name: strings.positionSpeed }, - 'course': { +/* 'course': { priority: 7, name: strings.positionCourse + },*/ + 'odometer': { + priority: 7, + name: 'Odometer' }, 'address': { priority: 8, @@ -87,6 +91,13 @@ Ext.define('Traccar.view.state.StateController', { var unit = Traccar.getApplication().getUser().get('speedUnit') || Traccar.getApplication().getServer().get('speedUnit') || ''; value = speedUnits.convert(value, unit) + ' ' + speedUnits.getUnitName(unit); } + + if (key === 'odometer') { + var distanceUnits = Ext.getStore('DistanceUnits'); + var unit = Traccar.getApplication().getUser().get('distanceUnit') || Traccar.getApplication().getServer().get('distanceUnit') || ''; + value = distanceUnits.convert(value, unit) + ' ' + distanceUnits.getUnitName(unit); + } + store.add(Ext.create('Traccar.model.Parameter', { priority: this.keys[key].priority, name: this.keys[key].name, |