aruis / cordova-plugin-baidumaplocation

Get device current Location from Baidu Map
https://www.npmjs.com/package/cordova-plugin-baidumaplocation
Apache License 2.0
139 stars 69 forks source link

ionic4 调用getCurrentPosition回调进不去 #77

Open AlwaysLoveme opened 5 years ago

AlwaysLoveme commented 5 years ago

cordova-android:7.1.4 this.platform.ready().then(() => { console.log('开始定位'); console.log(cordova.plugins.baidumap_location); const getPosition = cordova.plugins.baidumap_location['getCurrentPosition']; console.log(getPosition()); // 打包后这里是可以打印出来的 getPosition((result) => { console.log(JSON.stringify(result, null, 4)); // 这里不会执行 alert(JSON.stringify(result, null, 4)); }, (error) => { console.log(JSON.stringify(error)); // 这里也不会执行 alert(JSON.stringify(error)); }); });

wxingheng commented 5 years ago

有找到解决方案吗,遇到同样的问题

AlwaysLoveme commented 5 years ago

有找到解决方案吗,遇到同样的问题

将platforms/android/app/src/com/aruistar 复制到 platforms/android/app/src/main/java/com目录下

wxingheng commented 5 years ago

好的。谢谢。成功了

发自我的iPhone

------------------ 原始邮件 ------------------ 发件人: zhuxian <notifications@github.com> 发送时间: 2019年10月10日 14:05 收件人: aruis/cordova-plugin-baidumaplocation <cordova-plugin-baidumaplocation@noreply.github.com> 抄送: wuxh <1228678518@qq.com>, Comment <comment@noreply.github.com> 主题: 回复:[aruis/cordova-plugin-baidumaplocation] ionic4 调用getCurrentPosition回调进不去 (#77)

有找到解决方案吗,遇到同样的问题

将platforms/android/app/src/com/aruistar 复制到 platforms/android/app/src/main/java/com目录下

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

AlwaysLoveme commented 5 years ago

不客气

发自我的iPhone

在 2019年10月10日,下午2:16,wuxh notifications@github.com 写道:

好的。谢谢。成功了

发自我的iPhone

------------------ 原始邮件 ------------------ 发件人: zhuxian <notifications@github.com> 发送时间: 2019年10月10日 14:05 收件人: aruis/cordova-plugin-baidumaplocation <cordova-plugin-baidumaplocation@noreply.github.com> 抄送: wuxh <1228678518@qq.com>, Comment <comment@noreply.github.com> 主题: 回复:[aruis/cordova-plugin-baidumaplocation] ionic4 调用getCurrentPosition回调进不去 (#77)

有找到解决方案吗,遇到同样的问题

将platforms/android/app/src/com/aruistar 复制到 platforms/android/app/src/main/java/com目录下

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

jackeyxiang commented 5 years ago

你们得iOS设备没有问题么?我的iOS失败回调不执行。

chriswangvv commented 5 years ago

我按照@AlwaysLoveme 说的复制了咋还是不执行回调