苹果端 定位定不了
- 发布:2020-08-04 17:46
- 更新:2020-08-07 11:33
- 阅读:737
1***@qq.com (作者)
已经解决了,是appkey_ios的值配置的问题
regionchange(e){
console.log(e.type)
var that=this
if(e.type=="end"){
mapContext.getCenterLocation({
success: res =>{
console.log(res)
that.getAddressText(res)
},
fail: err => {
console.log(err);
},
complete:res=>{
console.log(res);
}
})
}
},
这个方法需要改下,
regionchange(e){
let type = e.type;
if(permision.isIOS){
type = e.detail.type;
}
console.log(e.type)
var that=this
if(type=="end"){
mapContext.getCenterLocation({
success: res =>{
console.log(res)
that.getAddressText(res)
},
fail: err => {
console.log(err);
},
complete:res=>{
console.log(res);
}
})
}
},
IOS时map的regionchange的end值是e.detail.type;
我是Iphone6s真机运行打印的