expo-gaode-map 2.2.32-next.0 → 2.2.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -48,17 +48,22 @@ class PermissionManager: NSObject, CLLocationManagerDelegate {
48
48
  self.permissionCallback = callback
49
49
 
50
50
  // 确保在主线程操作
51
- DispatchQueue.main.async { [weak self] in
52
- guard let self = self else { return }
53
-
51
+ DispatchQueue.main.async {
54
52
  if self.locationManager == nil {
55
53
  self.locationManager = CLLocationManager()
56
- self.locationManager?.delegate = self
57
54
  }
55
+
56
+ guard let locationManager = self.locationManager else {
57
+ self.permissionCallback?(false, "unknown")
58
+ self.permissionCallback = nil
59
+ return
60
+ }
61
+
62
+ locationManager.delegate = self
58
63
 
59
64
  var currentStatus: CLAuthorizationStatus
60
65
  if #available(iOS 14.0, *) {
61
- currentStatus = self.locationManager?.authorizationStatus ?? .notDetermined
66
+ currentStatus = locationManager.authorizationStatus
62
67
  } else {
63
68
  currentStatus = CLLocationManager.authorizationStatus()
64
69
  }
@@ -84,7 +89,7 @@ class PermissionManager: NSObject, CLLocationManagerDelegate {
84
89
  return
85
90
  }
86
91
 
87
- self.locationManager?.requestWhenInUseAuthorization()
92
+ locationManager.requestWhenInUseAuthorization()
88
93
  }
89
94
  }
90
95
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "expo-gaode-map",
3
- "version": "2.2.32-next.0",
4
- "description": "A full-featured AMap (Gaode Map) React Native component library built with Expo Modules, providing map display, location services, overlays, and more.",
3
+ "version": "2.2.32",
4
+ "description": "A full-featured React Native AMap (Gaode Map) library for Expo, including map display, location, overlays, offline maps, and geometry utilities.",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
7
7
  "files": [
@@ -32,7 +32,18 @@
32
32
  "expo",
33
33
  "expo-gaode-map",
34
34
  "ExpoGaodeMap",
35
+ "expo-amap",
36
+ "react-native-amap",
37
+ "react-native-gaode-map",
38
+ "rn-amap",
39
+ "rn-gaode-map",
40
+ "gaode-map",
41
+ "amap",
35
42
  "高德地图",
43
+ "地图",
44
+ "mapview",
45
+ "location",
46
+ "offline-map",
36
47
  "AMap"
37
48
  ],
38
49
  "repository": {