expo-gaode-map-navigation 1.1.5-next.1 → 1.1.5
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.
package/README.md
CHANGED
|
@@ -1,68 +1,62 @@
|
|
|
1
1
|
# expo-gaode-map-navigation
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
高德地图“导航一体化”模块。内置地图渲染能力与导航能力,提供从地图展示到路径规划与实时导航的完整解决方案。
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## 模块定位与使用约束
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
- 独立使用:本模块已封装地图相关能力(MapView/覆盖物等)与导航能力,不需要、也不应同时安装核心地图包。
|
|
8
|
+
- 禁止共存:请勿与 `expo-gaode-map` 同时安装或链接。两者均包含地图 SDK,Android 上会产生 `3dmap` vs `navi-3dmap` 的二进制冲突。
|
|
9
|
+
- 简化依赖:安装本模块即可获得地图 + 导航全量能力,无需额外地图依赖。
|
|
10
|
+
|
|
11
|
+
## 功能特性
|
|
12
|
+
|
|
13
|
+
- 🗺️ 地图渲染:内置地图视图与常用覆盖物(标注、折线、多边形、热力图、聚合等)
|
|
14
|
+
- 🧭 路径与导航:驾车、步行、骑行等多种出行策略与实时引导
|
|
15
|
+
- ⚙️ 策略丰富:最快、最短、避拥堵、少收费、少红绿灯等
|
|
16
|
+
- 🚗 复杂路线:支持多途经点、限行考虑、分段规划
|
|
17
|
+
- 🌐 Web API 协作:可与 `expo-gaode-map-web-api` 配合,统一通过基础初始化下发 Web Key 后使用
|
|
13
18
|
|
|
14
19
|
## 安装
|
|
15
20
|
|
|
16
|
-
|
|
21
|
+
仅安装本模块(不要安装 `expo-gaode-map`):
|
|
17
22
|
|
|
18
23
|
```bash
|
|
19
24
|
# bun
|
|
20
25
|
bun add expo-gaode-map-navigation
|
|
21
26
|
|
|
22
|
-
# yarn
|
|
27
|
+
# or yarn
|
|
23
28
|
yarn add expo-gaode-map-navigation
|
|
24
29
|
|
|
25
|
-
# npm
|
|
26
|
-
npm install expo-gaode-map-navigation
|
|
27
30
|
```
|
|
28
31
|
|
|
29
|
-
|
|
30
|
-
如果项目中已安装 `expo-gaode-map`,请务必先卸载,否则会导致 Android 端二进制冲突(`3dmap` vs `navi-3dmap`)。`expo-gaode-map` 和 `expo-gaode-map-navigation` 由于 SDK 冲突不能同时安装,二选一使用。
|
|
32
|
+
如果项目中已安装过核心地图包,请先移除避免冲突:
|
|
31
33
|
|
|
34
|
+
```bash
|
|
35
|
+
npm uninstall expo-gaode-map
|
|
36
|
+
# or: yarn remove expo-gaode-map
|
|
37
|
+
# or: bun remove expo-gaode-map
|
|
38
|
+
```
|
|
32
39
|
|
|
33
|
-
|
|
40
|
+
## 初始化
|
|
34
41
|
|
|
35
|
-
|
|
42
|
+
在应用启动阶段初始化 SDK Key(Android/iOS 原生 Key 与可选的 Web API Key):
|
|
36
43
|
|
|
37
|
-
```
|
|
38
|
-
{
|
|
39
|
-
"expo": {
|
|
40
|
-
"plugins": [
|
|
41
|
-
[
|
|
42
|
-
"expo-gaode-map-navigation",
|
|
43
|
-
{
|
|
44
|
-
"androidKey": "your-android-key",
|
|
45
|
-
"iosKey": "your-ios-key"
|
|
46
|
-
}
|
|
47
|
-
]
|
|
48
|
-
]
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
```
|
|
52
|
-
配置后重新构建:
|
|
44
|
+
```ts
|
|
45
|
+
import { ExpoGaodeMapModule } from 'expo-gaode-map-navigation';
|
|
53
46
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
47
|
+
ExpoGaodeMapModule.initSDK({
|
|
48
|
+
androidKey: 'your-android-key',
|
|
49
|
+
iosKey: 'your-ios-key',
|
|
50
|
+
webKey: 'your-web-api-key', // 可选;若使用 Web API 包,建议一并下发
|
|
51
|
+
});
|
|
58
52
|
```
|
|
59
53
|
|
|
54
|
+
说明:
|
|
55
|
+
- 如后续使用 `expo-gaode-map-web-api`,建议同时传入 `webKey`,该包会从本模块运行时读取 `webKey`,实现“无参构造”的简化用法(new GaodeWebAPI())。
|
|
60
56
|
|
|
61
|
-
##
|
|
62
|
-
|
|
63
|
-
### 1. 显示地图
|
|
57
|
+
## 地图与导航基础用法
|
|
64
58
|
|
|
65
|
-
|
|
59
|
+
地图视图(内置地图能力):
|
|
66
60
|
|
|
67
61
|
```tsx
|
|
68
62
|
import React from 'react';
|
|
@@ -76,12 +70,13 @@ export default function BasicMapScreen() {
|
|
|
76
70
|
style={{ flex: 1 }}
|
|
77
71
|
initialCameraPosition={{
|
|
78
72
|
target: { latitude: 39.909186, longitude: 116.397411 },
|
|
79
|
-
zoom:
|
|
73
|
+
zoom: 12,
|
|
80
74
|
}}
|
|
81
75
|
>
|
|
82
76
|
<Marker
|
|
83
77
|
position={{ latitude: 39.909186, longitude: 116.397411 }}
|
|
84
78
|
title="天安门"
|
|
79
|
+
snippet="北京·东城区"
|
|
85
80
|
/>
|
|
86
81
|
</MapView>
|
|
87
82
|
</View>
|
|
@@ -89,204 +84,69 @@ export default function BasicMapScreen() {
|
|
|
89
84
|
}
|
|
90
85
|
```
|
|
91
86
|
|
|
92
|
-
|
|
87
|
+
路径规划与导航(示例):
|
|
93
88
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
```tsx
|
|
97
|
-
import React, { useEffect, useRef } from 'react';
|
|
98
|
-
import { View } from 'react-native';
|
|
99
|
-
import { NaviView, type NaviViewRef } from 'expo-gaode-map-navigation';
|
|
100
|
-
|
|
101
|
-
export default function NavigationScreen() {
|
|
102
|
-
const naviRef = useRef<NaviViewRef>(null);
|
|
103
|
-
|
|
104
|
-
useEffect(() => {
|
|
105
|
-
// 延迟 1 秒后开始导航
|
|
106
|
-
const timer = setTimeout(() => {
|
|
107
|
-
if (naviRef.current) {
|
|
108
|
-
naviRef.current.startNavigation(
|
|
109
|
-
{ latitude: 39.909186, longitude: 116.397411 }, // 起点
|
|
110
|
-
{ latitude: 39.99, longitude: 116.47 }, // 终点
|
|
111
|
-
0 // 0: GPS导航, 1: 模拟导航
|
|
112
|
-
);
|
|
113
|
-
}
|
|
114
|
-
}, 1000);
|
|
115
|
-
return () => clearTimeout(timer);
|
|
116
|
-
}, []);
|
|
117
|
-
|
|
118
|
-
return (
|
|
119
|
-
<View style={{ flex: 1 }}>
|
|
120
|
-
<NaviView
|
|
121
|
-
ref={naviRef}
|
|
122
|
-
style={{ flex: 1 }}
|
|
123
|
-
showCamera={true} // 显示摄像头
|
|
124
|
-
enableVoice={true} // 开启语音
|
|
125
|
-
/>
|
|
126
|
-
</View>
|
|
127
|
-
);
|
|
128
|
-
}
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
## 详细用法
|
|
132
|
-
|
|
133
|
-
### 路径规划 (API)
|
|
134
|
-
|
|
135
|
-
使用 `calculateRoute` 方法进行路径计算,不涉及 UI 显示,适合用于获取距离、时间或绘制路线。
|
|
136
|
-
|
|
137
|
-
#### 驾车路径规划
|
|
138
|
-
|
|
139
|
-
```typescript
|
|
140
|
-
import { calculateRoute, RouteType, DriveStrategy } from 'expo-gaode-map-navigation';
|
|
89
|
+
```ts
|
|
90
|
+
import { calculateRoute, DriveStrategy } from 'expo-gaode-map-navigation';
|
|
141
91
|
|
|
142
92
|
const result = await calculateRoute({
|
|
143
|
-
type:
|
|
93
|
+
type: 'drive',
|
|
144
94
|
from: { latitude: 39.9, longitude: 116.4 },
|
|
145
95
|
to: { latitude: 39.91, longitude: 116.41 },
|
|
146
|
-
strategy: DriveStrategy.FASTEST,
|
|
147
|
-
avoidRoad: '京通快速路', // 避让道路名称
|
|
96
|
+
strategy: DriveStrategy.FASTEST,
|
|
148
97
|
});
|
|
149
98
|
|
|
150
|
-
|
|
151
|
-
console.log(`预计耗时: ${result.routes[0].duration}秒`);
|
|
99
|
+
// 结果包含距离/时长/分步指引等
|
|
152
100
|
```
|
|
153
101
|
|
|
154
|
-
|
|
102
|
+
说明:
|
|
103
|
+
- 地图组件与导航能力均来自 `expo-gaode-map-navigation`,无需、也不应从 `expo-gaode-map` 引入任何 API。
|
|
155
104
|
|
|
156
|
-
|
|
157
|
-
import { calculateRoute, RouteType, RideStrategy } from 'expo-gaode-map-navigation';
|
|
105
|
+
## 路径规划(原生与 Web API 双方案)
|
|
158
106
|
|
|
159
|
-
|
|
160
|
-
const rideResult = await calculateRoute({
|
|
161
|
-
type: RouteType.RIDE,
|
|
162
|
-
from: { latitude: 39.9, longitude: 116.4 },
|
|
163
|
-
to: { latitude: 39.91, longitude: 116.41 },
|
|
164
|
-
strategy: RideStrategy.FASTEST,
|
|
165
|
-
});
|
|
107
|
+
本模块同时支持“原生导航引擎路径规划”和“Web API 路径规划”,可按业务场景自由选择或组合使用:
|
|
166
108
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
type: RouteType.WALK,
|
|
170
|
-
from: { latitude: 39.9, longitude: 116.4 },
|
|
171
|
-
to: { latitude: 39.91, longitude: 116.41 },
|
|
172
|
-
multiple: true, // 返回多条路线
|
|
173
|
-
});
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
#### 货车路径规划
|
|
109
|
+
- 原生方案(推荐用于移动端实时导航):端侧原生 SDK 能力,更适合实时引导、语音播报、复杂交通路况处理、弱网/离线等。
|
|
110
|
+
- Web API 方案(推荐用于快速查询/对比/多端一致):通过 `expo-gaode-map-web-api` 发起 HTTP 请求,便于统一计算逻辑、方案对比或与服务端配合。
|
|
177
111
|
|
|
178
|
-
|
|
179
|
-
|
|
112
|
+
原生方案示例:
|
|
113
|
+
```ts
|
|
114
|
+
import { calculateRoute, DriveStrategy } from 'expo-gaode-map-navigation';
|
|
180
115
|
|
|
181
|
-
const
|
|
182
|
-
type:
|
|
116
|
+
const result = await calculateRoute({
|
|
117
|
+
type: 'drive',
|
|
183
118
|
from: { latitude: 39.9, longitude: 116.4 },
|
|
184
119
|
to: { latitude: 39.91, longitude: 116.41 },
|
|
185
|
-
|
|
186
|
-
height: 3.5, // 高度 3.5m
|
|
187
|
-
load: 10, // 载重 10吨
|
|
120
|
+
strategy: DriveStrategy.FASTEST,
|
|
188
121
|
});
|
|
189
|
-
```
|
|
190
|
-
|
|
191
|
-
### 独立路径规划 (Advanced)
|
|
192
|
-
|
|
193
|
-
“独立路径规划”允许你先计算路线,并在地图上展示多条方案,用户选择其中一条后再开始导航。这通常比直接开始导航体验更好。
|
|
194
122
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
independentDriveRoute,
|
|
198
|
-
selectIndependentRoute,
|
|
199
|
-
startNaviWithIndependentPath,
|
|
200
|
-
DriveStrategy
|
|
201
|
-
} from 'expo-gaode-map-navigation';
|
|
123
|
+
// result 包含距离/时长/分步指引等原生返回
|
|
124
|
+
```
|
|
202
125
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
to: { latitude: 39.91, longitude: 116.41 },
|
|
207
|
-
strategy: DriveStrategy.AVOID_CONGESTION,
|
|
208
|
-
});
|
|
126
|
+
Web API 方案示例(需在初始化时提供 webKey):
|
|
127
|
+
```ts
|
|
128
|
+
import { GaodeWebAPI } from 'expo-gaode-map-web-api';
|
|
209
129
|
|
|
210
|
-
//
|
|
211
|
-
|
|
212
|
-
await selectIndependentRoute({
|
|
213
|
-
routeId: result.routes[1].id
|
|
214
|
-
});
|
|
130
|
+
// 无参构造:从 expo-gaode-map-navigation 初始化中动态解析 webKey
|
|
131
|
+
const api = new GaodeWebAPI();
|
|
215
132
|
|
|
216
|
-
//
|
|
217
|
-
await
|
|
218
|
-
|
|
133
|
+
// 驾车路径规划(Web API)
|
|
134
|
+
const res = await api.route.driving('116.400000,39.900000', '116.410000,39.910000', {
|
|
135
|
+
show_fields: 'cost,navi',
|
|
219
136
|
});
|
|
220
|
-
```
|
|
221
|
-
|
|
222
|
-
### 地图组件 (Map)
|
|
223
137
|
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
```tsx
|
|
227
|
-
import { MapView, Circle, Polygon } from 'expo-gaode-map-navigation';
|
|
228
|
-
|
|
229
|
-
<MapView style={{ flex: 1 }}>
|
|
230
|
-
{/* 圆形覆盖物 */}
|
|
231
|
-
<Circle
|
|
232
|
-
center={{ latitude: 39.9, longitude: 116.4 }}
|
|
233
|
-
radius={1000}
|
|
234
|
-
fillColor="rgba(0,0,255, 0.3)"
|
|
235
|
-
strokeColor="rgba(0,0,255, 0.5)"
|
|
236
|
-
/>
|
|
237
|
-
|
|
238
|
-
{/* 多边形 */}
|
|
239
|
-
<Polygon
|
|
240
|
-
points={[
|
|
241
|
-
{ latitude: 39.9, longitude: 116.4 },
|
|
242
|
-
{ latitude: 39.91, longitude: 116.41 },
|
|
243
|
-
{ latitude: 39.92, longitude: 116.42 },
|
|
244
|
-
]}
|
|
245
|
-
strokeWidth={2}
|
|
246
|
-
/>
|
|
247
|
-
</MapView>
|
|
138
|
+
// res.route.paths[0] 中包含距离/时长/导航步骤等
|
|
248
139
|
```
|
|
249
140
|
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
| 值 | 说明 |
|
|
255
|
-
|---|---|
|
|
256
|
-
| `FASTEST` (0) | 速度优先(时间最短) |
|
|
257
|
-
| `FEE_FIRST` (1) | 费用优先(少收费) |
|
|
258
|
-
| `SHORTEST` (2) | 距离优先 |
|
|
259
|
-
| `NO_HIGHWAY` (5) | 不走高速 |
|
|
260
|
-
| `AVOID_CONGESTION` (4) | 躲避拥堵 |
|
|
261
|
-
| ... | 更多策略请参考类型定义 |
|
|
262
|
-
|
|
263
|
-
### NaviView Props
|
|
264
|
-
|
|
265
|
-
| 属性 | 类型 | 说明 |
|
|
266
|
-
|---|---|---|
|
|
267
|
-
| `naviType` | number | 导航类型(0: GPS, 1: 模拟) |
|
|
268
|
-
| `showCrossImage` | boolean | 是否显示路口放大图 |
|
|
269
|
-
| `showCamera` | boolean | 是否显示摄像头 |
|
|
270
|
-
| `showTrafficButton` | boolean | 是否显示路况按钮 |
|
|
271
|
-
| `enableVoice` | boolean | 是否开启语音播报 |
|
|
272
|
-
| `onArrive` | function | 到达目的地回调 |
|
|
273
|
-
| `onNaviInfoUpdate` | function | 导航信息更新(剩余距离、时间等) |
|
|
274
|
-
|
|
275
|
-
## 注意事项
|
|
276
|
-
|
|
277
|
-
1. **二进制冲突**:严禁与 `expo-gaode-map` 共存。本模块已包含 `3dmap` SDK。
|
|
278
|
-
2. **Web API**:如果需要更灵活的 HTTP 算路(如公交跨城规划、Web端展示),推荐配合 `expo-gaode-map-web-api` 使用。
|
|
279
|
-
3. **权限**:使用导航功能前,请确保应用已获取定位权限(`ACCESS_FINE_LOCATION`)。
|
|
280
|
-
|
|
141
|
+
选择建议:
|
|
142
|
+
- 实时导航/引导优先原生方案;
|
|
143
|
+
- 方案对比、批量测算、多端统一优先 Web API;也可结合两者,在端上落地选择逻辑。
|
|
281
144
|
|
|
282
|
-
##
|
|
145
|
+
## Android 注意事项
|
|
283
146
|
|
|
284
|
-
-
|
|
285
|
-
-
|
|
286
|
-
- [示例项目(导航)](https://github.com/TomWq/expo-gaode-map-navigation-example)
|
|
287
|
-
- [高德地图开放平台](https://lbs.amap.com/)
|
|
288
|
-
- [Expo Modules API](https://docs.expo.dev/modules/overview/)
|
|
147
|
+
- 本模块内部使用 `navi-3dmap` 体系,已包含地图能力;请勿同时引入核心 `3dmap` 体系以免二进制冲突。
|
|
148
|
+
- 若历史项目从核心包迁移至本模块,务必移除 `expo-gaode-map` 依赖与其 native 配置(Gradle/CocoaPods 链接等)。
|
|
289
149
|
|
|
290
|
-
##
|
|
150
|
+
## 许可
|
|
291
151
|
|
|
292
|
-
MIT
|
|
152
|
+
MIT
|
|
@@ -75,11 +75,12 @@ exports.NaviView = React.forwardRef((props, ref) => {
|
|
|
75
75
|
// 创建 API 引用
|
|
76
76
|
const apiRef = React.useMemo(() => ({
|
|
77
77
|
startNavigation: async (start, end, type) => {
|
|
78
|
+
var _a, _b;
|
|
78
79
|
if (!nativeRef.current)
|
|
79
80
|
throw new Error('NaviView not initialized');
|
|
80
81
|
// 将对象解构为单独的参数传递给原生层
|
|
81
|
-
const startLat = start
|
|
82
|
-
const startLng = start
|
|
82
|
+
const startLat = (_a = start === null || start === void 0 ? void 0 : start.latitude) !== null && _a !== void 0 ? _a : 0;
|
|
83
|
+
const startLng = (_b = start === null || start === void 0 ? void 0 : start.longitude) !== null && _b !== void 0 ? _b : 0;
|
|
83
84
|
const endLat = end.latitude;
|
|
84
85
|
const endLng = end.longitude;
|
|
85
86
|
return nativeRef.current.startNavigation(startLat, startLng, endLat, endLng);
|
|
@@ -28,8 +28,9 @@ const ExpoGaodeMapModuleWithHelpers = {
|
|
|
28
28
|
* 初始化 SDK,并缓存配置(包含 webKey)
|
|
29
29
|
*/
|
|
30
30
|
initSDK(config) {
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
var _a;
|
|
32
|
+
_sdkConfig = config !== null && config !== void 0 ? config : null;
|
|
33
|
+
(_a = nativeModule === null || nativeModule === void 0 ? void 0 : nativeModule.initSDK) === null || _a === void 0 ? void 0 : _a.call(nativeModule, config);
|
|
33
34
|
},
|
|
34
35
|
/**
|
|
35
36
|
* 添加定位监听器(便捷方法)
|
|
@@ -39,8 +40,9 @@ const ExpoGaodeMapModuleWithHelpers = {
|
|
|
39
40
|
* @throws 如果底层模块不可用,返回一个空操作的订阅对象
|
|
40
41
|
*/
|
|
41
42
|
addLocationListener(listener) {
|
|
43
|
+
var _a;
|
|
42
44
|
// 使用可选链和空值合并,确保即使模块不可用也不会崩溃
|
|
43
|
-
return nativeModule
|
|
45
|
+
return ((_a = nativeModule === null || nativeModule === void 0 ? void 0 : nativeModule.addListener) === null || _a === void 0 ? void 0 : _a.call(nativeModule, 'onLocationUpdate', listener)) || {
|
|
44
46
|
remove: () => { },
|
|
45
47
|
};
|
|
46
48
|
},
|
|
@@ -55,6 +57,6 @@ function getSDKConfig() {
|
|
|
55
57
|
* 获取用于 Web API 的 webKey(若未初始化或未提供则返回 undefined)
|
|
56
58
|
*/
|
|
57
59
|
function getWebKey() {
|
|
58
|
-
return _sdkConfig
|
|
60
|
+
return _sdkConfig === null || _sdkConfig === void 0 ? void 0 : _sdkConfig.webKey;
|
|
59
61
|
}
|
|
60
62
|
exports.default = ExpoGaodeMapModuleWithHelpers;
|
|
@@ -17,7 +17,7 @@ class EventManager {
|
|
|
17
17
|
}
|
|
18
18
|
trigger(id, eventType, data) {
|
|
19
19
|
const callbacks = this.callbacks.get(id);
|
|
20
|
-
const callback = callbacks
|
|
20
|
+
const callback = callbacks === null || callbacks === void 0 ? void 0 : callbacks[eventType];
|
|
21
21
|
if (typeof callback === 'function') {
|
|
22
22
|
callback(data);
|
|
23
23
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import Foundation
|
|
2
2
|
import AMapLocationKit
|
|
3
3
|
import CoreLocation
|
|
4
|
-
import ExpoModulesCore
|
|
5
4
|
|
|
6
5
|
/**
|
|
7
6
|
* 定位管理器
|
|
@@ -124,13 +123,6 @@ class LocationManager: NSObject, AMapLocationManagerDelegate {
|
|
|
124
123
|
* @param allows 是否允许后台定位
|
|
125
124
|
*/
|
|
126
125
|
func setAllowsBackgroundLocationUpdates(_ allows: Bool) {
|
|
127
|
-
if allows {
|
|
128
|
-
let backgroundModes = Bundle.main.object(forInfoDictionaryKey: "UIBackgroundModes") as? [String]
|
|
129
|
-
if backgroundModes?.contains("location") != true {
|
|
130
|
-
log.warn("⚠️ [ExpoGaodeMap] iOS 后台定位未正确配置,setAllowsBackgroundLocationUpdates(true) 可能不会生效,请检查 Info.plist 是否包含 UIBackgroundModes: location,或者在 app.json 中配置 enableBackgroundLocation: true,然后重新执行 npx expo prebuild")
|
|
131
|
-
return
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
126
|
locationManager?.allowsBackgroundLocationUpdates = allows
|
|
135
127
|
}
|
|
136
128
|
|
|
@@ -270,4 +262,4 @@ class LocationManager: NSObject, AMapLocationManagerDelegate {
|
|
|
270
262
|
func amapLocationManager(_ manager: AMapLocationManager!, didFailWithError error: Error!) {
|
|
271
263
|
// 定位失败 - 静默处理
|
|
272
264
|
}
|
|
273
|
-
}
|
|
265
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-gaode-map-navigation",
|
|
3
|
-
"version": "1.1.5
|
|
3
|
+
"version": "1.1.5",
|
|
4
4
|
"description": "高德地图导航功能模块 - 路径规划、导航引导,独立版本包含完整地图功能",
|
|
5
5
|
"author": "<TomWq> (https://github.com/TomWq)",
|
|
6
6
|
"repository": "https://github.com/TomWq/expo-gaode-map",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"lint": "expo-module lint",
|
|
14
14
|
"test": "expo-module test",
|
|
15
15
|
"prepare": "expo-module prepare && bun run build:plugin",
|
|
16
|
-
"prepublishOnly": "
|
|
16
|
+
"prepublishOnly": "expo-module prepublishOnly",
|
|
17
17
|
"expo-module": "expo-module"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|