Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用ve-map地图组件,消失但没有任何报错 #937

Open
Pats666 opened this issue Mar 7, 2023 · 1 comment
Open

使用ve-map地图组件,消失但没有任何报错 #937

Pats666 opened this issue Mar 7, 2023 · 1 comment

Comments

@Pats666
Copy link

Pats666 commented Mar 7, 2023

使用ve-map地图组件,在本地开发时是正常显示的。但是一旦发布到了测试服务器上,地图组件就会消失不见,并且没有任何报错,其他v-charts组件都正常显示。

@Pats666
Copy link
Author

Pats666 commented Mar 7, 2023

#404

受上面的issue的启发,由于我使用到的是世界地图,因此我先引入了echarts中的JSON文件 'echarts/map/json/world.json',然后在ve-map的配置项中加入mapOrigin配置,并将配置指定为引入的JSON文件。问题得到了解决。

import World from 'echarts/map/json/world.json'

this.chartSettings = {
  mapOrigin: World
}

如果你使用的是中国地图,可以按下示代码操作:

import China from 'echarts/map/json/china.json'

this.chartSettings = {
  mapOrigin: China
}

当然问题为什么会产生,为什么这么操作就解决了,我也不是很清楚。。。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant