Remove marker when GeolocateControl is disabled (#960)

This commit is contained in:
Aleksi Hietanen 2019-12-18 21:33:02 +02:00 committed by Xiaoji Chen
parent 737b80d362
commit d24efc4602

View File

@ -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();