mapv icon indicating copy to clipboard operation
mapv copied to clipboard

ERROR TypeError: this.show is not a function

Open tucke opened this issue 6 years ago • 5 comments

在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)

tucke avatar May 21 '19 07:05 tucke

我也遇到这个问题了

mcDullLi avatar Dec 04 '19 06:12 mcDullLi

我已经解决了

如何解决 求指导

mcDullLi avatar Dec 04 '19 06:12 mcDullLi

说一下你的使用场景,我不知道是不是跟我一样

在vue baidu map里,map初始化的时候用的new mapv.baiduMapLayer(map, dataSet, mapvOptions)报错

mcDullLi avatar Dec 05 '19 07:12 mcDullLi

你的百度组件也是异步导入的,mapv在初始化时内部会判断window是否存在BMap,不在,就导致CanvasLayer的prototype没有很多的方法,包括show。所以在地图加载完毕后,require('mapV')就好

PerttyZhan avatar Jan 12 '20 06:01 PerttyZhan

在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)

所以这个问题你解决了吗?

BecksWang avatar Jan 18 '20 09:01 BecksWang