|
[插件使用]
使用aMapLBS模块,singleLocation没有回调,没反应
[复制链接]
- getLocation() {
- if (this.hasLocPerm) {
- var aMapLBS = window.api.require('aMapLBS')
- aMapLBS.configManager({
- accuracy: 'best',
- filter: 1
- }, (ret, err) => {
- if (ret.status) {
- aMapLBS.singleLocation({
- timeout: 10
- }, function(ret, err) {
- // if (ret.status) {
- // alert(JSON.stringify(ret))
- // }
- // if (ret) {
- // alert(JSON.stringify(ret))
- // }
- // if (err) {
- // alert(JSON.stringify(err))
- // }
- alert('singleLocation cb') // 没有log
- })
- }
- })
- } else {
- this.requestPermission()
- }
- },
复制代码 用了自定义证书,高德AK那里也修改了SHA1和包名。定位权限已经获取到了。上述代码的aMapLBS.singleLocation也调用了,但回调就是没有被执行。
我是直接云编译,真机运行的,不知道问题出在哪里呢?
|
|