diff --git a/src/components/geolocate-control.js b/src/components/geolocate-control.js index d21e5c4f..441ae4e5 100644 --- a/src/components/geolocate-control.js +++ b/src/components/geolocate-control.js @@ -96,7 +96,6 @@ export default class GeolocateControl extends BaseControl< _mapboxGeolocateControl: any = null; _geolocateButtonRef: {current: null | HTMLButtonElement} = createRef(); - _markerRef: {current: null | Marker} = createRef(); componentDidMount() { isGeolocationSupported().then(result => { @@ -105,14 +104,6 @@ export default class GeolocateControl extends BaseControl< }); } - componentDidUpdate() { - // MapboxGeolocateControl needs manipulate the style of Marker's container - const markerRef = this._markerRef.current; - if (this._mapboxGeolocateControl && markerRef) { - this._mapboxGeolocateControl._dotElement = markerRef._containerRef.current; - } - } - componentWillUnmount() { // re-implement MapboxGeolocateControl's _onRemove // clear the geolocation watch if exists @@ -235,7 +226,6 @@ export default class GeolocateControl extends BaseControl< // $FlowFixMe