maptalks.js icon indicating copy to clipboard operation
maptalks.js copied to clipboard

Uncaught DOMException: Failed to execute 'drawImage' on 'CanvasRenderingContext2D': The image argument is a canvas element with a width or height of 0

Open 410739452 opened this issue 2 years ago • 1 comments

maptalks's version and what browser you use? v1.0.0-rc.27

Issue description 111

地图有时会加载不出来,会报这个错误

Please provide a reproduction URL (on any jsfiddle like site)

410739452 avatar Oct 31 '23 02:10 410739452

@410739452

这种一般都是地图容器大小为0导致的,可能原因:

1.地图容器默认隐藏导致地图容器为0 2.vue等组件开发时,组件还没有挂载就开始new地图了,应该在组件挂载后在new map

deyihu avatar Oct 31 '23 03:10 deyihu