【问题标题】:react native - get gps without internet connectionreact native - 在没有互联网连接的情况下获取 gps
【发布时间】:2017-09-09 14:47:48
【问题描述】:

我的情况是检测当前位置,尽管没有互联网连接。那么,是否有任何 RN 库能够在没有互联网连接的情况下检测当前 GPS 位置?

【问题讨论】:

    标签: android react-native android-gps


    【解决方案1】:

    这与模块无关。您需要将<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> 添加到AndroidManifest.xml。要在 react native 中使用 map,您可以使用 react-native-maps。要获取当前位置,您可以使用 Geolocation API 它是 getCurrentPosition 方法。

    【讨论】:

      猜你喜欢
      • 2013-09-11
      • 1970-01-01
      • 2015-05-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多