📅  最后修改于: 2022-03-11 15:02:56.683000             🧑  作者: Mango
navigator.geolocation.getCurrentPosition((geo) => console.log(geo))
// or using lib
import Geolocation from '@react-native-community/geolocation';
Geolocation.getCurrentPosition(info => console.log(info));