expo-gaode-map 1.1.8 → 2.0.0-alpha.2

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.
Files changed (116) hide show
  1. package/README.en.md +32 -46
  2. package/README.md +51 -70
  3. package/android/src/main/java/expo/modules/gaodemap/ExpoGaodeMapView.kt +98 -268
  4. package/android/src/main/java/expo/modules/gaodemap/ExpoGaodeMapViewModule.kt +1 -49
  5. package/android/src/main/java/expo/modules/gaodemap/managers/CameraManager.kt +30 -7
  6. package/android/src/main/java/expo/modules/gaodemap/managers/UIManager.kt +1 -0
  7. package/android/src/main/java/expo/modules/gaodemap/modules/LocationManager.kt +10 -1
  8. package/android/src/main/java/expo/modules/gaodemap/overlays/CircleView.kt +38 -14
  9. package/android/src/main/java/expo/modules/gaodemap/overlays/CircleViewModule.kt +3 -3
  10. package/android/src/main/java/expo/modules/gaodemap/overlays/ClusterView.kt +8 -1
  11. package/android/src/main/java/expo/modules/gaodemap/overlays/HeatMapView.kt +4 -1
  12. package/android/src/main/java/expo/modules/gaodemap/overlays/MarkerView.kt +322 -93
  13. package/android/src/main/java/expo/modules/gaodemap/overlays/MarkerViewModule.kt +11 -3
  14. package/android/src/main/java/expo/modules/gaodemap/overlays/MultiPointView.kt +4 -1
  15. package/android/src/main/java/expo/modules/gaodemap/overlays/PolygonView.kt +25 -11
  16. package/android/src/main/java/expo/modules/gaodemap/overlays/PolygonViewModule.kt +3 -3
  17. package/android/src/main/java/expo/modules/gaodemap/overlays/PolylineView.kt +20 -10
  18. package/android/src/main/java/expo/modules/gaodemap/overlays/PolylineViewModule.kt +6 -2
  19. package/build/ExpoGaodeMap.types.d.ts +27 -6
  20. package/build/ExpoGaodeMap.types.d.ts.map +1 -1
  21. package/build/ExpoGaodeMap.types.js +3 -0
  22. package/build/ExpoGaodeMap.types.js.map +1 -1
  23. package/build/ExpoGaodeMapModule.d.ts +157 -10
  24. package/build/ExpoGaodeMapModule.d.ts.map +1 -1
  25. package/build/ExpoGaodeMapModule.js +4 -0
  26. package/build/ExpoGaodeMapModule.js.map +1 -1
  27. package/build/ExpoGaodeMapView.d.ts +1 -17
  28. package/build/ExpoGaodeMapView.d.ts.map +1 -1
  29. package/build/ExpoGaodeMapView.js +4 -221
  30. package/build/ExpoGaodeMapView.js.map +1 -1
  31. package/build/components/overlays/Circle.d.ts +11 -1
  32. package/build/components/overlays/Circle.d.ts.map +1 -1
  33. package/build/components/overlays/Circle.js +12 -58
  34. package/build/components/overlays/Circle.js.map +1 -1
  35. package/build/components/overlays/Cluster.d.ts.map +1 -1
  36. package/build/components/overlays/Cluster.js.map +1 -1
  37. package/build/components/overlays/Marker.d.ts +13 -1
  38. package/build/components/overlays/Marker.d.ts.map +1 -1
  39. package/build/components/overlays/Marker.js +51 -115
  40. package/build/components/overlays/Marker.js.map +1 -1
  41. package/build/components/overlays/Polygon.d.ts +7 -15
  42. package/build/components/overlays/Polygon.d.ts.map +1 -1
  43. package/build/components/overlays/Polygon.js +10 -80
  44. package/build/components/overlays/Polygon.js.map +1 -1
  45. package/build/components/overlays/Polyline.d.ts +7 -14
  46. package/build/components/overlays/Polyline.d.ts.map +1 -1
  47. package/build/components/overlays/Polyline.js +9 -66
  48. package/build/components/overlays/Polyline.js.map +1 -1
  49. package/build/index.d.ts +1 -4
  50. package/build/index.d.ts.map +1 -1
  51. package/build/index.js +2 -10
  52. package/build/index.js.map +1 -1
  53. package/build/types/map-view.types.d.ts +0 -90
  54. package/build/types/map-view.types.d.ts.map +1 -1
  55. package/build/types/map-view.types.js.map +1 -1
  56. package/build/types/overlays.types.d.ts +9 -9
  57. package/build/types/overlays.types.d.ts.map +1 -1
  58. package/build/types/overlays.types.js.map +1 -1
  59. package/docs/API.en.md +1 -21
  60. package/docs/API.md +84 -56
  61. package/docs/EXAMPLES.en.md +0 -48
  62. package/docs/EXAMPLES.md +49 -102
  63. package/docs/INITIALIZATION.md +59 -71
  64. package/docs/MIGRATION.md +423 -0
  65. package/ios/ExpoGaodeMapModule.swift +4 -0
  66. package/ios/ExpoGaodeMapView.swift +365 -258
  67. package/ios/ExpoGaodeMapViewModule.swift +3 -50
  68. package/ios/managers/CameraManager.swift +23 -2
  69. package/ios/managers/UIManager.swift +10 -5
  70. package/ios/modules/LocationManager.swift +10 -0
  71. package/ios/overlays/CircleView.swift +98 -19
  72. package/ios/overlays/CircleViewModule.swift +21 -0
  73. package/ios/overlays/ClusterView.swift +33 -4
  74. package/ios/overlays/HeatMapView.swift +16 -4
  75. package/ios/overlays/MarkerView.swift +235 -146
  76. package/ios/overlays/MarkerViewModule.swift +7 -3
  77. package/ios/overlays/MultiPointView.swift +30 -1
  78. package/ios/overlays/PolygonView.swift +63 -12
  79. package/ios/overlays/PolygonViewModule.swift +17 -0
  80. package/ios/overlays/PolylineView.swift +95 -25
  81. package/ios/overlays/PolylineViewModule.swift +17 -8
  82. package/ios/utils/PermissionManager.swift +9 -14
  83. package/package.json +4 -3
  84. package/src/ExpoGaodeMap.types.ts +28 -3
  85. package/src/ExpoGaodeMapModule.ts +201 -12
  86. package/src/ExpoGaodeMapView.tsx +9 -234
  87. package/src/components/overlays/Circle.tsx +14 -70
  88. package/src/components/overlays/Cluster.tsx +0 -1
  89. package/src/components/overlays/Marker.tsx +63 -138
  90. package/src/components/overlays/Polygon.tsx +12 -92
  91. package/src/components/overlays/Polyline.tsx +11 -77
  92. package/src/index.ts +4 -29
  93. package/src/types/map-view.types.ts +1 -85
  94. package/src/types/overlays.types.ts +9 -9
  95. package/android/src/main/java/expo/modules/gaodemap/managers/OverlayManager.kt +0 -574
  96. package/build/modules/AMapLocation.d.ts +0 -78
  97. package/build/modules/AMapLocation.d.ts.map +0 -1
  98. package/build/modules/AMapLocation.js +0 -132
  99. package/build/modules/AMapLocation.js.map +0 -1
  100. package/build/modules/AMapPermissions.d.ts +0 -29
  101. package/build/modules/AMapPermissions.d.ts.map +0 -1
  102. package/build/modules/AMapPermissions.js +0 -23
  103. package/build/modules/AMapPermissions.js.map +0 -1
  104. package/build/modules/AMapSDK.d.ts +0 -22
  105. package/build/modules/AMapSDK.d.ts.map +0 -1
  106. package/build/modules/AMapSDK.js +0 -25
  107. package/build/modules/AMapSDK.js.map +0 -1
  108. package/build/modules/AMapView.d.ts +0 -44
  109. package/build/modules/AMapView.d.ts.map +0 -1
  110. package/build/modules/AMapView.js +0 -65
  111. package/build/modules/AMapView.js.map +0 -1
  112. package/ios/managers/OverlayManager.swift +0 -522
  113. package/src/modules/AMapLocation.ts +0 -165
  114. package/src/modules/AMapPermissions.ts +0 -41
  115. package/src/modules/AMapSDK.ts +0 -31
  116. package/src/modules/AMapView.ts +0 -72
