diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2017-02-03 18:13:47 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-03 18:13:47 +0800 |
commit | a162e2da3e37841a4dab1b3c438992ad01af16db (patch) | |
tree | a7fb3c947a83649b978d2c0ad8e598a9d73870a6 /web/app/view/MapMarkerController.js | |
parent | 7b13ffa09f5d080d9a175ee3971c70e8cc07fc69 (diff) | |
parent | cad1c950fd79057ebfd89e362a2b54eb3e588a5c (diff) | |
download | trackermap-web-a162e2da3e37841a4dab1b3c438992ad01af16db.tar.gz trackermap-web-a162e2da3e37841a4dab1b3c438992ad01af16db.tar.bz2 trackermap-web-a162e2da3e37841a4dab1b3c438992ad01af16db.zip |
Merge pull request #401 from Abyss777/fix_400
Better cleanup after device remove
Diffstat (limited to 'web/app/view/MapMarkerController.js')
-rw-r--r-- | web/app/view/MapMarkerController.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/web/app/view/MapMarkerController.js b/web/app/view/MapMarkerController.js index 5e1861c4..39517553 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]; } } }, |