Open cctvmikeowen opened 3 years ago
⚠️ 高德地图定位部分 API 需要真机调试和 Access WiFi Information
权限。
@cctvmikeowen 注意看文档
是真机调试的,debug和release 的appkey都设置了,核对是正确的,
是真机调试的,debug和release 的appkey都设置了,核对是正确的, 权限也加了,还是返回null,连定位的授权对话框都不会弹,rn 0.64,安装采用yarn add @uiw/react-native-amap-geolocation,请问是哪里不对吗?
我没有办法帮你解决,我只能告诉你我的文档里面研究成果,按照这个核对。
你好,好像android,的有个bug,参照基本用法,js端调用AMapGeolocation.getCurrentLocation,映射到java端, @ReactMethod public void getCurrentLocation(final Promise promise) { try { if (client == null) { promise.reject("-1", "尚未调用 setApiKey() 进行初始化"); return; } if (!client.isStarted()) { client.startLocation(); } // System.out.println(mLastAMapLocation); promise.resolve(toJSON(mLastAMapLocation)); client.stopLocation(); } catch (Exception e) { promise.reject("-110", e.getMessage()); } },此时mLastAMapLocation 是null的
getCurrentLocation的json 老是null,请问要如何配置