summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValentin Blot <14005-vblot@users.noreply.gitlab.gnome.org>2019-08-27 11:29:15 +0200
committerMarcus Lundblad <ml@update.uu.se>2019-08-28 20:11:10 +0000
commit42cb877cfe00100be45ff2acd24cffeef41b634c (patch)
tree40a24b5a7d9d73b69f43a9d03b9161fce6206f50
parent118259ca4d21d5721079d57ac1ccbca6bfe7d2b9 (diff)
downloadgnome-maps-42cb877cfe00100be45ff2acd24cffeef41b634c.tar.gz
mapView: destroy old location on location update
-rw-r--r--src/mapView.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mapView.js b/src/mapView.js
index 5d030ac0..36102729 100644
--- a/src/mapView.js
+++ b/src/mapView.js
@@ -476,6 +476,8 @@ var MapView = GObject.registerClass({
let place = Application.geoclue.place;
let previousSelected = this._userLocation && this._userLocation.selected;
+ if (this._userLocation)
+ this._userLocation.destroy();
this._userLocation = new UserLocationMarker.UserLocationMarker({ place: place,
mapView: this });
this._userLocationLayer.remove_all();