From 1fd5eb5ca7e2b4cfa1f1e373a3602825d8fa07c0 Mon Sep 17 00:00:00 2001 From: Abyss777 Date: Thu, 27 Oct 2016 10:33:22 +0500 Subject: Implement live routes --- web/app/view/Map.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'web/app/view/Map.js') diff --git a/web/app/view/Map.js b/web/app/view/Map.js index 2cbd171..a19ac7d 100644 --- a/web/app/view/Map.js +++ b/web/app/view/Map.js @@ -43,6 +43,14 @@ Ext.define('Traccar.view.Map', { return this.geofencesSource; }, + getLiveRouteSource: function () { + return this.liveRouteSource; + }, + + getLiveRouteLayer: function () { + return this.liveRouteLayer; + }, + initMap: function () { this.callParent(); @@ -51,6 +59,13 @@ Ext.define('Traccar.view.Map', { source: this.geofencesSource })); + this.liveRouteSource = new ol.source.Vector({}); + this.liveRouteLayer = new ol.layer.Vector({ + source: this.liveRouteSource, + visible: false + }); + this.map.addLayer(this.liveRouteLayer); + this.latestSource = new ol.source.Vector({}); this.map.addLayer(new ol.layer.Vector({ source: this.latestSource -- cgit v1.2.3