ERROR TypeError: this.show is not a function
在angualr中使用 new mapv.baiduMapLayer(map, dataSet, mapvOptions); 报错
ERROR TypeError: this.show is not a function at new CanvasLayer (mapv.js:3011) at new Layer (mapv.js:4778)
我也遇到这个问题了
我已经解决了
如何解决 求指导
说一下你的使用场景,我不知道是不是跟我一样
在vue baidu map里,map初始化的时候用的new mapv.baiduMapLayer(map, dataSet, mapvOptions)报错
你的百度组件也是异步导入的,mapv在初始化时内部会判断window是否存在BMap,不在,就导致CanvasLayer的prototype没有很多的方法,包括show。所以在地图加载完毕后,require('mapV')就好
在angualr中使用 new mapv.baiduMapLayer(map, dataSet, mapvOptions); 报错
ERROR TypeError: this.show is not a function at new CanvasLayer (mapv.js:3011) at new Layer (mapv.js:4778)
所以这个问题你解决了吗?