diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2016-12-30 19:50:14 +1300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-30 19:50:14 +1300 |
commit | f5030b90ecde5a50e05cd81ed8d08b6387b8dead (patch) | |
tree | ba77288ff1d7f9750e6583139dc62b823a4cd5c6 /web/app/view/Map.js | |
parent | 3362bc6315a7711b40649ee3a07fbfc8b0ff4ef8 (diff) | |
parent | c6ba6502a41bfcb894245bee935006b3afb37d17 (diff) | |
download | etbsa-traccar-web-f5030b90ecde5a50e05cd81ed8d08b6387b8dead.tar.gz etbsa-traccar-web-f5030b90ecde5a50e05cd81ed8d08b6387b8dead.tar.bz2 etbsa-traccar-web-f5030b90ecde5a50e05cd81ed8d08b6387b8dead.zip |
Merge pull request #377 from Abyss777/selecting_improvement
Bring markers to front and deselect on empty space click
Diffstat (limited to 'web/app/view/Map.js')
-rw-r--r-- | web/app/view/Map.js | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/web/app/view/Map.js b/web/app/view/Map.js index 2cc37ec..7f109fd 100644 --- a/web/app/view/Map.js +++ b/web/app/view/Map.js @@ -85,18 +85,14 @@ Ext.define('Traccar.view.Map', { }] }, - getLatestSource: function () { - return this.latestSource; + getMarkersSource: function () { + return this.markersSource; }, getRouteSource: function () { return this.routeSource; }, - getReportSource: function () { - return this.reportSource; - }, - getGeofencesSource: function () { return this.geofencesSource; }, @@ -114,6 +110,7 @@ Ext.define('Traccar.view.Map', { this.geofencesSource = new ol.source.Vector({}); this.map.addLayer(new ol.layer.Vector({ + name: 'geofencesLayer', source: this.geofencesSource })); @@ -124,19 +121,14 @@ Ext.define('Traccar.view.Map', { }); this.map.addLayer(this.liveRouteLayer); - this.latestSource = new ol.source.Vector({}); - this.map.addLayer(new ol.layer.Vector({ - source: this.latestSource - })); - this.routeSource = new ol.source.Vector({}); this.map.addLayer(new ol.layer.Vector({ source: this.routeSource })); - this.reportSource = new ol.source.Vector({}); + this.markersSource = new ol.source.Vector({}); this.map.addLayer(new ol.layer.Vector({ - source: this.reportSource + source: this.markersSource })); } }); |