aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/MapMarkerController.js
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2017-02-03 11:59:57 +0500
committerAbyss777 <abyss@fox5.ru>2017-02-03 15:05:44 +0500
commitcad1c950fd79057ebfd89e362a2b54eb3e588a5c (patch)
tree3267602d17f689d6d0bceb24a94ae1a58863a0bb /web/app/view/MapMarkerController.js
parent962c40e2127f9c9a7687e4ccb7a6d4a33ac203f7 (diff)
downloadetbsa-traccar-web-cad1c950fd79057ebfd89e362a2b54eb3e588a5c.tar.gz
etbsa-traccar-web-cad1c950fd79057ebfd89e362a2b54eb3e588a5c.tar.bz2
etbsa-traccar-web-cad1c950fd79057ebfd89e362a2b54eb3e588a5c.zip
Better cleanup after device remove
Diffstat (limited to 'web/app/view/MapMarkerController.js')
-rw-r--r--web/app/view/MapMarkerController.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/web/app/view/MapMarkerController.js b/web/app/view/MapMarkerController.js
index 5e1861c..3951755 100644
--- a/web/app/view/MapMarkerController.js
+++ b/web/app/view/MapMarkerController.js
@@ -149,6 +149,15 @@ Ext.define('Traccar.view.MapMarkerController', {
deviceId = data[i].get('id');
if (this.latestMarkers[deviceId]) {
this.getView().getMarkersSource().removeFeature(this.latestMarkers[deviceId]);
+ delete this.latestMarkers[deviceId];
+ }
+ if (this.accuracyCircles[deviceId]) {
+ this.getView().getAccuracySource().removeFeature(this.accuracyCircles[deviceId]);
+ delete this.accuracyCircles[deviceId];
+ }
+ if (this.liveRoutes[deviceId]) {
+ this.getView().getLiveRouteSource().removeFeature(this.liveRoutes[deviceId]);
+ delete this.liveRoutes[deviceId];
}
}
},