react-native-amap-geolocation
react-native-amap-geolocation copied to clipboard
React Native geolocation module for Android + iOS
相关依赖: "react-native": "0.73.3", "react-native-amap-geolocation": "^1.2.3", "react-native-amap3d": "^3.2.4", 问题: 在watchPosition()的回调函数里使用setState会产生无限回调,瞬间达到执行速度上限。 复现方法: 在watchPosition()里使用setState,同样的情况也出现在setInterval()里使用getCurrentPosition()方法,并在内部使用setState。 同时也测试了zustand状态管理,在内部调用zustand store里的设置状态方法也会产生同样的问题。 ```typescript const [position, setPosition] = useState(); Geolocation.watchPosition(pos => { setPosition(pos.coords); console.log(position); }); ``` 但是如果没有setState(或是zudstand的类似设置状态)就是正常的。 日志: ```c++ Maximum...
开发者包的时候 还能定位到
/Users/wenjianli/muyuan/my-slaughter-logistics-driver/node_modules/react-native-amap-geolocation/lib/android/src/main/java/cn/qiuxiang/react/geolocation/AMapGeolocationPackage.java:22: 错误: 不兼容的类型: List无法转换为List return Collections.singletonList(new AMapGeolocationModule(reactContext)); ^ 1 个错误
oppo手机One Plus 8T型号的ColorOS 13.1系统(android 13.1) 调用定位之前已经获取了 PermissionsAndroid.PERMISSIONS.READ_PHONE_STATE、 PermissionsAndroid.PERMISSIONS.ACCESS_FINE_LOCATION权限 打开定位权限,打开wifi的情况下能定位成功,在只打开4G流量的情况下定位失败 出错如下: ``` 网络定位失败,请检查设备是否插入sim 卡,是否开启移动网络或开启了wif模块 请到http://bs.amap.com/apilandroid -location-sdk/auide/utilities/errorcode/查看错误码说明,错误详细信息:获取到的基站为空,并且关闭了WIFI开关,请您打 开WIFI开关再发起定位#1301 ```
使用精准位置获取经纬度信息,获取到的经纬度跟所处位置有一定的差距,请问应该怎么搞???

Xcode :14.1 "react-native-amap-geolocation": "^1.2.0" "react-native": "0.69.4" 删除react-native-amap-geolocation包后,重新执行pod install则可正常启动; 运行 npx react-native run-ios 报错; ld: warning: ignoring file /Users/xxx/Library/Developer/Xcode/DerivedData/hscy_app-fjtzylwkeoyzyscpwkafipnyyazi/Build/Products/Debug-iphonesimulator/react-native-amap-geolocation/libreact-native-amap-geolocation.a, building for iOS Simulator-x86_64 but attempting to link with file built for...
Duplicate class com.amap.api.fence.PoiItem$1 found in modules jetified-3dmap-9.6.0 (com.amap.api:3dmap:9.6.0) and jetified-location-6.2.0 (com.amap.api:location:6.2.0)
 我看高德现在定位SDK,有地理围栏,我们这里是不支持的,是吧,后面有对地理围栏这里支持的计划吗 @qiuxiang