Prechádzať zdrojové kódy

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

Viktoriia 1 rok pred
rodič
commit
35258a4453

+ 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(