收藏
回答

基础库版本 1.5.0 map调用bindmarkertap进行绑定会报错

问题模块
API和组件

基础库版本 1.5.0 map调用bindmarkertap进行地图图标的点击绑定,然后会报错!~~求助



绑定的方法如下:

<map
  id="map"
  scale="14"
  markers="{{markers}}"
  bindmarkertap="markertap"
  include-points="{{markers}}"
  style="width: 100%; height: 100%;">

</map>

markertap(e) {

  console.log(e)

}



以下是报错详情:


VM5106:2 TypeError: Cannot read property 'always' of null
    at p (1812894998.debug.open.weixin.qq.com/pages/map/map.html:29)
    at k.<anonymous> (1812894998.debug.open.weixin.qq.com/pages/map/map.html:29)
    at open.map.qq.com/apifiles/2/4/71/main.js:1
    at Y (open.map.qq.com/apifiles/2/4/71/main.js:1)
    at Object.Q.trigger (open.map.qq.com/apifiles/2/4/71/main.js:1)
    at k.ya.triggerCustomEvent (open.map.qq.com/apifiles/2/4/71/main.js:1)
    at k.C.triggerMouseEvent (eval at <anonymous> (eval at <anonymous> (eval at <anonymous> (open.map.qq.com/apifiles/2/4/71/main.js:1))), <anonymous>:1:25176)
    at k.C.doEvent (eval at <anonymous> (eval at <anonymous> (eval at <anonymous> (open.map.qq.com/apifiles/2/4/71/main.js:1))), <anonymous>:1:24251)
    at k.eval (eval at <anonymous> (eval at <anonymous> (eval at <anonymous> (open.map.qq.com/apifiles/2/4/71/main.js:1))), <anonymous>:1:12677)
    at open.map.qq.com/apifiles/2/4/71/main.js:1(anonymous function) @ VM5106:2
VM5108:1 Wed Aug 23 2017 11:34:25 GMT+0800 (中国标准时间) 渲染层错误
VM5108:2 webviewScriptError
Cannot read property 'always' of null
TypeError: Cannot read property 'always' of null
    at p (http://1812894998.debug.open.weixin.qq.com/pages/map/map.html:29:14606)
    at k.<anonymous> (http://1812894998.debug.open.weixin.qq.com/pages/map/map.html:29:15322)
    at http://open.map.qq.com/apifiles/2/4/71/main.js:1:15668
    at Y (http://open.map.qq.com/apifiles/2/4/71/main.js:1:14200)
    at Object.Q.trigger (http://open.map.qq.com/apifiles/2/4/71/main.js:1:15639)
    at k.ya.triggerCustomEvent (http://open.map.qq.com/apifiles/2/4/71/main.js:1:48905)
    at k.C.triggerMouseEvent (eval at <anonymous> (eval at <anonymous> (eval at <anonymous> (http://open.map.qq.com/apifiles/2/4/71/main.js:1:62440))), <anonymous>:1:25176)
    at k.C.doEvent (eval at <anonymous> (eval at <anonymous> (eval at <anonymous> (http://open.map.qq.com/apifiles/2/4/71/main.js:1:62440))), <anonymous>:1:24251)
    at k.eval (eval at <anonymous> (eval at <anonymous> (eval at <anonymous> (http://open.map.qq.com/apifiles/2/4/71/main.js:1:62440))), <anonymous>:1:12677)
    at http://open.map.qq.com/apifiles/2/4/71/main.js:1:15668(anonymous function) @ VM5108:2
VM5109:1 Wed Aug 23 2017 11:34:25 GMT+0800 (中国标准时间) 渲染层错误
VM5109:2 Uncaught TypeError: Cannot read property 'always' of null(anonymous function) @ VM5109:2


最后一次编辑于  2017-08-23
回答关注问题邀请回答
收藏