首页 / 浏览问题 / 其他 / 问题详情
超图FAQ:【iClient】在vue中使用mapboxgl+echarts ,无法获取到EchartsLayer怎么办?
43,901EXP 2023年07月26日
【iClient】在vue中使用mapboxgl+echarts ,无法获取到EchartsLayer怎么办?

1个回答

【问题原因】vue不支持下面这种include-mapboxgl.js集合快捷引用的方式: import mapboxgl from 'mapbox-gl'; import * as a from '@supermap/iclient-mapboxgl'; console.log(a); // 没有EchartsLayer 【解决办法】使用vue的话你需要每个包手动去引, 比如打开include-mapboxgl.js中,可以看到“echarts”模块下,有 'https://iclient.supermap.io/web/libs/echarts/4.9.0/echarts.min.js' 'https://iclient.supermap.io/web/libs/echarts-liquidfill/2.0.6/echarts-liquidfill.min.js' 'https://iclient.supermap.io/web/libs/echartsLayer/EchartsLayer.min.js' 这些文件就需要手动引入vue。
43,901EXP 2023年07月26日
热门文章
关注我们
...