Open JakeWoki opened 6 years ago
@Dafrok 求助
我没复现成功呢
@Dafrok 地图加载完成后点定位按钮,定位后再随便点一下地图,再点击定位。这样就会报上面的报错
我又来了,我也是这样的 我现在是有两个报错。 一个是ready自动定位这里,注释的这一段,放开的话就会有一个报错
handler ({BMap, map}) { this.BMap = BMap;
let _that = this
if (!this.mapfirst) { //组件初始化自动定位
this.mapfirst = true
let geolocation = new BMap.Geolocation();
// geolocation.getCurrentPosition(function(r){
// if(this.getStatus() == BMAP_STATUS_SUCCESS){
// console.log(r)
// _that.location.lng = r.longitude
// _that.location.lat = r.latitude
// //保存下一步需要的坐标
// _that.addpoint = {
// lng: r.longitude,
// lat: r.latitude
// }
// _that.locationadd = r.address.province + r.address.city + r.address.district + r.address.street
// }
// else {
// // alert('failed'+this.getStatus());
// Toast('定位失败')
// }
// },{enableHighAccuracy: true})
}
},
假装有分割线 第二个就是和这位老兄一样
locationSuccess (res) { console.log(res) this.addpoint = res.point; console.log(res.point) this.locationadd = res.addressComponent.city + res.addressComponent.district + res.addressComponent.street }, 点击定位按钮后,再拖动地图就会有这样的报错,注释掉locationSuccess函数里面所有的内容,拖动的时候,就不报错了
对了,上面的代码也会报
Uncaught SyntaxError: Unexpected token o in JSON at position 1
at JSON.parse (<anonymous>)
at eval (eval at zZ (getscript?v=2.0&ak=aaa&services=&t=20180629105709:1), <anonymous>:1:8301)
不过我的功能好像都是正常的
@cn-zx Uncaught TypeError: Cannot read property 'Ha' of null这个报错再次定位不正常的,按我上面的代码marker移不到中心位置的
感觉像是某些 control 被重渲染造成的,百度地图的 JS API 加密了,追踪略困难,我抽时间看看
这里问题有解决吗?
I get the same issue by roughly doing the following: A) render map with markers and centered at a specific location B) destroy component (by client side routing), and then render again Repeat B) Error occurs. I also see different errors sometimes.
Uncaught TypeError: Cannot read property 'Xe' of undefined
at Ka.eval (eval at AZ (getscript?v=2.0&ak=uQEvuTjB0ZDxgW5IVZlXLYcy0nRjsoi4&services=&t=20190622163250:1), <anonymous>:1:2368)
at Ka.x.lang.Ca.dispatchEvent (getscript?v=2.0&ak=uQEvuTjB0ZDxgW5IVZlXLYcy0nRjsoi4&services=&t=20190622163250:1)
at a.to (eval at AZ (getscript?v=2.0&ak=uQEvuTjB0ZDxgW5IVZlXLYcy0nRjsoi4&services=&t=20190622163250:1), <anonymous>:1:8931)
and
Error: 无效指针
at Lc(/getscript:1:100077)
at Hx(/getscript:1:94186)
at oI(/getscript:1:96322)
at Tf(/getscript:1:95117)
at Anonymous function(eval code:1:213771)
at x.lang.Ca.prototype.dispatchEvent(/getscript:1:8631)
at a.to(eval code:1:8929)
at r(..\..\..\./node_modules/@sentry/browser/esm/helpers.js:67:13)
I have not an exact repro right now unfortunately. Oh, and it only happens sometimes, so quite hard to debug unfortunately.
I have the same question
[BUG 反馈] Uncaught TypeError: Cannot read property 'Ha' of null
浏览器版本号
Google Chrome 66.0.3359.181
Vue 版本号
2.5.2
组件库版本号
0.21.10
现象描述
完整异常信息
在线示例 / 仓库 URL
先点定位,再点一下地图(marker会移动到点击位置),再点定位会报错 如果去掉destinationAddress变量的赋值就不报错。可能和库没有关系,不过实在看不出什么问题,所以帮忙看一下是什么原因