Commit 45d9b8264f6412d631745121b602f0766bf728fa

Authored by 张志伟
1 parent b611fc12

升级

lib/android/src/main/java/cn/feewee/amap3d/modules/AMapGeolocationModule.java
@@ -57,7 +57,10 @@ public class AMapGeolocationModule extends ReactContextBaseJavaModule implements @@ -57,7 +57,10 @@ public class AMapGeolocationModule extends ReactContextBaseJavaModule implements
57 if (client != null) { 57 if (client != null) {
58 client.onDestroy(); 58 client.onDestroy();
59 } 59 }
60 - 60 + if (key == null || key.equals("")) {
  61 + promise.reject("-1", "key is can not be empty!");
  62 + return;
  63 + }
61 AMapLocationClient.setApiKey(key); 64 AMapLocationClient.setApiKey(key);
62 AMapLocationClient.updatePrivacyShow(reactContext, true, true); 65 AMapLocationClient.updatePrivacyShow(reactContext, true, true);
63 AMapLocationClient.updatePrivacyAgree(reactContext, true); 66 AMapLocationClient.updatePrivacyAgree(reactContext, true);
package.json
1 { 1 {
2 "name": "@cqfw/react-native-amap3d", 2 "name": "@cqfw/react-native-amap3d",
3 - "version": "0.2.2", 3 + "version": "0.2.3",
4 "description": "react-native 高德地图组件,支持 Android + iOS", 4 "description": "react-native 高德地图组件,支持 Android + iOS",
5 "author": "feewee", 5 "author": "feewee",
6 "license": "MIT", 6 "license": "MIT",