fanslin opened a new issue #9976: 用三维地图(map3D)展现福建泉州市下属区县后,鼠标无法点选高亮任何地市
URL: https://github.com/apache/incubator-echarts/issues/9976
 
 
   ### Version
   4.2.1-rc1
   
   ### Steps to reproduce
   var chart = echarts.init(document.getElementById("map"));
   
               var init = function (city) {
   
                   var barData = [];
                   if (city) {
                       for (var i = 0; i < city.length; i++) {
                           barData.push(city[i]);
                       }
                   }
   
                   var min = 0, max = 100;
                   var option = {
                       tooltip: {
                           formatter: function (params) {
                               var content = '',
                                   content = params.name + ':' + params.value + 
'%';
                               return content;
                           },
                       },
                       backgroundColor: '#000045',
                       visualMap: {
                           show: true,
                           min: min,
                           max: max,
                           inRange: {
                               color: ['#a9bbf3', '#1844db']
                           },
                           calculable: true
                       },
                       series: [{
                           name: '福建',
                           type: 'map3D',
                           map: 'fujian',
                           data: city,
                           regionHeight: 5,
                           boxWidth: 70,
                           boxDepth: 50,
                           top: '-10%',
                           right: '5%',
   
   
                           label: {
                               show: true,
                               formatter: function (params) {
                                   var content = '',
                                       content = params.name;
                                   return content;
                               },
                               textStyle: {
                                   color: '#fff',
                                   fontWeight: 'bold',
                                   fontSize: 12,
                                   backgroundColor: 'rgba(0,23,11,0)'
                               },
                               emphasis: {
                                   show: true,
                                   textStyle: { color: "#1844db" }
                               }
                           },
                           itemStyle: {
                               normal: {
                                   color: 'rgb(255,255,255)',
                                   opacity: 1,
                                   borderWidth: 0.5
                               },
                               emphasis: {
                                   color: 'rgb(255,255,255)'
                               }
                           },
   
                           viewControl: {
                               autoRotate: false,
                               distance: 70
                           }
   
                       }]
                   }
                   chart.setOption(option);
   
               };
   
               var city_map = function (id, name, data) {
                   $.ajax({
                       url: 'json/' + id + '.json',
                       type: 'get',
                       success: function (res) {
                           echarts.registerMap("fujian", res);
                           init(data)
                       }
                   })
               }
   
               var quanzhou = [//350500.json 泉州的数据不能点选高亮
                   { name: '丰泽区', value: 20 },
                   { name: '鲤城区', value: 10 },
                   { name: '晋江市', value: 15 },
                   { name: '惠安县', value: 10 },
                   { name: '石狮市', value: 8 },
                   { name: '泉港区', value: 6 },
                   { name: '南安市', value: 3 },
                   { name: '洛江区', value: 1.2 },
                   { name: '安溪县', value: 0.8 },
                   { name: '永春县', value: 10 },
                   { name: '德华县', value: 10 },
                   { name: '金门县', value: 10 }
               ];
               var xiamen = [//350200.json 换成厦门的数据可以正常点选高亮区域
                   { name: '同安区', value: 6 },
                   { name: '翔安区', value: 9 },
                   { name: '集美区', value: 5 },
                   { name: '湖里区', value: 10 },
                   { name: '思明区', value: 60 },
                   { name: '海沧区', value: 10 }
               ]
               city_map(350500, '', quanzhou)
   
   ### What is expected?
   泉州地市区县可以正常点选高亮
   
   ### What is actually happening?
   鼠标滑过地市无法高亮
   
   ---
   同样的实现,换成厦门的数据就可以正常显示,福建其他地市亦成功操作。
   泉州地市json数据是在这里下载
   
http://datav.aliyun.com/tools/atlas/#&lat=25.161444473516728&lng=118.29528808593751&zoom=9
   
   <!-- This issue is generated by echarts-issue-helper. DO NOT REMOVE -->
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to