aboutsummaryrefslogtreecommitdiff
path: root/modern/src/map/CurrentLocationMap.js
diff options
context:
space:
mode:
authorrahighi <rahighi>2021-08-28 09:41:25 +0430
committerrahighi <rahighi>2021-08-28 09:41:25 +0430
commit545f0d8223e88631f8d7c13077ffe5bae78716cb (patch)
tree51d4c2132b2136208c0f18603ff6bf53b2983fd3 /modern/src/map/CurrentLocationMap.js
parent332681f36dc9814e51c61d0e310f6c5d8a0f0c20 (diff)
downloadtrackermap-web-545f0d8223e88631f8d7c13077ffe5bae78716cb.tar.gz
trackermap-web-545f0d8223e88631f8d7c13077ffe5bae78716cb.tar.bz2
trackermap-web-545f0d8223e88631f8d7c13077ffe5bae78716cb.zip
Only multiple language support feature
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 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;
};