日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

echarts 修改地图经纬度

發布時間:2023/12/14 编程问答 29 豆豆
生活随笔 收集整理的這篇文章主要介紹了 echarts 修改地图经纬度 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
// 修改市中心經緯度 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;break;case '汕頭市':sglProvinceProperties.cp[0]=116.607214;sglProvinceProperties.cp[1]=23.323404;break;case '揭陽市':sglProvinceProperties.cp[0]=116.0185;sglProvinceProperties.cp[1]=23.442287;break;case '清遠市':sglProvinceProperties.cp[0]=113.13368;sglProvinceProperties.cp[1]=24.254554;break;case '廣州市':sglProvinceProperties.cp[0]=113.43368;sglProvinceProperties.cp[1]=23.376234;break;case '惠州市':sglProvinceProperties.cp[0]=114.537518;sglProvinceProperties.cp[1]=23.13637;break;case '東莞市':sglProvinceProperties.cp[0]=113.810825;sglProvinceProperties.cp[1]=22.983145;break;case '深圳市':sglProvinceProperties.cp[0]=114.270757;sglProvinceProperties.cp[1]=22.63738;break;case '肇慶市':sglProvinceProperties.cp[0]=112.234442;sglProvinceProperties.cp[1]=23.463922;break;case '江門市':sglProvinceProperties.cp[0]=112.601344;sglProvinceProperties.cp[1]=22.373689;break;case '云浮市':sglProvinceProperties.cp[0]=111.815903;sglProvinceProperties.cp[1]=22.776636;break;case '陽江市':sglProvinceProperties.cp[0]=111.815903;sglProvinceProperties.cp[1]=21.960395;break;case '茂名市':sglProvinceProperties.cp[0]=110.927049;sglProvinceProperties.cp[1]=21.862768;break;}}this.$echarts.registerMap('廣東', geoJSONChina, {});}

執行editMapCp再執行地圖渲染方法。

總結

以上是生活随笔為你收集整理的echarts 修改地图经纬度的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。