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

省份详情地图显示 #13

Open
liwei352 opened this issue Feb 7, 2020 · 1 comment
Open

省份详情地图显示 #13

liwei352 opened this issue Feb 7, 2020 · 1 comment

Comments

@liwei352
Copy link

liwei352 commented Feb 7, 2020

海南省地图显示有问题

@liwei352
Copy link
Author

liwei352 commented Feb 8, 2020

已找到解决方案:
if(显示海南地图) { //由于海南地图包括南海及南海诸岛在内的大片区域,所以显示海南地图时,要将地图放大,并设置海南岛居中显示
option.series[0].center = [109.844902, 19.0392];
option.series[0].layoutCenter = ['50%', '50%'];
option.series[0].layoutSize = "600%";
} else { //非显示海南时,将设置的参数恢复默认值
option.series[0].center = undefined;
option.series[0].layoutCenter = undefined;
option.series[0].layoutSize = undefined;
}

在option参数时对省份进行判断一下

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