From 601ffd5cc7e1d6fa66938915264cd2c1d1dbf8bc Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Thu, 18 Jun 2015 15:02:04 +1200 Subject: Force initial async update --- web/app/view/map/MapController.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'web/app/view/map/MapController.js') diff --git a/web/app/view/map/MapController.js b/web/app/view/map/MapController.js index a0f167ec3..9e009218e 100644 --- a/web/app/view/map/MapController.js +++ b/web/app/view/map/MapController.js @@ -33,13 +33,16 @@ Ext.define('Traccar.view.map.MapController', { init: function() { this.liveData = {}; - this.update(); + this.update(true); }, - update: function() { + update: function(first) { Ext.Ajax.request({ scope: this, url: '/api/async', + params: { + first: first + }, success: function(response) { var data = Ext.decode(response.responseText).data; @@ -63,7 +66,7 @@ Ext.define('Traccar.view.map.MapController', { } } - this.update(); + this.update(false); }, failure: function() { // TODO: error -- cgit v1.2.3