diff options
Diffstat (limited to 'modern/src/map/CurrentLocationMap.js')
-rw-r--r-- | modern/src/map/CurrentLocationMap.js | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/modern/src/map/CurrentLocationMap.js b/modern/src/map/CurrentLocationMap.js index c875662d..69724ce1 100644 --- a/modern/src/map/CurrentLocationMap.js +++ b/modern/src/map/CurrentLocationMap.js @@ -1,14 +1,9 @@ import maplibregl from 'maplibre-gl'; import { useEffect } from 'react'; -import { useLocalization } from '../common/localization'; import { map } from './Map'; const CurrentLocationMap = () => { - const {direction} = useLocalization(); - useEffect(() => { - const controlsPosition = direction ==='rtl' ? 'top-left' : 'top-right'; - const control = new maplibregl.GeolocateControl({ positionOptions: { enableHighAccuracy: true, @@ -16,9 +11,9 @@ const CurrentLocationMap = () => { }, trackUserLocation: true, }); - map.addControl(control,controlsPosition); + map.addControl(control); return () => map.removeControl(control); - }, [direction]); + }, []); return null; }; |