// 修改市中心经纬度
editMapCp(){
var chinaEchartsObj = this.$echarts.getMap('广东');
var geoJSONChina = chinaEchartsObj.geoJson;
var allDefProvince = geoJSONChina.features;
for(var i=0,len=allDefProvince.length; i<len; i++){
var sglProvinceProperties = allDefProvince[i].properties;
var sglProvinceName = sglProvinceProperties.name;
switch(sglProvinceName){
case '河源市':
sglProvinceProperties.cp[0]=114.967484;
sglProvinceProperties.cp[1]=23.765958;
break;
case '汕尾市':
sglProvinceProperties.cp[0]=115.527613;
sglProvinceProperties.cp[1]=23.002469;
break;
case '潮州市':
sglProvinceProperties.cp[0]=116.762406;
sglProvinceProperties.cp[1]=23.805144;
echarts 修改地图经纬度
最新推荐文章于 2024-06-10 20:01:59 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)