aboutsummaryrefslogtreecommitdiff
path: root/modern/src/map/CurrentLocationMap.js
diff options
context:
space:
mode:
Diffstat (limited to 'modern/src/map/CurrentLocationMap.js')
-rw-r--r--modern/src/map/CurrentLocationMap.js9
1 files changed, 2 insertions, 7 deletions
diff --git a/modern/src/map/CurrentLocationMap.js b/modern/src/map/CurrentLocationMap.js
index c875662..69724ce 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;
};