aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/Map.js
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2016-10-27 10:33:22 +0500
committerAbyss777 <abyss@fox5.ru>2016-10-27 10:33:22 +0500
commit1fd5eb5ca7e2b4cfa1f1e373a3602825d8fa07c0 (patch)
tree14cb9a24f9eb7ed877e567710cdab960a1f726dc /web/app/view/Map.js
parentf6915ca3bf4e8c2d9df5eb4cd5283614d4dd747e (diff)
downloadtrackermap-web-1fd5eb5ca7e2b4cfa1f1e373a3602825d8fa07c0.tar.gz
trackermap-web-1fd5eb5ca7e2b4cfa1f1e373a3602825d8fa07c0.tar.bz2
trackermap-web-1fd5eb5ca7e2b4cfa1f1e373a3602825d8fa07c0.zip
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