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.js23
1 files changed, 16 insertions, 7 deletions
diff --git a/web/app/view/Map.js b/web/app/view/Map.js
index 7d81699a3..2db7d479d 100644
--- a/web/app/view/Map.js
+++ b/web/app/view/Map.js
@@ -35,13 +35,17 @@ Ext.define('Traccar.view.Map', {
return this.mapView;
},
- getVectorSource: function () {
- return this.vectorSource;
+ getLatestSource: function () {
+ return this.latestSource;
+ },
+
+ getReportSource: function () {
+ return this.reportSource;
},
listeners: {
afterrender: function () {
- var user, server, layer, type, bingKey, vectorLayer, lat, lon, zoom, target;
+ var user, server, layer, type, bingKey, latestLayer, reportLayer, lat, lon, zoom, target;
user = Traccar.app.getUser();
server = Traccar.app.getServer();
@@ -78,9 +82,14 @@ Ext.define('Traccar.view.Map', {
});
}
- this.vectorSource = new ol.source.Vector({});
- vectorLayer = new ol.layer.Vector({
- source: this.vectorSource
+ this.latestSource = new ol.source.Vector({});
+ latestLayer = new ol.layer.Vector({
+ source: this.latestSource
+ });
+
+ this.reportSource = new ol.source.Vector({});
+ reportLayer = new ol.layer.Vector({
+ source: this.reportSource
});
lat = user.get('latitude') || server.get('latitude') || Traccar.Style.mapDefaultLat;
@@ -95,7 +104,7 @@ Ext.define('Traccar.view.Map', {
this.map = new ol.Map({
target: this.body.dom.id,
- layers: [layer, vectorLayer],
+ layers: [layer, latestLayer, reportLayer],
view: this.mapView
});