cordova-baidu-location
cordova-baidu-location copied to clipboard
" baidu_location" 提示未定义
直接使用 baidu_location 提示未定义
you probably need to wait until the plugin is completely loaded. Use it in a timeout function and try again?
多谢
我在angular4+ionic3的项目中用的,按照您的方法,还是会报"baidu_location"未定义的错误。求解答
我刚刚解决了, 加上这个 ,然后生成APP 测试
发自网易邮箱大师
在2017年8月16日 14:22,jinxin[email protected] 写道:
我在angular4+ionic3的项目中用的,按照您的方法,还是会报"baidu_location"未定义的错误。求解答
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
最好是 cordova platform rm android cordova platform add android --nofetch
发自网易邮箱大师
在2017年8月16日 14:22,jinxin[email protected] 写道:
我在angular4+ionic3的项目中用的,按照您的方法,还是会报"baidu_location"未定义的错误。求解答
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
邮箱发的贴的图 这里看不到 . 先 定义 一下declare let baidumap_location: any; 代码不报错了 ,在生成APP在手机上测试.
@jinzis ionic3 + angular "baidu_location"未定义的错误解决了吗?请问是如何解决的?
@hewz 部分手机(如小米)首次进入app调用定位会失败,点击其它页面再进入首页时可以成功调用,查看您关闭的issue,在Java代码中注释了那几段代码还是不行,目前用了个比较笨的办法,首次进入app调用插件时加了个timeout即可行,但这确实不是最佳做法,如果有时间能否看下这个问题。