aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/Map.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/app/view/Map.js')
-rw-r--r--web/app/view/Map.js15
1 files changed, 15 insertions, 0 deletions
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