diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-06-19 22:11:45 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-06-19 22:11:45 +1200 |
commit | 72e80e7a45ffdc149bd440c0f864f34492e8e994 (patch) | |
tree | eaa9855e4657e8d2c3b69fcb78fb551b6420d360 /web/app/view/map | |
parent | 2737d1c994a4d8e45946a701cb93ae57dd5fd802 (diff) | |
download | trackermap-server-72e80e7a45ffdc149bd440c0f864f34492e8e994.tar.gz trackermap-server-72e80e7a45ffdc149bd440c0f864f34492e8e994.tar.bz2 trackermap-server-72e80e7a45ffdc149bd440c0f864f34492e8e994.zip |
Update live data store
Diffstat (limited to 'web/app/view/map')
-rw-r--r-- | web/app/view/map/MapController.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/web/app/view/map/MapController.js b/web/app/view/map/MapController.js index 9e009218e..8b9a34b28 100644 --- a/web/app/view/map/MapController.js +++ b/web/app/view/map/MapController.js @@ -48,7 +48,12 @@ Ext.define('Traccar.view.map.MapController', { var i; for (i = 0; i < data.length; i++) { - + + // TODO check if exists and update + var store = Ext.getStore('LiveData'); + store.add(Ext.create('Traccar.model.Position', data[i])); + //store.commitChanges(); need for update? + var geometry = new ol.geom.Point(ol.proj.fromLonLat([ data[i].longitude, data[i].latitude |