@@ -0,0 +1,423 @@
1
+ # 迁移指南 - v2.0 API 变更
2
+
3
+ ## 概述
4
+
5
+ 从 v2.0 开始,我们移除了多余的封装层,统一使用 `ExpoGaodeMapModule` 调用所有定位和权限相关的方法。这样做的好处是:
6
+
7
+ - ✅ 命名一致性:所有导出都是大写开头(MapView, ExpoGaodeMapModule, Marker, Circle 等)
8
+ - ✅ 更清晰的 API:直接从原生模块调用,减少中间层
9
+ - ✅ 更好的类型推导:完整的 TypeScript 类型定义,零 any 类型
10
+ - ✅ 更易维护:减少代码重复,统一调用方式
11
+
12
+ ## 主要变更
13
+
14
+ ### 导入方式变更
15
+
16
+ #### ❌ 旧的方式(v1.x)
17
+
18
+ ```typescript
19
+ import {
20
+ MapView,
21
+ Marker,
22
+ Circle,
23
+ // 小写函数
24
+ initSDK,
25
+ start,
26
+ stop,
27
+ getCurrentLocation,
28
+ checkLocationPermission,
29
+ requestLocationPermission,
30
+ configure,
31
+ addLocationListener,
32
+ } from 'expo-gaode-map';
33
+
34
+ // 使用
35
+ initSDK({ androidKey: 'xxx', iosKey: 'xxx' });
36
+ const location = await getCurrentLocation();
37
+ start();
38
+ ```
39
+
40
+ #### ✅ 新的方式(v2.0)
41
+
42
+ ```typescript
43
+ import {
44
+ MapView,
45
+ Marker,
46
+ Circle,
47
+ // 统一使用 ExpoGaodeMapModule
48
+ ExpoGaodeMapModule,
49
+ } from 'expo-gaode-map';
50
+
51
+ // 使用
52
+ ExpoGaodeMapModule.initSDK({ androidKey: 'xxx', iosKey: 'xxx' });
53
+ const location = await ExpoGaodeMapModule.getCurrentLocation();
54
+ ExpoGaodeMapModule.start();
55
+ ```
56
+
57
+ ## 详细迁移步骤
58
+
59
+ ### 1. SDK 初始化
60
+
61
+ **旧方式:**
62
+ ```typescript
63
+ import { initSDK } from 'expo-gaode-map';
64
+
65
+ initSDK({
66
+ androidKey: 'your-android-key',
67
+ iosKey: 'your-ios-key',
68
+ });
69
+ ```
70
+
71
+ **新方式:**
72
+ ```typescript
73
+ import { ExpoGaodeMapModule } from 'expo-gaode-map';
74
+
75
+ ExpoGaodeMapModule.initSDK({
76
+ androidKey: 'your-android-key',
77
+ iosKey: 'your-ios-key',
78
+ });
79
+ ```
80
+
81
+ ### 2. 定位控制
82
+
83
+ **旧方式:**
84
+ ```typescript
85
+ import { start, stop, getCurrentLocation, isStarted } from 'expo-gaode-map';
86
+
87
+ start();
88
+ stop();
89
+ const location = await getCurrentLocation();
90
+ const started = await isStarted();
91
+ ```
92
+
93
+ **新方式:**
94
+ ```typescript
95
+ import { ExpoGaodeMapModule } from 'expo-gaode-map';
96
+
97
+ ExpoGaodeMapModule.start();
98
+ ExpoGaodeMapModule.stop();
99
+ const location = await ExpoGaodeMapModule.getCurrentLocation();
100
+ const started = await ExpoGaodeMapModule.isStarted();
101
+ ```
102
+
103
+ ### 3. 权限管理
104
+
105
+ **旧方式:**
106
+ ```typescript
107
+ import { checkLocationPermission, requestLocationPermission } from 'expo-gaode-map';
108
+
109
+ const status = await checkLocationPermission();
110
+ const result = await requestLocationPermission();
111
+ ```
112
+
113
+ **新方式:**
114
+ ```typescript
115
+ import { ExpoGaodeMapModule } from 'expo-gaode-map';
116
+
117
+ const status = await ExpoGaodeMapModule.checkLocationPermission();
118
+ const result = await ExpoGaodeMapModule.requestLocationPermission();
119
+ ```
120
+
121
+ ### 4. 定位配置
122
+
123
+ **旧方式:**
124
+ ```typescript
125
+ import { configure } from 'expo-gaode-map';
126
+
127
+ configure({
128
+ withReGeocode: true,
129
+ interval: 2000,
130
+ accuracy: 3,
131
+ });
132
+ ```
133
+
134
+ **新方式:**
135
+ ```typescript
136
+ import { ExpoGaodeMapModule } from 'expo-gaode-map';
137
+
138
+ // 直接调用配置方法
139
+ ExpoGaodeMapModule.setLocatingWithReGeocode(true);
140
+ ExpoGaodeMapModule.setInterval(2000);
141
+ ExpoGaodeMapModule.setDesiredAccuracy(3);
142
+ ```
143
+
144
+ ### 5. 位置监听
145
+
146
+ **旧方式:**
147
+ ```typescript
148
+ import { addLocationListener } from 'expo-gaode-map';
149
+
150
+ const subscription = addLocationListener((location) => {
151
+ console.log('位置更新:', location);
152
+ });
153
+
154
+ // 清理
155
+ subscription.remove();
156
+ ```
157
+
158
+ **新方式:**
159
+ ```typescript
160
+ import { ExpoGaodeMapModule } from 'expo-gaode-map';
161
+
162
+ const subscription = ExpoGaodeMapModule.addListener('onLocationUpdate', (location) => {
163
+ console.log('位置更新:', location);
164
+ });
165
+
166
+ // 清理
167
+ subscription.remove();
168
+ ```
169
+
170
+ ### 6. 坐标转换
171
+
172
+ **旧方式:**
173
+ ```typescript
174
+ import { coordinateConvert, CoordinateType } from 'expo-gaode-map';
175
+
176
+ const gcj02 = await coordinateConvert(
177
+ { latitude: 39.9, longitude: 116.4 },
178
+ CoordinateType.WGS84
179
+ );
180
+ ```
181
+
182
+ **新方式:**
183
+ ```typescript
184
+ import { ExpoGaodeMapModule, CoordinateType } from 'expo-gaode-map';
185
+
186
+ const gcj02 = await ExpoGaodeMapModule.coordinateConvert(
187
+ { latitude: 39.9, longitude: 116.4 },
188
+ CoordinateType.WGS84
189
+ );
190
+ ```
191
+
192
+ ### 7. 方向更新(iOS)
193
+
194
+ **旧方式:**
195
+ ```typescript
196
+ import { startUpdatingHeading, stopUpdatingHeading } from 'expo-gaode-map';
197
+
198
+ startUpdatingHeading();
199
+ stopUpdatingHeading();
200
+ ```
201
+
202
+ **新方式:**
203
+ ```typescript
204
+ import { ExpoGaodeMapModule } from 'expo-gaode-map';
205
+
206
+ ExpoGaodeMapModule.startUpdatingHeading();
207
+ ExpoGaodeMapModule.stopUpdatingHeading();
208
+ ```
209
+
210
+ ## 完整迁移示例
211
+
212
+ ### 旧代码(v1.x)
213
+
214
+ ```typescript
215
+ import { useEffect, useState } from 'react';
216
+ import {
217
+ MapView,
218
+ initSDK,
219
+ checkLocationPermission,
220
+ requestLocationPermission,
221
+ configure,
222
+ getCurrentLocation,
223
+ start,
224
+ stop,
225
+ addLocationListener,
226
+ } from 'expo-gaode-map';
227
+
228
+ export default function App() {
229
+ const [location, setLocation] = useState(null);
230
+
231
+ useEffect(() => {
232
+ const init = async () => {
233
+ // 初始化
234
+ initSDK({
235
+ androidKey: 'xxx',
236
+ iosKey: 'xxx',
237
+ });
238
+
239
+ // 权限
240
+ const status = await checkLocationPermission();
241
+ if (!status.granted) {
242
+ await requestLocationPermission();
243
+ }
244
+
245
+ // 配置
246
+ configure({
247
+ withReGeocode: true,
248
+ interval: 2000,
249
+ });
250
+
251
+ // 监听
252
+ const sub = addLocationListener((loc) => {
253
+ setLocation(loc);
254
+ });
255
+
256
+ // 获取位置
257
+ const loc = await getCurrentLocation();
258
+ setLocation(loc);
259
+
260
+ // 开始定位
261
+ start();
262
+
263
+ return () => {
264
+ sub.remove();
265
+ stop();
266
+ };
267
+ };
268
+
269
+ init();
270
+ }, []);
271
+
272
+ return <MapView style={{ flex: 1 }} myLocationEnabled />;
273
+ }
274
+ ```
275
+
276
+ ### 新代码(v2.0)
277
+
278
+ ```typescript
279
+ import { useEffect, useState } from 'react';
280
+ import {
281
+ MapView,
282
+ ExpoGaodeMapModule,
283
+ } from 'expo-gaode-map';
284
+
285
+ export default function App() {
286
+ const [location, setLocation] = useState(null);
287
+
288
+ useEffect(() => {
289
+ const init = async () => {
290
+ // 初始化
291
+ ExpoGaodeMapModule.initSDK({
292
+ androidKey: 'xxx',
293
+ iosKey: 'xxx',
294
+ });
295
+
296
+ // 权限
297
+ const status = await ExpoGaodeMapModule.checkLocationPermission();
298
+ if (!status.granted) {
299
+ await ExpoGaodeMapModule.requestLocationPermission();
300
+ }
301
+
302
+ // 配置
303
+ ExpoGaodeMapModule.setLocatingWithReGeocode(true);
304
+ ExpoGaodeMapModule.setInterval(2000);
305
+
306
+ // 监听
307
+ const sub = ExpoGaodeMapModule.addListener('onLocationUpdate', (loc) => {
308
+ setLocation(loc);
309
+ });
310
+
311
+ // 获取位置
312
+ const loc = await ExpoGaodeMapModule.getCurrentLocation();
313
+ setLocation(loc);
314
+
315
+ // 开始定位
316
+ ExpoGaodeMapModule.start();
317
+
318
+ return () => {
319
+ sub.remove();
320
+ ExpoGaodeMapModule.stop();
321
+ };
322
+ };
323
+
324
+ init();
325
+ }, []);
326
+
327
+ return <MapView style={{ flex: 1 }} myLocationEnabled />;
328
+ }
329
+ ```
330
+
331
+ ## API 对照表
332
+
333
+ | 旧 API (v1.x) | 新 API (v2.0) | 说明 |
334
+ |--------------|---------------|------|
335
+ | `initSDK()` | `ExpoGaodeMapModule.initSDK()` | SDK 初始化 |
336
+ | `start()` | `ExpoGaodeMapModule.start()` | 开始定位 |
337
+ | `stop()` | `ExpoGaodeMapModule.stop()` | 停止定位 |
338
+ | `isStarted()` | `ExpoGaodeMapModule.isStarted()` | 检查定位状态 |
339
+ | `getCurrentLocation()` | `ExpoGaodeMapModule.getCurrentLocation()` | 获取当前位置 |
340
+ | `checkLocationPermission()` | `ExpoGaodeMapModule.checkLocationPermission()` | 检查权限 |
341
+ | `requestLocationPermission()` | `ExpoGaodeMapModule.requestLocationPermission()` | 请求权限 |
342
+ | `configure(options)` | 使用单独的配置方法 | 见下方详细说明 |
343
+ | `addLocationListener()` | `ExpoGaodeMapModule.addListener('onLocationUpdate', ...)` | 位置监听 |
344
+ | `coordinateConvert()` | `ExpoGaodeMapModule.coordinateConvert()` | 坐标转换 |
345
+ | `startUpdatingHeading()` | `ExpoGaodeMapModule.startUpdatingHeading()` | 开始方向更新 |
346
+ | `stopUpdatingHeading()` | `ExpoGaodeMapModule.stopUpdatingHeading()` | 停止方向更新 |
347
+
348
+ ## 配置方法对照
349
+
350
+ `configure()` 函数被替换为直接调用配置方法:
351
+
352
+ | configure 选项 | 新方法 |
353
+ |---------------|--------|
354
+ | `withReGeocode` | `ExpoGaodeMapModule.setLocatingWithReGeocode(boolean)` |
355
+ | `mode` | `ExpoGaodeMapModule.setLocationMode(number)` |
356
+ | `interval` | `ExpoGaodeMapModule.setInterval(number)` |
357
+ | `onceLocation` | `ExpoGaodeMapModule.setOnceLocation(boolean)` |
358
+ | `sensorEnable` | `ExpoGaodeMapModule.setSensorEnable(boolean)` |
359
+ | `wifiScan` | `ExpoGaodeMapModule.setWifiScan(boolean)` |
360
+ | `gpsFirst` | `ExpoGaodeMapModule.setGpsFirst(boolean)` |
361
+ | `onceLocationLatest` | `ExpoGaodeMapModule.setOnceLocationLatest(boolean)` |
362
+ | `geoLanguage` | `ExpoGaodeMapModule.setGeoLanguage(string)` |
363
+ | `locationCacheEnable` | `ExpoGaodeMapModule.setLocationCacheEnable(boolean)` |
364
+ | `httpTimeout` | `ExpoGaodeMapModule.setHttpTimeOut(number)` |
365
+ | `accuracy` | `ExpoGaodeMapModule.setDesiredAccuracy(number)` |
366
+ | `timeout` | `ExpoGaodeMapModule.setLocationTimeout(number)` |
367
+ | `reGeocodeTimeout` | `ExpoGaodeMapModule.setReGeocodeTimeout(number)` |
368
+ | `distanceFilter` | `ExpoGaodeMapModule.setDistanceFilter(number)` |
369
+ | `pausesLocationUpdatesAutomatically` | `ExpoGaodeMapModule.setPausesLocationUpdatesAutomatically(boolean)` |
370
+ | `allowsBackgroundLocationUpdates` | `ExpoGaodeMapModule.setAllowsBackgroundLocationUpdates(boolean)` |
371
+ | `protocol` | `ExpoGaodeMapModule.setLocationProtocol(string)` |
372
+
373
+ ## 类型定义
374
+
375
+ 所有类型定义保持不变,仍然可以从主模块导入:
376
+
377
+ ```typescript
378
+ import type {
379
+ LatLng,
380
+ Coordinates,
381
+ ReGeocode,
382
+ CameraPosition,
383
+ MapViewRef,
384
+ PermissionStatus,
385
+ SDKConfig,
386
+ // ... 其他类型
387
+ } from 'expo-gaode-map';
388
+ ```
389
+
390
+ 新增类型可以从 `ExpoGaodeMapModule` 导入:
391
+
392
+ ```typescript
393
+ import type { SDKConfig, PermissionStatus } from 'expo-gaode-map';
394
+ ```
395
+
396
+ ## 常见问题
397
+
398
+ ### Q: 为什么要做这个改变?
399
+
400
+ **A:** 主要原因:
401
+ 1. **命名一致性**:统一使用大写开头(MapView, Marker, Circle, ExpoGaodeMapModule)
402
+ 2. **减少冗余**:移除了只是简单包装原生模块的中间层
403
+ 3. **更好的类型推导**:直接使用原生模块的类型定义,避免类型丢失
404
+ 4. **更易维护**:减少代码重复,统一调用方式
405
+
406
+ ### Q: 是否需要立即迁移?
407
+
408
+ **A:** 如果你正在使用 v1.x,建议在方便时迁移到 v2.0。迁移过程很简单,主要是替换导入和调用方式。
409
+
410
+ ### Q: MapView 和覆盖物组件有变化吗?
411
+
412
+ **A:** 没有变化!MapView、Marker、Circle、Polyline、Polygon 等组件的使用方式完全相同。
413
+
414
+ ### Q: 类型定义有变化吗?
415
+
416
+ **A:** 类型定义更加完善,移除了所有 `any` 类型,提供了完整的 TypeScript 类型推导。
417
+
418
+ ## 需要帮助?
419
+
420
+ 如果在迁移过程中遇到问题,欢迎:
421
+ - 📝 提交 [GitHub Issue](https://github.com/TomWq/expo-gaode-map/issues)
422
+ - 💬 参与 [Discussions](https://github.com/TomWq/expo-gaode-map/discussions)
423
+ - 💬 加入 QQ 群:952241387
@@ -151,6 +151,10 @@ public class ExpoGaodeMapModule: Module {
151
151
  self.getLocationManager().setDistanceFilter(Double(interval))
152
152
  }
153
153
 
154
+ Function("setDistanceFilter") { (distance: Double) in
155
+ self.getLocationManager().setDistanceFilter(distance)
156
+ }
157
+
154
158
  Function("setLocationTimeout") { (timeout: Int) in
155
159
  self.getLocationManager().setLocationTimeout(timeout)
156
160
  }