Browse Source

Changing useLocation method for getting better user coordinates. Accuracy.Highest is set.

master
GabrielTrettel 4 years ago
parent
commit
df1128f832
  1. 4
      src/app/hooks/useLocation.js

4
src/app/hooks/useLocation.js

@ -14,7 +14,9 @@ export default function useLocation(
const { const {
coords: { latitude, longitude }, coords: { latitude, longitude },
} = await Location.getLastKnownPositionAsync();
} = await Location.getCurrentPositionAsync({
accuracy: Location.Accuracy.Highest,
});
setLocation({ latitude, longitude }); setLocation({ latitude, longitude });
} catch (error) { } catch (error) {

Loading…
Cancel
Save