Explorar o código

Merge branch 'location-fix' of SashaGoncharov19/nomadmania-app into dev

Viktoriia hai 1 ano
pai
achega
35258a4453
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      src/screens/InAppScreens/MapScreen/index.tsx

+ 3 - 1
src/screens/InAppScreens/MapScreen/index.tsx

@@ -254,7 +254,9 @@ const MapScreen: React.FC<MapScreenProps> = ({ navigation }) => {
   };
 
   const getLocation = async () => {
-    let currentLocation = await Location.getCurrentPositionAsync();
+    let currentLocation = await Location.getCurrentPositionAsync(
+      Platform.OS === 'ios' ? { accuracy: Location.Accuracy.Balanced } : {}
+    );
     setLocation(currentLocation.coords);
 
     mapRef.current?.animateToRegion(