We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1b22e6f commit 82fa6c1Copy full SHA for 82fa6c1
README.md
@@ -161,7 +161,7 @@ AMapGeolocation.setLocatingWithReGeocode(true);
161
// 开始定位
162
AMapGeolocation.start();
163
// 停止更新位置信息
164
-AMapGeolocation.start();
+AMapGeolocation.stop();
165
// 是否已经开始持续定位了
166
AMapGeolocation.isStarted();
167
// 在某些情况获取不到数据,建议使用 `addLocationListener` 来实现
@@ -192,6 +192,9 @@ if (Platform.OS === 'android') {
192
AMapGeolocation.setApiKey(apiKey);
193
// 定位是否返回逆地理信息
194
AMapGeolocation.setLocatingWithReGeocode(true);
195
+
196
+// 必须,启动开始定位,addLocationListener 监听函数才有效
197
+AMapGeolocation.start();
198
// 当设备可以正常联网时,还可以返回该定位点的对应的中国境内位置信息(包括:省、市、区/县以及详细地址)。
199
const listener = AMapGeolocation.addLocationListener((location) => {
200
console.log('返回定位信息', location);
0 commit comments