diff options
Diffstat (limited to 'web/app/view/state')
-rw-r--r-- | web/app/view/state/StateController.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/web/app/view/state/StateController.js b/web/app/view/state/StateController.js index 1e2c271d1..66b1c48ac 100644 --- a/web/app/view/state/StateController.js +++ b/web/app/view/state/StateController.js @@ -81,10 +81,16 @@ Ext.define('Traccar.view.state.StateController', { for (var key in position.data) { if (position.data.hasOwnProperty(key) && this.keys[key] !== undefined) { + var value = position.get(key); + if (key === 'speed') { + var speedUnits = Ext.getStore('SpeedUnits'); + var unit = Traccar.getApplication().getUser().get('speedUnit') || Traccar.getApplication().getServer().get('speedUnit') || ''; + value = speedUnits.convert(value, unit) + ' ' + speedUnits.getUnitName(unit); + } store.add(Ext.create('Traccar.model.Parameter', { priority: this.keys[key].priority, name: this.keys[key].name, - value: position.get(key) + value: value })); } } |