📜  通过地理定位反应原生检测应用程序启动时的城市 - Javascript代码示例

📅  最后修改于: 2022-03-11 15:02:56.683000             🧑  作者: Mango

代码示例1
navigator.geolocation.getCurrentPosition((geo) => console.log(geo))

// or using lib

import Geolocation from '@react-native-community/geolocation';

Geolocation.getCurrentPosition(info => console.log(info));