aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/Map.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-10-29 10:51:31 +1300
committerGitHub <noreply@github.com>2016-10-29 10:51:31 +1300
commit854476dcd9bb9b3b48d297cb7369cfe719c492f9 (patch)
treefc591e0ebfd98beb287ab8d5332109a0ada7a7ea /web/app/view/Map.js
parentf6915ca3bf4e8c2d9df5eb4cd5283614d4dd747e (diff)
parent6bcc6ab2a9cd097e543ede5ee520034221045b3e (diff)
downloadtrackermap-web-854476dcd9bb9b3b48d297cb7369cfe719c492f9.tar.gz
trackermap-web-854476dcd9bb9b3b48d297cb7369cfe719c492f9.tar.bz2
trackermap-web-854476dcd9bb9b3b48d297cb7369cfe719c492f9.zip
Merge pull request #308 from Abyss777/live_route
Implement live routes
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 2cbd1714..a19ac7d5 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