1***@qq.com
1***@qq.com
  • 发布:2020-08-09 01:01
  • 更新:2020-12-26 21:30
  • 阅读:2325

【报Bug】Cannot read property 'map' of undefined

分类:uni-app

问题描述,在win10环境下运行到微信开发者工具报错

VM3974:1 TypeError: Cannot read property 'map' of undefined
at :50899/pageframe/dev/WAWebview.js:2
at Array.map (<anonymous>)
at i.linesChanged (:50899/pageframe/dev/WAWebview.js:2)
at i.<anonymous> (:50899/pageframe/dev/WAWebview.js:2)
at Array.forEach (<anonymous>)
at i._ready (:50899/pageframe/dev/WAWebview.js:2)
at sb.<anonymous> (:50899/pageframe/dev/WAWebview.js:2)
at mapapi.qq.com/jsapi_v2/2/4/132/main.js:1
at W (mapapi.qq.com/jsapi_v2/2/4/132/main.js:1)
at db.S.trigger (mapapi.qq.com/jsapi_v2/2/4/132/main.js:1)
console.error @ VM3974:1
(anonymous) @ VM4059:2
VM4060:1 Sun Aug 09 2020 00:37:22 GMT+0800 (中国标准时间) 渲染层错误
VM3974:1 SystemError (webviewScriptError)
Cannot read property 'map' of undefined
TypeError: Cannot read property 'map' of undefined
at http://127.0.0.1:50899/pageframe/dev/WAWebview.js:2:1152451
at Array.map (<anonymous>)
at i.linesChanged (http://127.0.0.1:50899/pageframe/dev/WAWebview.js:2:1152420)
at i.<anonymous> (http://127.0.0.1:50899/pageframe/dev/WAWebview.js:2:603130)
at Array.forEach (<anonymous>)
at i._ready (http://127.0.0.1:50899/pageframe/dev/WAWebview.js:2:603093)
at sb.<anonymous> (http://127.0.0.1:50899/pageframe/dev/WAWebview.js:2:1138579)
at https://mapapi.qq.com/jsapi_v2/2/4/132/main.js:1:16956
at W (https://mapapi.qq.com/jsapi_v2/2/4/132/main.js:1:14959)
at db.S.trigger (https://mapapi.qq.com/jsapi_v2/2/4/132/main.js:1:16927)
console.error @ VM3974:1
(anonymous) @ VM4060:2
VM4061:1 Sun Aug 09 2020 00:37:22 GMT+0800 (中国标准时间) 渲染层错误
VM3974:1 Uncaught
console.error @ VM3974:1
(anonymous) @ VM4061:2

手机预览微信小程序下,界面报错:

MiniProgramError{"errMsg":"translateMapMarker:fail error markerid"}
Object
说明,我没有用到map 的 marker属性

代码片段:
template 标签对下
map class="map" id="myMap" show-location="true" :polyline="polyline" :longitude="longitude" :latitude="latitude" scale="15" /map

script 标签对下
var _this, mapCtx;

data(){
return{
polyline: [{ points: [] }, { width: 20 }, { color: '#0000AA' }, { borderWidth: 20 }],
latitude: '',
longitude: '',
};
}
onLoad(option) {
_this = this;
mapCtx = uni.createMapContext('myMap',this);
}

问题困扰了一天了,没有找到解决方案,麻烦懂map的大佬们给看一下

2020-08-09 01:01 负责人:无 分享
已邀请:
r***@iamsee.com

r***@iamsee.com

同样问题,请问解决了吗

该问题目前已经被锁定, 无法添加新回复