diff options
author | Iván Ávalos <avalos@disroot.org> | 2021-12-06 22:17:25 -0600 |
---|---|---|
committer | Iván Ávalos <avalos@disroot.org> | 2021-12-06 22:17:25 -0600 |
commit | a273d60becc5ccc9e4626325ea2dca20271b36bc (patch) | |
tree | 1fe4a6651a6e93514b15e7431e125e1c4226c17f /web/app/view/map/Map.js | |
parent | cf3555f3d9330f6711bd27ec9a24b74106703000 (diff) | |
parent | f00ddba99b1d56c9471b19e68c8354ed27749d36 (diff) | |
download | etbsa-traccar-web-a273d60becc5ccc9e4626325ea2dca20271b36bc.tar.gz etbsa-traccar-web-a273d60becc5ccc9e4626325ea2dca20271b36bc.tar.bz2 etbsa-traccar-web-a273d60becc5ccc9e4626325ea2dca20271b36bc.zip |
Merge branch 'master' of git://github.com/traccar/traccar-web
Diffstat (limited to 'web/app/view/map/Map.js')
-rw-r--r-- | web/app/view/map/Map.js | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/web/app/view/map/Map.js b/web/app/view/map/Map.js index fbaa758..36e81de 100644 --- a/web/app/view/map/Map.js +++ b/web/app/view/map/Map.js @@ -66,6 +66,13 @@ Ext.define('Traccar.view.map.Map', { stateId: 'show-geofences-button', tooltip: Strings.sharedGeofences }, { + handler: 'showAccuracy', + reference: 'showAccuracyButton', + glyph: 'xf140@FontAwesome', + pressed: true, + stateId: 'show-accuracy-button', + tooltip: Strings.positionAccuracy + }, { handler: 'showCurrentLocation', glyph: 'xf124@FontAwesome', tooltip: Strings.mapCurrentLocation @@ -95,6 +102,10 @@ Ext.define('Traccar.view.map.Map', { return this.accuracySource; }, + getAccuracyLayer: function () { + return this.accuracyLayer; + }, + getRouteSource: function () { return this.routeSource; }, @@ -133,10 +144,11 @@ Ext.define('Traccar.view.map.Map', { })); this.accuracySource = new ol.source.Vector({}); - this.map.addLayer(new ol.layer.Vector({ + this.accuracyLayer = new ol.layer.Vector({ name: 'accuracyLayer', source: this.accuracySource - })); + }); + this.map.addLayer(this.accuracyLayer); this.markersSource = new ol.source.Vector({}); this.map.addLayer(new ol.layer.Vector({ |