From d24efc4602848d52ff7c06a62f2c00aba8e9c87c Mon Sep 17 00:00:00 2001 From: Aleksi Hietanen Date: Wed, 18 Dec 2019 21:33:02 +0200 Subject: [PATCH] Remove marker when GeolocateControl is disabled (#960) --- src/components/geolocate-control.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/geolocate-control.js b/src/components/geolocate-control.js index d8516200..3da476ee 100644 --- a/src/components/geolocate-control.js +++ b/src/components/geolocate-control.js @@ -162,6 +162,7 @@ export default class GeolocateControl extends BaseControl< if (this.props.showUserLocation) { this._mapboxGeolocateControl.on('geolocate', this._updateMarker); + this._mapboxGeolocateControl.on('trackuserlocationend', this._updateMarker); } return this._mapboxGeolocateControl.trigger();